mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 03:00:56 +00:00
Throttle GPS initial position warning
This commit is contained in:
@@ -428,8 +428,9 @@ int32_t PositionModule::runOnce()
|
||||
bool waitingForFreshPosition = (lastGpsSend == 0) && !config.position.fixed_position && !nodeDB->hasLocalPositionSinceBoot();
|
||||
|
||||
if (lastGpsSend == 0 || msSinceLastSend >= intervalMs) {
|
||||
if (waitingForFreshPosition) {
|
||||
if (waitingForFreshPosition && !Throttle::isWithinTimespanMs(lastWarn, ONE_MINUTE_MS)) {
|
||||
LOG_DEBUG("Skip initial position send; no fresh position since boot");
|
||||
lastWarn = now;
|
||||
} else if (nodeDB->hasValidPosition(node)) {
|
||||
lastGpsSend = now;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user