Browse Source

waf: default port list for uploader

mission-4.1.18
Andrew Tridgell 7 years ago
parent
commit
4bc3a649cc
  1. 4
      Tools/ardupilotwaf/chibios.py
  2. 3
      Tools/ardupilotwaf/px_uploader.py

4
Tools/ardupilotwaf/chibios.py

@ -42,9 +42,7 @@ class upload_fw(Task.Task): @@ -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

3
Tools/ardupilotwaf/px_uploader.py

@ -603,7 +603,8 @@ def main(): @@ -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.")

Loading…
Cancel
Save