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:
Thomas Göttgens
2024-10-14 06:11:43 +02:00
committed by GitHub
parent fb9f361052
commit 05e4a639a1
150 changed files with 1816 additions and 1800 deletions

View File

@@ -34,13 +34,13 @@ ProcessMessage DropzoneModule::handleReceived(const meshtastic_MeshPacket &mp)
auto incomingMessage = reinterpret_cast<const char *>(p.payload.bytes);
sprintf(matchCompare, "%s conditions", owner.short_name);
if (strncasecmp(incomingMessage, matchCompare, strlen(matchCompare)) == 0) {
LOG_DEBUG("Received dropzone conditions request\n");
LOG_DEBUG("Received dropzone conditions request");
startSendConditions = millis();
}
sprintf(matchCompare, "%s conditions", owner.long_name);
if (strncasecmp(incomingMessage, matchCompare, strlen(matchCompare)) == 0) {
LOG_DEBUG("Received dropzone conditions request\n");
LOG_DEBUG("Received dropzone conditions request");
startSendConditions = millis();
}
return ProcessMessage::CONTINUE;
@@ -82,10 +82,10 @@ meshtastic_MeshPacket *DropzoneModule::sendConditions()
sprintf(replyStr, "%s @ %02d:%02d:%02dz\nWind %.2f kts @ %d°\nBaro %.2f inHg %.2f°C", dropzoneStatus, hour, min, sec,
windSpeed, windDirection, baro, temp);
} else {
LOG_ERROR("No sensor found\n");
LOG_ERROR("No sensor found");
sprintf(replyStr, "%s @ %02d:%02d:%02d\nNo sensor found", dropzoneStatus, hour, min, sec);
}
LOG_DEBUG("Conditions reply: %s\n", replyStr);
LOG_DEBUG("Conditions reply: %s", replyStr);
reply->decoded.payload.size = strlen(replyStr); // You must specify how many bytes are in the reply
memcpy(reply->decoded.payload.bytes, replyStr, reply->decoded.payload.size);