diff --git a/src/mesh/MeshService.cpp b/src/mesh/MeshService.cpp index 035578d2..374fc609 100644 --- a/src/mesh/MeshService.cpp +++ b/src/mesh/MeshService.cpp @@ -168,7 +168,7 @@ void MeshService::sendNetworkPing(NodeNum dest, bool wantReplies) NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum()); assert(node); - if (node->has_position) { + if (node->has_position && (node->position.latitude_i != 0 || node->position.longitude_i != 0)) { if (positionModule) { DEBUG_MSG("Sending position ping to 0x%x, wantReplies=%d\n", dest, wantReplies); positionModule->sendOurPosition(dest, wantReplies); diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index bb42d756..3247c428 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -103,6 +103,8 @@ MeshPacket *PositionModule::allocReply() } else DEBUG_MSG("Providing time to mesh %u\n", p.time); + DEBUG_MSG("Position reply: time=%i, latI=%i, lonI=-%i\n", p.time, p.latitude_i, p.longitude_i); + return allocDataProtobuf(p); } @@ -144,7 +146,6 @@ int32_t PositionModule::runOnce() currentGeneration = radioGeneration; DEBUG_MSG("Sending pos@%x:6 to mesh (wantReplies=%d)\n", node->position.pos_timestamp, requestReplies); - sendOurPosition(NODENUM_BROADCAST, requestReplies); } } else {