waf: default port list for uploader

This commit is contained in:
Andrew Tridgell 2018-01-20 11:43:57 +11:00
parent 30fd2da108
commit 4bc3a649cc
2 changed files with 3 additions and 4 deletions

View File

@ -42,9 +42,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("python {}/px_uploader.py --port /dev/serial/by-id/usb-3D*,/dev/serial/by-id/usb-Ardu*,/dev/tty.usbmodem* \
--baud-bootloader 115200 {}".format(
upload_tools, src))
return self.exec_command("python {}/px_uploader.py {}".format(upload_tools, src))
def exec_command(self, cmd, **kw):
kw['stdout'] = sys.stdout

View File

@ -603,7 +603,8 @@ def main():
# Parse commandline arguments
parser = argparse.ArgumentParser(description="Firmware uploader for the PX autopilot system.")
parser.add_argument('--port', action="store", required=True, help="Comma-separated list of serial port(s) to which the FMU may be attached")
parser.add_argument('--port', action="store", help="Comma-separated list of serial port(s) to which the FMU may be attached",
default="/dev/serial/by-id/usb-3D*,/dev/serial/by-id/usb-Ardu*,/dev/tty.usbmodem*")
parser.add_argument('--baud-bootloader', action="store", type=int, default=115200, help="Baud rate of the serial port (default is 115200) when communicating with bootloader, only required for true serial ports.")
parser.add_argument('--baud-bootloader-flash', action="store", type=int, default=None, help="Attempt to negotiate this baudrate with bootloader for flashing.")
parser.add_argument('--baud-flightstack', action="store", default="57600", help="Comma-separated list of baud rate of the serial port (default is 57600) when communicating with flight stack (Mavlink or NSH), only required for true serial ports.")