From a1ac358b0a8ae2078dd5094350ba07a5614f80e1 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 1 Nov 2024 13:20:11 -0500 Subject: [PATCH] Don't try to count non-lora transmissions into airtime (or attempt to decode) (#5215) * Don't try to count non-lora transmissions into airtime (or attempt to decode) * Don't need to check utilization anymore --- src/mesh/RadioLibInterface.cpp | 9 ++++++--- src/modules/NeighborInfoModule.cpp | 4 +--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mesh/RadioLibInterface.cpp b/src/mesh/RadioLibInterface.cpp index 9bf1f27ba..3b20cda14 100644 --- a/src/mesh/RadioLibInterface.cpp +++ b/src/mesh/RadioLibInterface.cpp @@ -278,11 +278,14 @@ void RadioLibInterface::onNotify(uint32_t notification) // Send any outgoing packets we have ready meshtastic_MeshPacket *txp = txQueue.dequeue(); assert(txp); + bool isLoraTx = txp->to != NODENUM_BROADCAST_NO_LORA; startSend(txp); - // Packet has been sent, count it toward our TX airtime utilization. - uint32_t xmitMsec = getPacketTime(txp); - airTime->logAirtime(TX_LOG, xmitMsec); + if (isLoraTx) { + // Packet has been sent, count it toward our TX airtime utilization. + uint32_t xmitMsec = getPacketTime(txp); + airTime->logAirtime(TX_LOG, xmitMsec); + } } } } else { diff --git a/src/modules/NeighborInfoModule.cpp b/src/modules/NeighborInfoModule.cpp index cbf63e9af..88d434070 100644 --- a/src/modules/NeighborInfoModule.cpp +++ b/src/modules/NeighborInfoModule.cpp @@ -121,9 +121,7 @@ Will be used for broadcast. */ int32_t NeighborInfoModule::runOnce() { - if (airTime->isTxAllowedChannelUtil(true) && airTime->isTxAllowedAirUtil()) { - sendNeighborInfo(NODENUM_BROADCAST_NO_LORA, false); - } + sendNeighborInfo(NODENUM_BROADCAST_NO_LORA, false); return Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, default_neighbor_info_broadcast_secs); }