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

This commit is contained in:
Ben Meadors 2024-11-01 09:14:33 -05:00
parent 8462d65f76
commit a7756679fb

View File

@ -278,13 +278,16 @@ void RadioLibInterface::onNotify(uint32_t notification)
// Send any outgoing packets we have ready // Send any outgoing packets we have ready
meshtastic_MeshPacket *txp = txQueue.dequeue(); meshtastic_MeshPacket *txp = txQueue.dequeue();
assert(txp); assert(txp);
bool isLoraTx = txp->to != NODENUM_BROADCAST_NO_LORA;
startSend(txp); startSend(txp);
if (isLoraTx) {
// Packet has been sent, count it toward our TX airtime utilization. // Packet has been sent, count it toward our TX airtime utilization.
uint32_t xmitMsec = getPacketTime(txp); uint32_t xmitMsec = getPacketTime(txp);
airTime->logAirtime(TX_LOG, xmitMsec); airTime->logAirtime(TX_LOG, xmitMsec);
} }
} }
}
} else { } else {
// LOG_DEBUG("done with txqueue"); // LOG_DEBUG("done with txqueue");
} }