fix(gps): power saving put the receiver back to sleep before a new fix

MicroNMEA's valid flag survives a power cycle, so the duty cycle saw the
old fix right after waking the receiver and stopped it again a tick
later: with GPS power saving on the position never updated. begin() now
clears the parser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-12 17:48:58 +02:00
co-authored by Claude Opus 5.5
parent bca926eee2
commit fd45c2219b
@@ -86,6 +86,10 @@ public :
#ifdef GPS_SKYVIEW
_sky.reset(); // restarts the time-to-first-fix clock
#endif
// MicroNMEA's valid flag is sticky: without this the fix from before the
// last stop() still reads valid, and the GPS duty cycle put the receiver
// back to sleep a tick after waking it, before any new position came in.
nmea.clear();
claim();
if (_pin_en != -1) {
digitalWrite(_pin_en, GPS_EN_ACTIVE);