Trying to Connect RPI to Pixhawk 4 through telem 1-2 port

I’ve taken some time to look at that part of the codebase. The main relevant points are that the Detector is stateless (so things need to be passed in directly, or determined dynamically), and the settings are managed by the ArduPilotManager.

Accordingly, what makes the most sense to me would be

  1. Modify Detector.detect to take in an optional serial_override parameter
  2. Allow that to flow through to detect_serial_flight_controllers, in which case
    platform = Platform.GenericSerial if port.device == serial_override else Detector.detect_serial_platform(port)
    
  3. Create set_serial_override and get_serial_override methods similar to these, but with just a string value
  4. Pass the get_serial_override output in via the detect call in ArduPilotManager.available_boards
  5. A nice frontend interface can come later (likely integrated as part of the BoardChangeDialog) - in the interim the value can be manually added to the configs/ardupilot-manager/settings.json file via the File Browser page.

Note: these changes would need to be done together with the existing pull request change, because otherwise non-USB options won’t be considered at all.

1 Like