mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 01:52:48 +00:00
Merge pull request #2775 from GUVWAF/disabledNeighbor
Only update neighbors when module is enabled
This commit is contained in:
commit
899f9dd7bf
@ -99,7 +99,6 @@ NeighborInfoModule::NeighborInfoModule()
|
||||
setIntervalFromNow(35 * 1000);
|
||||
} else {
|
||||
LOG_DEBUG("NeighborInfoModule is disabled\n");
|
||||
neighborState = meshtastic_NeighborInfo_init_zero;
|
||||
disable();
|
||||
}
|
||||
}
|
||||
@ -203,8 +202,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)
|
||||
{
|
||||
if (enabled) {
|
||||
printNeighborInfo("RECEIVED", np);
|
||||
updateNeighbors(mp, np);
|
||||
}
|
||||
// Allow others to handle this packet
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user