mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-02 02:39:57 +00:00
Only update neighbors when module is enabled
This commit is contained in:
parent
1254031f7d
commit
cfb6a1394c
@ -203,8 +203,10 @@ Pass it to an upper client; do not persist this data on the mesh
|
|||||||
*/
|
*/
|
||||||
bool NeighborInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_NeighborInfo *np)
|
bool NeighborInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_NeighborInfo *np)
|
||||||
{
|
{
|
||||||
printNeighborInfo("RECEIVED", np);
|
if (enabled) {
|
||||||
updateNeighbors(mp, np);
|
printNeighborInfo("RECEIVED", np);
|
||||||
|
updateNeighbors(mp, np);
|
||||||
|
}
|
||||||
// Allow others to handle this packet
|
// Allow others to handle this packet
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -307,4 +309,4 @@ bool NeighborInfoModule::saveProtoForModule()
|
|||||||
okay &= nodeDB.saveProto(neighborInfoConfigFile, meshtastic_NeighborInfo_size, &meshtastic_NeighborInfo_msg, &neighborState);
|
okay &= nodeDB.saveProto(neighborInfoConfigFile, meshtastic_NeighborInfo_size, &meshtastic_NeighborInfo_msg, &neighborState);
|
||||||
|
|
||||||
return okay;
|
return okay;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user