Re-order GPS check to eliminate TOO old message (#3152)

This commit is contained in:
Jonathan Bennett 2024-01-30 17:44:08 -06:00 committed by GitHub
parent 9586c68c65
commit af5ac32048
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1115,6 +1115,10 @@ bool GPS::lookForLocation()
reader.date.age(), reader.time.age());
#endif // GPS_EXTRAVERBOSE
// Is this a new point or are we re-reading the previous one?
if (!reader.location.isUpdated())
return false;
// check if a complete GPS solution set is available for reading
// tinyGPSDatum::age() also includes isValid() test
// FIXME
@ -1127,10 +1131,6 @@ bool GPS::lookForLocation()
return false;
}
// Is this a new point or are we re-reading the previous one?
if (!reader.location.isUpdated())
return false;
// We know the solution is fresh and valid, so just read the data
auto loc = reader.location.value();