Add Option to Toggle Automatic Receiver Setup
This adds an option to disable automatic setup of the attached receiver during the configuration. It is only implemented by the SBF driver for now. Other drivers can implement it if they want. This is linked to another PR in the PX4-Autopilot project to add a parameter that lets users disable automatic driver configuration.
@SeptentrioGNSS
This is branched from an earlier version of the main branch as branching from the head of the main branch caused compilation issues when updating the submodule in the PX4-Autopilot project (due to other changes that have happened to main). I don't know what the preferred approach is to add functionality to this repository and use it in the autopilot one without getting compilation problems from the other changes.
I'm still getting used to the code. Would these be all the drivers that this would need to be implemented for?
thomas@thomas-laptop-vm-ubuntu:~/Documents/development/cpp/px4_gps_drivers/main$ grep 'int configure('
src/gps_helper.h:215: virtual int configure(unsigned &baud, const GPSConfig &config) = 0;
src/emlid_reach.h:150: int configure(unsigned &baudrate, const GPSConfig &config) override;
src/ubx.h:1002: int configure(unsigned &baudrate, const GPSConfig &config) override;
src/femtomes.h:175: int configure(unsigned &baudrate, const GPSConfig &config) override;
src/mtk.h:95: int configure(unsigned &baudrate, const GPSConfig &config) override;
src/nmea.h:70: int configure(unsigned &baudrate, const GPSConfig &config) override;
src/ashtech.h:62: int configure(unsigned &baudrate, const GPSConfig &config) override;
src/sbf.h:380: int configure(unsigned &baudrate, const GPSConfig &config) override;
Unlike for the SBF driver, I don't have access to receivers for all of the other ones, so I can't thoroughly test them. I hope that is OK? The other option would be to document that it is only supported for Septentrio receivers for now.
Yes correct, that's ok.
I was wondering whether this PR could be merged separately from the implementation for other drivers which could be its own PR? Implementing the bypass for Septentrio receivers is quite easy as I have access to hardware to test and the driver doesn't keep that much state. I don't have hardware for the other drivers and they keep lots of state. It would require a bigger PR, potentially with some help from others.
For this simple change I prefer to keep them in sync right away. Once you do the change I can have a closer look.
Closing as it is now part of https://github.com/PX4/PX4-Autopilot/pull/22904