Throttle GPS initial position warning

This commit is contained in:
Jonathan Bennett
2025-12-21 21:59:29 -06:00
parent 5a3855b208
commit 954e600448
2 changed files with 3 additions and 1 deletions

View File

@@ -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;