Add informSearchFailed method to update GPS power state handling (#10394)

This commit is contained in:
Ben Meadors
2026-05-05 10:12:50 -05:00
committed by GitHub
parent d559af8477
commit 603cce2988
3 changed files with 17 additions and 3 deletions
+10
View File
@@ -17,6 +17,16 @@ void GPSUpdateScheduling::informGotLock()
updateLockTimePrediction();
}
// Search finished without obtaining a fix. We still need to mark the end time so
// the next sleep is timed correctly, but we must not feed the timeout duration
// into predictedMsToGetLock — doing so poisons msUntilNextSearch() and causes
// down() to fall into GPS_IDLE, leaving the chip awake on subsequent indoor cycles.
void GPSUpdateScheduling::informSearchFailed()
{
searchEndedMs = millis();
LOG_DEBUG("GPS search ended without fix after %us", (searchEndedMs - searchStartedMs) / 1000);
}
// Clear old lock-time prediction data.
// When re-enabling GPS with user button.
void GPSUpdateScheduling::reset()