mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-15 07:51:19 +10:00
Add search duration check for exceeding 15 minutes
Added a condition to check if the search duration exceeds 15 minutes, indicating too long of a search.
This commit is contained in:
@@ -81,6 +81,10 @@ bool GPSUpdateScheduling::searchedTooLong()
|
||||
else if (elapsedSearchMs() > maxSearchMs)
|
||||
return true;
|
||||
|
||||
// Anything over 15 minutes is too long. TODO: Make a smarter algorithm that backs off the search dwell time when not getting a lock.
|
||||
else if (elapsedSearchMs() > 1000 * 60 * 15)
|
||||
return true;
|
||||
|
||||
// Otherwise, not too long yet!
|
||||
else
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user