GPS: GPS_BAUD_PROBE_LIST as a build flag for any NmeaGpsDriver; enable on Station G2/G3
The probe list was wired only in variants/promicro/target.cpp. It is now the default list of NmeaGpsDriver when GPS_BAUD_PROBE_LIST is set, so a variant enables baud autodetection with a build flag alone. Station G2 and G3 enable it: their Grove UART connector is used with M5Stack Unit GPS modules, which default to 115200.
This commit is contained in:
1 parent
66d404eac8
commit
790f4d3f08
4 files changed
+16
-7
No files matched your search
@@ -12,12 +12,7 @@ VolatileRTCClock fallback_clock;
|
||||
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
||||
#if ENV_INCLUDE_GPS
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
#ifdef GPS_BAUD_PROBE_LIST // e.g. -D GPS_BAUD_PROBE_LIST=9600,38400,115200
|
||||
static const uint32_t gps_probe_bauds[] = { GPS_BAUD_PROBE_LIST };
|
||||
NmeaGpsDriver gps_driver(Serial1, gps_probe_bauds, sizeof(gps_probe_bauds) / sizeof(gps_probe_bauds[0]));
|
||||
#else
|
||||
NmeaGpsDriver gps_driver(Serial1);
|
||||
#endif
|
||||
NmeaGpsDriver gps_driver(Serial1);
|
||||
MicroNMEALocationProvider nmea(gps_driver, &rtc_clock);
|
||||
EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea);
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user