mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-22 22:41:59 -05: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:
@@ -48,11 +48,11 @@ CannedMessageModule::CannedMessageModule()
|
||||
this->loadProtoForModule();
|
||||
if ((this->splitConfiguredMessages() <= 0) && (cardkb_found.address == 0x00) && !INPUTBROKER_MATRIX_TYPE &&
|
||||
!CANNED_MESSAGE_MODULE_ENABLE) {
|
||||
LOG_INFO("CannedMessageModule: No messages are configured. Module is disabled\n");
|
||||
LOG_INFO("CannedMessageModule: No messages are configured. Module is disabled");
|
||||
this->runState = CANNED_MESSAGE_RUN_STATE_DISABLED;
|
||||
disable();
|
||||
} else {
|
||||
LOG_INFO("CannedMessageModule is enabled\n");
|
||||
LOG_INFO("CannedMessageModule is enabled");
|
||||
|
||||
// T-Watch interface currently has no way to select destination type, so default to 'node'
|
||||
#if defined(T_WATCH_S3) || defined(RAK14014)
|
||||
@@ -112,7 +112,7 @@ int CannedMessageModule::splitConfiguredMessages()
|
||||
}
|
||||
if (strlen(this->messages[messageIndex - 1]) > 0) {
|
||||
// We have a last message.
|
||||
LOG_DEBUG("CannedMessage %d is: '%s'\n", messageIndex - 1, this->messages[messageIndex - 1]);
|
||||
LOG_DEBUG("CannedMessage %d is: '%s'", messageIndex - 1, this->messages[messageIndex - 1]);
|
||||
this->messagesCount = messageIndex;
|
||||
} else {
|
||||
this->messagesCount = messageIndex - 1;
|
||||
@@ -227,12 +227,12 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||
case INPUT_BROKER_MSG_BRIGHTNESS_UP: // make screen brighter
|
||||
if (screen)
|
||||
screen->increaseBrightness();
|
||||
LOG_DEBUG("increasing Screen Brightness\n");
|
||||
LOG_DEBUG("increasing Screen Brightness");
|
||||
break;
|
||||
case INPUT_BROKER_MSG_BRIGHTNESS_DOWN: // make screen dimmer
|
||||
if (screen)
|
||||
screen->decreaseBrightness();
|
||||
LOG_DEBUG("Decreasing Screen Brightness\n");
|
||||
LOG_DEBUG("Decreasing Screen Brightness");
|
||||
break;
|
||||
case INPUT_BROKER_MSG_FN_SYMBOL_ON: // draw modifier (function) symbal
|
||||
if (screen)
|
||||
@@ -301,7 +301,7 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||
return 0;
|
||||
default:
|
||||
// pass the pressed key
|
||||
// LOG_DEBUG("Canned message ANYKEY (%x)\n", event->kbchar);
|
||||
// LOG_DEBUG("Canned message ANYKEY (%x)", event->kbchar);
|
||||
this->payload = event->kbchar;
|
||||
this->lastTouchMillis = millis();
|
||||
validEvent = true;
|
||||
@@ -414,7 +414,7 @@ void CannedMessageModule::sendText(NodeNum dest, ChannelIndex channel, const cha
|
||||
// or raising a UIFrameEvent before another module has the chance
|
||||
this->waitingForAck = true;
|
||||
|
||||
LOG_INFO("Sending message id=%d, dest=%x, msg=%.*s\n", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes);
|
||||
LOG_INFO("Sending message id=%d, dest=%x, msg=%.*s", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes);
|
||||
|
||||
service->sendToMesh(
|
||||
p, RX_SRC_LOCAL,
|
||||
@@ -428,7 +428,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
temporaryMessage = "";
|
||||
return INT32_MAX;
|
||||
}
|
||||
// LOG_DEBUG("Check status\n");
|
||||
// LOG_DEBUG("Check status");
|
||||
UIFrameEvent e;
|
||||
if ((this->runState == CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE) ||
|
||||
(this->runState == CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED) || (this->runState == CANNED_MESSAGE_RUN_STATE_MESSAGE)) {
|
||||
@@ -481,7 +481,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
}
|
||||
this->runState = CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE;
|
||||
} else {
|
||||
// LOG_DEBUG("Reset message is empty.\n");
|
||||
// LOG_DEBUG("Reset message is empty.");
|
||||
this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;
|
||||
}
|
||||
}
|
||||
@@ -498,7 +498,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
return 2000;
|
||||
} else if ((this->runState != CANNED_MESSAGE_RUN_STATE_FREETEXT) && (this->currentMessageIndex == -1)) {
|
||||
this->currentMessageIndex = 0;
|
||||
LOG_DEBUG("First touch (%d):%s\n", this->currentMessageIndex, this->getCurrentMessage());
|
||||
LOG_DEBUG("First touch (%d):%s", this->currentMessageIndex, this->getCurrentMessage());
|
||||
e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen
|
||||
this->runState = CANNED_MESSAGE_RUN_STATE_ACTIVE;
|
||||
} else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_UP) {
|
||||
@@ -512,7 +512,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
#endif
|
||||
|
||||
this->runState = CANNED_MESSAGE_RUN_STATE_ACTIVE;
|
||||
LOG_DEBUG("MOVE UP (%d):%s\n", this->currentMessageIndex, this->getCurrentMessage());
|
||||
LOG_DEBUG("MOVE UP (%d):%s", this->currentMessageIndex, this->getCurrentMessage());
|
||||
}
|
||||
} else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_DOWN) {
|
||||
if (this->messagesCount > 0) {
|
||||
@@ -525,7 +525,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
#endif
|
||||
|
||||
this->runState = CANNED_MESSAGE_RUN_STATE_ACTIVE;
|
||||
LOG_DEBUG("MOVE DOWN (%d):%s\n", this->currentMessageIndex, this->getCurrentMessage());
|
||||
LOG_DEBUG("MOVE DOWN (%d):%s", this->currentMessageIndex, this->getCurrentMessage());
|
||||
}
|
||||
} else if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT || this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) {
|
||||
switch (this->payload) {
|
||||
@@ -1206,13 +1206,13 @@ AdminMessageHandleResult CannedMessageModule::handleAdminMessageForModule(const
|
||||
|
||||
switch (request->which_payload_variant) {
|
||||
case meshtastic_AdminMessage_get_canned_message_module_messages_request_tag:
|
||||
LOG_DEBUG("Client is getting radio canned messages\n");
|
||||
LOG_DEBUG("Client is getting radio canned messages");
|
||||
this->handleGetCannedMessageModuleMessages(mp, response);
|
||||
result = AdminMessageHandleResult::HANDLED_WITH_RESPONSE;
|
||||
break;
|
||||
|
||||
case meshtastic_AdminMessage_set_canned_message_module_messages_tag:
|
||||
LOG_DEBUG("Client is setting radio canned messages\n");
|
||||
LOG_DEBUG("Client is setting radio canned messages");
|
||||
this->handleSetCannedMessageModuleMessages(request->set_canned_message_module_messages);
|
||||
result = AdminMessageHandleResult::HANDLED;
|
||||
break;
|
||||
@@ -1227,7 +1227,7 @@ AdminMessageHandleResult CannedMessageModule::handleAdminMessageForModule(const
|
||||
void CannedMessageModule::handleGetCannedMessageModuleMessages(const meshtastic_MeshPacket &req,
|
||||
meshtastic_AdminMessage *response)
|
||||
{
|
||||
LOG_DEBUG("*** handleGetCannedMessageModuleMessages\n");
|
||||
LOG_DEBUG("*** handleGetCannedMessageModuleMessages");
|
||||
if (req.decoded.want_response) {
|
||||
response->which_payload_variant = meshtastic_AdminMessage_get_canned_message_module_messages_response_tag;
|
||||
strncpy(response->get_canned_message_module_messages_response, cannedMessageModuleConfig.messages,
|
||||
@@ -1242,7 +1242,7 @@ void CannedMessageModule::handleSetCannedMessageModuleMessages(const char *from_
|
||||
if (*from_msg) {
|
||||
changed |= strcmp(cannedMessageModuleConfig.messages, from_msg);
|
||||
strncpy(cannedMessageModuleConfig.messages, from_msg, sizeof(cannedMessageModuleConfig.messages));
|
||||
LOG_DEBUG("*** from_msg.text:%s\n", from_msg);
|
||||
LOG_DEBUG("*** from_msg.text:%s", from_msg);
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
|
||||
Reference in New Issue
Block a user