muzi_base: fix GPS UART pins and re-enable ATGM336H NMEA output

The refactor no longer calls Serial1.setPins() on nRF52, so Serial1 uses
PIN_SERIAL1_RX/TX directly. Those were swapped (the GPS transmits on
P0.20), so no data was received. Fix them and define PIN_GPS_TX/RX by the
gps module's side, as other variants do.

The ATGM336H keeps its NMEA output config across power cycles, and other
firmware may leave every sentence disabled. Re-enable GGA + RMC after each
power-up.
This commit is contained in:
Níckolas Goline authored and Florent committed 2026-11-08 08:47:34 -04:00
1 parent 47959b8960
commit bd21096ce0
3 files changed
+20 -4

No files matched your search

+12
View File
@@ -50,6 +50,18 @@ void MuziBaseSensorManager::loop() {
_pwr_last_click = t;
if (++_pwr_clicks >= USER_BTN_POWER_OFF_CLICKS) muziPowerOff();
}
#if ENV_INCLUDE_GPS
// the ATGM336H keeps its nmea output config across power cycles (backup
// supply), and other firmware may have turned every sentence off. re-enable
// GGA + RMC after each power-up, once the module has booted.
bool gps_on = _location->isActive();
if (gps_on && !_gps_was_active) _gps_cfg_at = millis() + 1000;
_gps_was_active = gps_on;
if (_gps_cfg_at && gps_on && (long)(millis() - _gps_cfg_at) > 0) {
_gps_cfg_at = 0;
_location->sendSentence("$PCAS03,1,0,0,0,1,0,0,0,0,0,,,0,0");
}
#endif
EnvironmentSensorManager::loop();
}