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:
Olexandr Tyshchenko committed 2026-11-10 23:51:29 +02:00
1 parent 66d404eac8
commit 790f4d3f08
4 files changed
+16 -7

No files matched your search

+1 -6
View File
@@ -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
+1
View File
@@ -25,6 +25,7 @@ build_flags =
-D PIN_USER_BTN=38
-D PIN_GPS_RX=15
-D PIN_GPS_TX=7
-D GPS_BAUD_PROBE_LIST=9600,115200,38400 ; Grove UART GPS units (e.g. M5Stack Unit GPS v1.1) default to 115200
-D SX126X_DIO2_AS_RF_SWITCH=true
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140
+1
View File
@@ -29,6 +29,7 @@ build_flags =
-D PIN_USER_BTN=38
-D PIN_GPS_RX=15
-D PIN_GPS_TX=7
-D GPS_BAUD_PROBE_LIST=9600,115200,38400 ; Grove UART GPS units (e.g. M5Stack Unit GPS v1.1) default to 115200
-D SX126X_DIO2_AS_RF_SWITCH=true
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140