mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
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:
@@ -86,6 +86,10 @@ public :
|
|||||||
#ifdef GPS_SKYVIEW
|
#ifdef GPS_SKYVIEW
|
||||||
_sky.reset(); // restarts the time-to-first-fix clock
|
_sky.reset(); // restarts the time-to-first-fix clock
|
||||||
#endif
|
#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();
|
claim();
|
||||||
if (_pin_en != -1) {
|
if (_pin_en != -1) {
|
||||||
digitalWrite(_pin_en, GPS_EN_ACTIVE);
|
digitalWrite(_pin_en, GPS_EN_ACTIVE);
|
||||||
|
|||||||
Reference in New Issue
Block a user