Skip to content

GPS: GPS_BAUD_PROBE_LIST as a build flag for any NmeaGpsDriver; enable on Station G2/G3 - #3798

Merged
fdlamotte merged 1 commit into
meshcore-dev:devfrom
AlexandrTyshchenko:feature/gps-baud-probe-list
Nov 10, 2026
Merged

fdlamotte merged 1 commit into
meshcore-dev:devfrom
AlexandrTyshchenko:feature/gps-baud-probe-list

Conversation

@AlexandrTyshchenko

Copy link
Copy Markdown

Follow-up to the GPS baud autodetection that came in with the GPS refactor (#3753), as discussed with @cwichura and @fdlamotte in #3729. Previously opened against gps_refactor as fdlamotte#5.

What

  • GPS_BAUD_PROBE_LIST is now handled in NmeaGpsDriver.h instead of variants/promicro/target.cpp. When the flag is set, every NmeaGpsDriver that does not pass its own list gets it as the default, so a variant enables autodetection with only a build flag, no target.cpp change.
  • variants/promicro/target.cpp goes back to plain NmeaGpsDriver gps_driver(Serial1); (same behaviour as before).
  • Station G2 and Station G3: -D GPS_BAUD_PROBE_LIST=9600,115200,38400. Their Grove UART connector is commonly used with M5Stack Unit GPS modules, which default to 115200 and are not seen at the 9600 default.

The explicit NmeaGpsDriver(serial, probeBauds, count) constructor stays for boards that want their own list.

Not done

Autodetection stays opt-in per variant. Turning it on for all boards by default would add up to ~2 s per wrong rate to GPS detection at boot, and nobody can test every board / GPS chip combination.

Testing

  • Hardware: @cwichura tested on Station G3 + M5Stack Unit GPS v1.1 (Grove): module recognised, gps diag shows valid NMEA growing (ok 756 → 1458, bad 2); no fix indoors (GPS: GPS_BAUD_PROBE_LIST as a build flag for any NmeaGpsDriver; enable on Station G2/G3 fdlamotte/MeshCore#5).
  • Builds OK on dev: Station_G3_ESP32_repeater, Station_G2_repeater, ProMicro_repeater. The probe table is linked only where the flag is set.
  • Station_G3_ESP32_companion_radio_ble was already over the 1280K app partition on the gps_refactor base 544514f5 (this change adds 8 bytes).

…e 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants