Tools: ardupilotwaf: adjust for new location of uploader.py

This commit is contained in:
Peter Barker 2018-11-12 16:39:12 +11:00 committed by Peter Barker
parent 072195ad99
commit 1d2f8555c0
4 changed files with 9 additions and 8 deletions

View File

@ -739,8 +739,8 @@ class px4(Board):
self.ROMFS_EXCLUDE = []
# use ardupilot version of px_uploader.py
os.environ['UPLOADER'] = os.path.realpath(os.path.join(os.path.dirname(__file__), 'px_uploader.py'))
# use ardupilot version of uploader.py
os.environ['UPLOADER'] = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', 'script', 'uploader.py'))
def configure(self, cfg):
if not self.bootloader_name:

View File

@ -54,7 +54,7 @@ class upload_fw(Task.Task):
def run(self):
upload_tools = self.env.get_flat('UPLOAD_TOOLS')
src = self.inputs[0]
return self.exec_command("{} '{}/px_uploader.py' '{}'".format(self.env.get_flat('PYTHON'), upload_tools, src))
return self.exec_command("{} '{}/uploader.py' '{}'".format(self.env.get_flat('PYTHON'), upload_tools, src))
def exec_command(self, cmd, **kw):
kw['stdout'] = sys.stdout
@ -93,7 +93,7 @@ class generate_bin(Task.Task):
class generate_apj(Task.Task):
color='CYAN'
run_str="${PYTHON} '${UPLOAD_TOOLS}/px_mkfw.py' --image '${SRC}' --prototype '${BUILDROOT}/apj.prototype' > '${TGT}'"
run_str="${PYTHON} '${MKFW_TOOLS}/px_mkfw.py' --image '${SRC}' --prototype '${BUILDROOT}/apj.prototype' > '${TGT}'"
always_run = True
def keyword(self):
return "Generating"
@ -240,7 +240,8 @@ def configure(cfg):
env.BUILDROOT = bldpath('')
env.SRCROOT = srcpath('')
env.PT_DIR = srcpath('Tools/ardupilotwaf/chibios/image')
env.UPLOAD_TOOLS = srcpath('Tools/ardupilotwaf')
env.MKFW_TOOLS = srcpath('Tools/ardupilotwaf')
env.UPLOAD_TOOLS = srcpath('Tools/scripts')
env.CHIBIOS_SCRIPTS = srcpath('libraries/AP_HAL_ChibiOS/hwdef/scripts')
env.TOOLS_SCRIPTS = srcpath('Tools/scripts')
env.APJ_TOOL = srcpath('Tools/scripts/apj_tool.py')
@ -337,4 +338,4 @@ def build(bld):
bld.env.LIBPATH += ['modules/ChibiOS/']
wraplist = ['strerror_r', 'fclose', 'freopen', 'fread', 'fprintf', 'sscanf', 'snprintf']
for w in wraplist:
bld.env.LINKFLAGS += ['-Wl,--wrap,%s' % w]
bld.env.LINKFLAGS += ['-Wl,--wrap,%s' % w]

View File

@ -1847,7 +1847,7 @@ class AutoTestCopter(AutoTest):
self.mavproxy.expect("Gripper Grabbed")
self.mavproxy.expect("Gripper Released")
except Exception as e:
self.progress("Exception caught")
self.progress("Exception caught: %s" % str(e))
self.mavproxy.send('mode land\n')
ex = e
self.context_pop()

View File

@ -21,7 +21,7 @@ testdir = os.path.dirname(os.path.realpath(__file__))
# Check python version for abstract base class
if sys.version_info[0] >= 3 and sys.version_info[1] >= 4:
ABC = abc.ABC
ABC = abc.ABC
else:
ABC = abc.ABCMeta('ABC', (), {})