Skip to content
This repository
Browse code

fixes for new module layout from John Wiseman

  • Loading branch information...
commit 41058de8ca2560aff8d1f3d96006436962c81db9 1 parent ba99bb7
Andrew Tridgell authored January 10, 2013
3  mavproxy.py
@@ -13,7 +13,7 @@
13 13
 
14 14
 # The modules subdirectory contains the modules that come with
15 15
 # mavproxy.
16  
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'modules'))
  16
+sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 'modules'))
17 17
 
18 18
 # find the mavlink.py module
19 19
 for d in [ 'pymavlink',
@@ -24,6 +24,7 @@
24 24
 
25 25
 import select
26 26
 from modules.lib import textconsole
  27
+from modules.lib import mp_settings
27 28
 
28 29
 class MPSettings(object):
29 30
     def __init__(self):
0  modules/mavproxy_map/mp_util.py → modules/lib/mp_util.py
File renamed without changes
3  modules/mavproxy_CUAV/camera.py
@@ -9,8 +9,9 @@
9 9
 sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', '..', 'cuav', 'lib'))
10 10
 sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'lib'))
11 11
 
12  
-import scanner, mavutil, cuav_mosaic, mav_position, cuav_util, cuav_joe, block_xmit, mp_image, cuav_region, mp_slipmap, mp_settings
  12
+import scanner, mavutil, cuav_mosaic, mav_position, cuav_util, cuav_joe, block_xmit, mp_image, cuav_region, mp_settings
13 13
 from cam_params import CameraParams
  14
+from modules.mavproxy_map import mp_slipmap
14 15
 
15 16
 # allow for replaying of previous flights
16 17
 if os.getenv('FAKE_CHAMELEON'):
0  modules/CUAV/cuav.py → modules/mavproxy_CUAV/cuav.py
File renamed without changes
0  modules/CUAV/nmea.py → modules/mavproxy_CUAV/nmea.py
File renamed without changes
0  modules/HIL.py → modules/mavproxy_HIL.py
File renamed without changes
2  modules/mavproxy_console.py
@@ -11,7 +11,7 @@
11 11
 from modules.lib import wxconsole
12 12
 from modules.lib import textconsole
13 13
 from modules.lib import mp_elevation
14  
-from modules.lib import mavutil
  14
+import mavutil
15 15
 from modules.lib import mp_util
16 16
 
17 17
 class module_state(object):
3  modules/mavproxy_map/__init__.py
@@ -9,6 +9,7 @@
9 9
 import functools
10 10
 import time
11 11
 from mavproxy_map import mp_slipmap
  12
+from modules.lib import mp_util
12 13
 
13 14
 mpstate = None
14 15
 
@@ -91,7 +92,7 @@ def closest_waypoint(latlon):
91 92
 
92 93
 def map_callback(obj):
93 94
     '''called when an event happens on the slipmap'''
94  
-    import mp_slipmap
  95
+    from mavproxy_map import mp_slipmap
95 96
     state = mpstate.map_state
96 97
     if not isinstance(obj, mp_slipmap.SlipMouseEvent):
97 98
         return
0  data/blueplane.png → modules/mavproxy_map/data/blueplane.png
File renamed without changes
2  modules/mavproxy_map/mp_image.py
@@ -9,7 +9,7 @@
9 9
 import time
10 10
 import wx
11 11
 
12  
-from mavproxy_map import mp_util
  12
+from modules.lib import mp_util
13 13
 from mavproxy_map import mp_widgets
14 14
 
15 15
 
2  modules/mavproxy_map/mp_slipmap.py
@@ -14,7 +14,7 @@
14 14
 
15 15
 from mavproxy_map import mp_elevation
16 16
 from mavproxy_map import mp_tile
17  
-from mavproxy_map import mp_util
  17
+from modules.lib import mp_util
18 18
 from mavproxy_map import mp_widgets
19 19
 
20 20
 
2  modules/mavproxy_map/mp_tile.py
@@ -21,7 +21,7 @@
21 21
 
22 22
 import cv
23 23
 
24  
-from mavproxy_map import mp_util
  24
+from modules.lib import mp_util
25 25
 
26 26
 class TileException(Exception):
27 27
 	'''tile error class'''
2  modules/mavproxy_map/srtm.py
@@ -16,7 +16,7 @@
16 16
 import array
17 17
 import math
18 18
 import multiprocessing
19  
-import mp_util
  19
+from modules.lib import mp_util
20 20
 import tempfile
21 21
 
22 22
 class NoSuchTileError(Exception):
0  modules/rcsetup.py → modules/mavproxy_rcsetup.py
File renamed without changes

0 notes on commit 41058de

Please sign in to comment.
Something went wrong with that request. Please try again.