Don't send node info interrogation when ch. util is >25% (#4273)

This commit is contained in:
Ben Meadors 2024-07-12 11:48:35 -05:00 committed by GitHub
parent 699d37b04c
commit 0fa9974518
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,7 +94,11 @@ int MeshService::handleFromRadio(const meshtastic_MeshPacket *mp)
} else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user &&
nodeInfoModule) {
LOG_INFO("Heard a node on channel %d we don't know, sending NodeInfo and asking for a response.\n", mp->channel);
nodeInfoModule->sendOurNodeInfo(mp->from, true, mp->channel);
if (airTime->isTxAllowedChannelUtil(true)) {
nodeInfoModule->sendOurNodeInfo(mp->from, true, mp->channel);
} else {
LOG_DEBUG("Skip sending NodeInfo due to > 25 percent channel util.\n");
}
}
printPacket("Forwarding to phone", mp);