mirror of
https://github.com/meshtastic/firmware.git
synced 2026-06-06 07:45:42 -04:00
Update GPS.cpp
This commit is contained in:
@@ -557,6 +557,7 @@ bool GPS::loadProbeCache() {
|
||||
#ifdef FSCom
|
||||
// Load the last known-good GPS model/baud pair so we can avoid a full probe
|
||||
// sweep on every boot.
|
||||
triedProbeCache = true; // Latch this boot's load attempt, even if no cache.
|
||||
GPSProbeCacheRecord record = {};
|
||||
size_t bytesRead = 0;
|
||||
|
||||
@@ -576,6 +577,7 @@ bool GPS::loadProbeCache() {
|
||||
(record.reserved == 0U);
|
||||
if (!headerValid || !isValidGnssModel(record.model) ||
|
||||
!isValidProbeBaud(record.baud)) {
|
||||
clearProbeCache(); // Drop corrupt/invalid cache so next boot can recover.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user