PX4-GPSDrivers icon indicating copy to clipboard operation
PX4-GPSDrivers copied to clipboard

Add Option to Toggle Automatic Receiver Setup

Open flyingthingsintothings opened this issue 1 year ago • 5 comments

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

flyingthingsintothings avatar Feb 28 '24 11:02 flyingthingsintothings

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.

flyingthingsintothings avatar Feb 28 '24 11:02 flyingthingsintothings

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.

flyingthingsintothings avatar Mar 04 '24 15:03 flyingthingsintothings

Yes correct, that's ok.

bkueng avatar Mar 05 '24 08:03 bkueng

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.

flyingthingsintothings avatar Mar 07 '24 10:03 flyingthingsintothings

For this simple change I prefer to keep them in sync right away. Once you do the change I can have a closer look.

bkueng avatar Mar 13 '24 08:03 bkueng

Closing as it is now part of https://github.com/PX4/PX4-Autopilot/pull/22904

flyingthingsintothings avatar Jun 11 '24 12:06 flyingthingsintothings