Tools: add ./waf --upload-force arg to allow uploader.py to do --force

This commit is contained in:
Tom Pittenger 2023-05-11 12:55:43 -07:00 committed by Andrew Tridgell
parent 5483f07d28
commit a47e125c1f
2 changed files with 7 additions and 0 deletions

View File

@ -565,6 +565,11 @@ arducopter and upload it to my board".
help='''Specify the port to be used with the --upload option. For example a port of /dev/ttyS10 indicates that serial port 10 shuld be used.
''')
g.add_option('--upload-force',
action='store_true',
help='''Override board type check and continue loading. Same as using uploader.py --force.
''')
g = opt.ap_groups['check']
g.add_option('--check-verbose',

View File

@ -69,6 +69,8 @@ class upload_fw(Task.Task):
cmd = "{} '{}/uploader.py' '{}'".format(self.env.get_flat('PYTHON'), upload_tools, src.abspath())
if upload_port is not None:
cmd += " '--port' '%s'" % upload_port
if self.generator.bld.options.upload_force:
cmd += " '--force'"
return self.exec_command(cmd)
def wsl2_prereq_checks(self):