Merge branch 'master' into neighborinfo

This commit is contained in:
Ben Meadors
2023-07-25 16:14:50 -05:00
committed by GitHub
7 changed files with 27 additions and 5 deletions

View File

@@ -52,11 +52,22 @@ bool PositionModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes
nodeDB.updatePosition(getFrom(&mp), p);
// Only respond to location requests on the channel where we broadcast location.
if (channels.getByIndex(mp.channel).role == meshtastic_Channel_Role_PRIMARY) {
ignoreRequest = false;
} else {
ignoreRequest = true;
}
return false; // Let others look at this message also if they want
}
meshtastic_MeshPacket *PositionModule::allocReply()
{
if (ignoreRequest) {
return NULL;
}
meshtastic_NodeInfoLite *node = service.refreshLocalMeshNode(); // should guarantee there is now a position
assert(node->has_position);