sforkowany z mirror/meshtastic-firmware
Don't reply with null island (#1605)
rodzic
7e6c22f542
commit
de47cc55a0
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Ładowanie…
Reference in New Issue