bluerobotics / BlueOS

The open source platform for ROV, USV, robotic system operation, development, and expansion.
https://blueos.cloud/docs/
Other
140 stars 70 forks source link

we should automate board identification on blueos #2551

Open Williangalvani opened 4 months ago

Williangalvani commented 4 months ago

I don't think we need to add support to board one by one. all information we need to automate this should be present in the hwdef files in ardupilot. parsing then might be annoying, though.

we could also do as is done in the uploader script, maybe:

# default list of port names to look for autopilots
default_ports = ['/dev/serial/by-id/usb-Ardu*',
                 '/dev/serial/by-id/usb-3D*',
                 '/dev/serial/by-id/usb-APM*',
                 '/dev/serial/by-id/usb-Radio*',
                 '/dev/serial/by-id/usb-*_3DR_*',
                 '/dev/serial/by-id/usb-Hex_Technology_Limited*',
                 '/dev/serial/by-id/usb-Hex_ProfiCNC*',
                 '/dev/serial/by-id/usb-Holybro*',
                 '/dev/serial/by-id/usb-mRo*',
                 '/dev/serial/by-id/usb-modalFC*',
                 '/dev/serial/by-id/usb-Auterion*',
                 '/dev/serial/by-id/usb-*-BL_*',
                 '/dev/serial/by-id/usb-*_BL_*',
                 '/dev/serial/by-id/usb-Swift-Flyer*',
                 '/dev/serial/by-id/usb-CubePilot*',
                 '/dev/serial/by-id/usb-Qiotek*',
                 '/dev/tty.usbmodem*']
ES-Alexander commented 4 months ago

Worth noting that even an automated list is not guaranteed to be exhaustive, because someone might make a custom board, or may not be using an ArduPilot autopilot firmware.

That said, automatically supporting all the standard ArduPilot board options by default does seem reasonable and valuable :-)