Re-order GPS check to eliminate TOO old message (#3152)
This commit is contained in:
co-authored by
GitHub
parent
9586c68c65
commit
af5ac32048
+4
-4
@@ -1115,6 +1115,10 @@ bool GPS::lookForLocation()
|
|||||||
reader.date.age(), reader.time.age());
|
reader.date.age(), reader.time.age());
|
||||||
#endif // GPS_EXTRAVERBOSE
|
#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
|
// check if a complete GPS solution set is available for reading
|
||||||
// tinyGPSDatum::age() also includes isValid() test
|
// tinyGPSDatum::age() also includes isValid() test
|
||||||
// FIXME
|
// FIXME
|
||||||
@@ -1127,10 +1131,6 @@ bool GPS::lookForLocation()
|
|||||||
return false;
|
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
|
// We know the solution is fresh and valid, so just read the data
|
||||||
auto loc = reader.location.value();
|
auto loc = reader.location.value();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user