Log rxBad PacketHeaders with more info (id, relay_node) like printPacket, so we can try to match RX errors to other packets in the logs. (#9614)

This commit is contained in:
Mike Robbins
2026-02-12 06:52:24 -05:00
committed by GitHub
parent 15297cb56f
commit bfbce2e314

View File

@@ -453,8 +453,11 @@ void RadioLibInterface::handleReceiveInterrupt()
}
#endif
if (state != RADIOLIB_ERR_NONE) {
LOG_ERROR("Ignore received packet due to error=%d (maybe to=0x%08x, from=0x%08x, flags=0x%02x)", state,
radioBuffer.header.to, radioBuffer.header.from, radioBuffer.header.flags);
// Log PacketHeader similar to RadioInterface::printPacket so we can try to match RX errors to other packets in the logs.
LOG_ERROR("Ignore received packet due to error=%d (maybe id=0x%08x fr=0x%08x to=0x%08x flags=0x%02x rxSNR=%g rxRSSI=%i "
"nextHop=0x%x relay=0x%x)",
state, radioBuffer.header.id, radioBuffer.header.from, radioBuffer.header.to, radioBuffer.header.flags,
iface->getSNR(), lround(iface->getRSSI()), radioBuffer.header.next_hop, radioBuffer.header.relay_node);
rxBad++;
airTime->logAirtime(RX_ALL_LOG, rxMsec);