mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Fix LOG_DEBUG messages when no DEBUG_PORT. (#2485)
* Fix LOG_DEBUG messages when no DEBUG_PORT. * Fix LOG_DEBUG messages when no DEBUG_PORT. * Fix LOG_DEBUG messages when no DEBUG_PORT. * Fix LOG_DEBUG messages when no DEBUG_PORT.
This commit is contained in:
@@ -241,6 +241,7 @@ uint32_t RadioInterface::getTxDelayMsecWeighted(float snr)
|
||||
|
||||
void printPacket(const char *prefix, const meshtastic_MeshPacket *p)
|
||||
{
|
||||
#ifdef DEBUG_PORT
|
||||
std::string out = DEBUG_PORT.mt_sprintf("%s (id=0x%08x fr=0x%02x to=0x%02x, WantAck=%d, HopLim=%d Ch=0x%x", prefix, p->id,
|
||||
p->from & 0xff, p->to & 0xff, p->want_ack, p->hop_limit, p->channel);
|
||||
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
|
||||
@@ -283,6 +284,7 @@ void printPacket(const char *prefix, const meshtastic_MeshPacket *p)
|
||||
|
||||
out += ")";
|
||||
LOG_DEBUG("%s\n", out.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
RadioInterface::RadioInterface()
|
||||
|
||||
Reference in New Issue
Block a user