mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-27 18:31:37 +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);
|
setIntervalFromNow(35 * 1000);
|
||||||
} else {
|
} else {
|
||||||
LOG_DEBUG("NeighborInfoModule is disabled\n");
|
LOG_DEBUG("NeighborInfoModule is disabled\n");
|
||||||
neighborState = meshtastic_NeighborInfo_init_zero;
|
|
||||||
disable();
|
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)
|
bool NeighborInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_NeighborInfo *np)
|
||||||
{
|
{
|
||||||
|
if (enabled) {
|
||||||
printNeighborInfo("RECEIVED", np);
|
printNeighborInfo("RECEIVED", np);
|
||||||
updateNeighbors(mp, np);
|
updateNeighbors(mp, np);
|
||||||
|
}
|
||||||
// Allow others to handle this packet
|
// Allow others to handle this packet
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user