For our first position send on boot, validate that we have received a fresh position (#9023)

This commit is contained in:
Ben Meadors
2025-12-20 07:01:00 -06:00
committed by GitHub
parent 31e55d0b66
commit 661f49ad7a
4 changed files with 20 additions and 1 deletions

View File

@@ -276,6 +276,10 @@ bool MeshService::trySendPosition(NodeNum dest, bool wantReplies)
if (nodeDB->hasValidPosition(node)) {
#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS
if (positionModule) {
if (!config.position.fixed_position && !nodeDB->hasLocalPositionSinceBoot()) {
LOG_DEBUG("Skip position ping; no fresh position since boot");
return false;
}
LOG_INFO("Send position ping to 0x%x, wantReplies=%d, channel=%d", dest, wantReplies, node->channel);
positionModule->sendOurPosition(dest, wantReplies, node->channel);
return true;