Skip to content

Commit

Permalink
Don't try to count non-lora transmissions into airtime (or attempt to…
Browse files Browse the repository at this point in the history
… decode) (#5215)

* Don't try to count non-lora transmissions into airtime (or attempt to decode)

* Don't need to check utilization anymore
  • Loading branch information
thebentern authored Nov 1, 2024
1 parent 8462d65 commit a1ac358
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/mesh/RadioLibInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 1 addition & 3 deletions src/modules/NeighborInfoModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a1ac358

Please sign in to comment.