Remove auto GPS shutoff for fixed position nodes (#2720)

This commit is contained in:
code8buster 2023-08-13 20:56:49 +00:00 committed by GitHub
parent a3d2b6166c
commit fcfd83bc89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -805,15 +805,6 @@ int32_t GPS::runOnce()
// If state has changed do a publish
publishUpdate();
if (!(fixeddelayCtr >= 20) && config.position.fixed_position && hasValidLocation) {
fixeddelayCtr++;
// LOG_DEBUG("Our delay counter is %d\n", fixeddelayCtr);
if (fixeddelayCtr >= 20) {
doGPSpowersave(false);
forceWake(false);
}
}
// 9600bps is approx 1 byte per msec, so considering our buffer size we never need to wake more often than 200ms
// if not awake we can run super infrquently (once every 5 secs?) to see if we need to wake.
return isAwake ? GPS_THREAD_INTERVAL : 5000;