NmeaGpsDriver: baud rates to probe come from the board, not a build flag

This commit is contained in:
Olexandr Tyshchenko committed 2026-11-09 22:59:47 +02:00
1 parent 4069f4809c
commit cbfa66df9d
2 files changed
+40 -27

No files matched your search

+6 -1
View File
@@ -12,7 +12,12 @@ VolatileRTCClock fallback_clock;
AutoDiscoverRTCClock rtc_clock(fallback_clock);
#if ENV_INCLUDE_GPS
#include <helpers/sensors/MicroNMEALocationProvider.h>
NmeaGpsDriver gps_driver(Serial1);
#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
MicroNMEALocationProvider nmea(gps_driver, &rtc_clock);
EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea);
#else