mirror of
https://github.com/meshtastic/firmware.git
synced 2026-03-24 18:13:02 -04:00
remove newline from logging statements. (#5022)
remove newline from logging statements in code. The LOG_* functions will now magically add it at the end. --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -29,7 +29,7 @@ bool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes
|
||||
if (hasChanged && !wasBroadcast && !isToUs(&mp))
|
||||
service->sendToPhone(packetPool.allocCopy(mp));
|
||||
|
||||
// LOG_DEBUG("did handleReceived\n");
|
||||
// LOG_DEBUG("did handleReceived");
|
||||
return false; // Let others look at this message also if they want
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ void NodeInfoModule::sendOurNodeInfo(NodeNum dest, bool wantReplies, uint8_t cha
|
||||
else
|
||||
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
|
||||
if (channel > 0) {
|
||||
LOG_DEBUG("sending ourNodeInfo to channel %d\n", channel);
|
||||
LOG_DEBUG("sending ourNodeInfo to channel %d", channel);
|
||||
p->channel = channel;
|
||||
}
|
||||
|
||||
@@ -65,23 +65,23 @@ meshtastic_MeshPacket *NodeInfoModule::allocReply()
|
||||
{
|
||||
if (!airTime->isTxAllowedChannelUtil(false)) {
|
||||
ignoreRequest = true; // Mark it as ignored for MeshModule
|
||||
LOG_DEBUG("Skip sending NodeInfo due to > 40 percent channel util.\n");
|
||||
LOG_DEBUG("Skip sending NodeInfo due to > 40 percent channel util.");
|
||||
return NULL;
|
||||
}
|
||||
// If we sent our NodeInfo less than 5 min. ago, don't send it again as it may be still underway.
|
||||
if (!shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 5 * 60 * 1000)) {
|
||||
LOG_DEBUG("Skip sending NodeInfo since we just sent it less than 5 minutes ago.\n");
|
||||
LOG_DEBUG("Skip sending NodeInfo since we just sent it less than 5 minutes ago.");
|
||||
ignoreRequest = true; // Mark it as ignored for MeshModule
|
||||
return NULL;
|
||||
} else if (shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 60 * 1000)) {
|
||||
LOG_DEBUG("Skip sending actively requested NodeInfo since we just sent it less than 60 seconds ago.\n");
|
||||
LOG_DEBUG("Skip sending actively requested NodeInfo since we just sent it less than 60 seconds ago.");
|
||||
ignoreRequest = true; // Mark it as ignored for MeshModule
|
||||
return NULL;
|
||||
} else {
|
||||
ignoreRequest = false; // Don't ignore requests anymore
|
||||
meshtastic_User &u = owner;
|
||||
|
||||
LOG_INFO("sending owner %s/%s/%s\n", u.id, u.long_name, u.short_name);
|
||||
LOG_INFO("sending owner %s/%s/%s", u.id, u.long_name, u.short_name);
|
||||
lastSentToMesh = millis();
|
||||
return allocDataProtobuf(u);
|
||||
}
|
||||
@@ -102,7 +102,7 @@ int32_t NodeInfoModule::runOnce()
|
||||
currentGeneration = radioGeneration;
|
||||
|
||||
if (airTime->isTxAllowedAirUtil() && config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_HIDDEN) {
|
||||
LOG_INFO("Sending our nodeinfo to mesh (wantReplies=%d)\n", requestReplies);
|
||||
LOG_INFO("Sending our nodeinfo to mesh (wantReplies=%d)", requestReplies);
|
||||
sendOurNodeInfo(NODENUM_BROADCAST, requestReplies); // Send our info (don't request replies)
|
||||
}
|
||||
return Default::getConfiguredOrDefaultMs(config.device.node_info_broadcast_secs, default_node_info_broadcast_secs);
|
||||
|
||||
Reference in New Issue
Block a user