mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-16 07:42:37 +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:
@@ -31,12 +31,13 @@ int32_t DeviceTelemetryModule::runOnce()
|
||||
bool DeviceTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t)
|
||||
{
|
||||
if (t->which_variant == meshtastic_Telemetry_device_metrics_tag) {
|
||||
#ifdef DEBUG_PORT
|
||||
const char *sender = getSenderShortName(mp);
|
||||
|
||||
LOG_INFO("(Received from %s): air_util_tx=%f, channel_utilization=%f, battery_level=%i, voltage=%f\n", sender,
|
||||
t->variant.device_metrics.air_util_tx, t->variant.device_metrics.channel_utilization,
|
||||
t->variant.device_metrics.battery_level, t->variant.device_metrics.voltage);
|
||||
|
||||
#endif
|
||||
nodeDB.updateTelemetry(getFrom(&mp), *t, RX_SRC_RADIO);
|
||||
}
|
||||
return false; // Let others look at this message also if they want
|
||||
|
||||
Reference in New Issue
Block a user