Remove gps_attempt_time and use broadcast interval instead (#3064)

This commit is contained in:
Ben Meadors
2024-01-07 09:35:19 -06:00
committed by GitHub
parent c2afa879b8
commit ea651c2f8f
4 changed files with 4 additions and 10 deletions

View File

@@ -596,11 +596,12 @@ void GPS::setAwake(bool on)
*/
uint32_t GPS::getWakeTime() const
{
uint32_t t = config.position.gps_attempt_time;
uint32_t t = config.position.position_broadcast_secs;
if (t == UINT32_MAX)
return t; // already maxint
return t * 1000;
return getConfiguredOrDefaultMs(t, default_broadcast_interval_secs);
}
/** Get how long we should sleep between aqusition attempts in msecs

View File

@@ -70,7 +70,7 @@ class GPS : private concurrency::OSThread
/**
* hasValidLocation - indicates that the position variables contain a complete
* GPS location, valid and fresh (< gps_update_interval + gps_attempt_time)
* GPS location, valid and fresh (< gps_update_interval + position_broadcast_secs)
*/
bool hasValidLocation = false; // default to false, until we complete our first read