diff --git a/src/AmbientLightingThread.h b/src/AmbientLightingThread.h index 07764e66e2..99e964e6a4 100644 --- a/src/AmbientLightingThread.h +++ b/src/AmbientLightingThread.h @@ -106,27 +106,27 @@ class AmbientLightingThread : public concurrency::OSThread rgb.setRed(0); rgb.setGreen(0); rgb.setBlue(0); - LOG_INFO("Turn Off NCP5623 Ambient lighting."); + LOG_INFO("Turn Off NCP5623 Ambient lighting"); #endif #ifdef HAS_NEOPIXEL pixels.clear(); pixels.show(); - LOG_INFO("Turn Off NeoPixel Ambient lighting."); + LOG_INFO("Turn Off NeoPixel Ambient lighting"); #endif #ifdef RGBLED_CA analogWrite(RGBLED_RED, 255 - 0); analogWrite(RGBLED_GREEN, 255 - 0); analogWrite(RGBLED_BLUE, 255 - 0); - LOG_INFO("Turn Off Ambient lighting RGB Common Anode."); + LOG_INFO("Turn Off Ambient lighting RGB Common Anode"); #elif defined(RGBLED_RED) analogWrite(RGBLED_RED, 0); analogWrite(RGBLED_GREEN, 0); analogWrite(RGBLED_BLUE, 0); - LOG_INFO("Turn Off Ambient lighting RGB Common Cathode."); + LOG_INFO("Turn Off Ambient lighting RGB Common Cathode"); #endif #ifdef UNPHONE unphone.rgb(0, 0, 0); - LOG_INFO("Turn Off unPhone Ambient lighting."); + LOG_INFO("Turn Off unPhone Ambient lighting"); #endif return 0; } @@ -183,4 +183,4 @@ class AmbientLightingThread : public concurrency::OSThread } }; -} // namespace concurrency \ No newline at end of file +} // namespace concurrency diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index a6bf32b5a5..be68728eac 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -237,7 +237,7 @@ GPS_RESPONSE GPS::getACKCas(uint8_t class_id, uint8_t msg_id, uint32_t waitMilli // Check for an ACK-ACK for the specified class and message id if ((msg_cls == 0x05) && (msg_msg_id == 0x01) && payload_cls == class_id && payload_msg == msg_id) { #ifdef GPS_DEBUG - LOG_INFO("Got ACK for class %02X message %02X in %d millis.", class_id, msg_id, millis() - startTime); + LOG_INFO("Got ACK for class %02X message %02X in %dms", class_id, msg_id, millis() - startTime); #endif return GNSS_RESPONSE_OK; } @@ -245,7 +245,7 @@ GPS_RESPONSE GPS::getACKCas(uint8_t class_id, uint8_t msg_id, uint32_t waitMilli // Check for an ACK-NACK for the specified class and message id if ((msg_cls == 0x05) && (msg_msg_id == 0x00) && payload_cls == class_id && payload_msg == msg_id) { #ifdef GPS_DEBUG - LOG_WARN("Got NACK for class %02X message %02X in %d millis.", class_id, msg_id, millis() - startTime); + LOG_WARN("Got NACK for class %02X message %02X in %dms", class_id, msg_id, millis() - startTime); #endif return GNSS_RESPONSE_NAK; } @@ -286,7 +286,7 @@ GPS_RESPONSE GPS::getACK(uint8_t class_id, uint8_t msg_id, uint32_t waitMillis) while (Throttle::isWithinTimespanMs(startTime, waitMillis)) { if (ack > 9) { #ifdef GPS_DEBUG - LOG_INFO("Got ACK for class %02X message %02X in %d millis.", class_id, msg_id, millis() - startTime); + LOG_INFO("Got ACK for class %02X message %02X in %dms", class_id, msg_id, millis() - startTime); #endif return GNSS_RESPONSE_OK; // ACK received } @@ -396,8 +396,7 @@ int GPS::getACK(uint8_t *buffer, uint16_t size, uint8_t requestedClass, uint8_t } else { // return payload length #ifdef GPS_DEBUG - LOG_INFO("Got ACK for class %02X message %02X in %d millis.", requestedClass, requestedID, - millis() - startTime); + LOG_INFO("Got ACK for class %02X message %02X in %dms", requestedClass, requestedID, millis() - startTime); #endif return needRead; } @@ -584,7 +583,7 @@ bool GPS::setup() msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE); _serial_gps->write(UBXscratch, msglen); if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to save GNSS module config."); + LOG_WARN("Unable to save GNSS module config"); } else { LOG_INFO("GNSS module config saved!"); } @@ -603,9 +602,9 @@ bool GPS::setup() LOG_DEBUG("reconfigure GNSS - defaults maintained. Is this module GPS-only?"); } else { if (gnssModel == GNSS_MODEL_UBLOX7) { - LOG_INFO("GPS+SBAS configured."); + LOG_INFO("GPS+SBAS configured"); } else { // 8,9 - LOG_INFO("GPS+SBAS+GLONASS+Galileo configured."); + LOG_INFO("GPS+SBAS+GLONASS+Galileo configured"); } // Documentation say, we need wait atleast 0.5s after reconfiguration of GNSS module, before sending next // commands for the M8 it tends to be more... 1 sec should be enough ;>) @@ -653,7 +652,7 @@ bool GPS::setup() msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE); _serial_gps->write(UBXscratch, msglen); if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to save GNSS module configuration."); + LOG_WARN("Unable to save GNSS module config"); } else { LOG_INFO("GNSS module configuration saved!"); } @@ -701,7 +700,7 @@ bool GPS::setup() msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE_10), _message_SAVE_10); _serial_gps->write(UBXscratch, msglen); if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) { - LOG_WARN("Unable to save GNSS module configuration."); + LOG_WARN("Unable to save GNSS module config"); } else { LOG_INFO("GNSS module configuration saved!"); } @@ -795,7 +794,7 @@ void GPS::writePinEN(bool on) // Write and log enablePin->set(on); #ifdef GPS_DEBUG - LOG_DEBUG("Pin EN %s", val == HIGH ? "HIGH" : "LOW"); + LOG_DEBUG("Pin EN %s", val == HIGH ? "HI" : "LOW"); #endif } @@ -817,7 +816,7 @@ void GPS::writePinStandby(bool standby) pinMode(PIN_GPS_STANDBY, OUTPUT); digitalWrite(PIN_GPS_STANDBY, val); #ifdef GPS_DEBUG - LOG_DEBUG("Pin STANDBY %s", val == HIGH ? "HIGH" : "LOW"); + LOG_DEBUG("Pin STANDBY %s", val == HIGH ? "HI" : "LOW"); #endif #endif } @@ -985,7 +984,7 @@ int32_t GPS::runOnce() { if (!GPSInitFinished) { if (!_serial_gps || config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT) { - LOG_INFO("GPS set to not-present. Skipping probe."); + LOG_INFO("GPS set to not-present. Skipping probe"); return disable(); } if (!setup()) @@ -1055,7 +1054,7 @@ int32_t GPS::runOnce() bool tooLong = scheduling.searchedTooLong(); if (tooLong) - LOG_WARN("Couldn't publish a valid location: didn't get a GPS lock in time."); + LOG_WARN("Couldn't publish a valid location: didn't get a GPS lock in time"); // Once we get a location we no longer desperately want an update if ((gotLoc && gotTime) || tooLong) { @@ -1505,7 +1504,7 @@ bool GPS::lookForLocation() #ifndef TINYGPS_OPTION_NO_STATISTICS if (reader.failedChecksum() > lastChecksumFailCount) { - LOG_WARN("%u new GPS checksum failures, for a total of %u.", reader.failedChecksum() - lastChecksumFailCount, + LOG_WARN("%u new GPS checksum failures, for a total of %u", reader.failedChecksum() - lastChecksumFailCount, reader.failedChecksum()); lastChecksumFailCount = reader.failedChecksum(); } @@ -1657,7 +1656,7 @@ bool GPS::whileActive() } #ifdef SERIAL_BUFFER_SIZE if (_serial_gps->available() >= SERIAL_BUFFER_SIZE - 1) { - LOG_WARN("GPS Buffer full with %u bytes waiting. Flushing to avoid corruption.", _serial_gps->available()); + LOG_WARN("GPS Buffer full with %u bytes waiting. Flushing to avoid corruption", _serial_gps->available()); clearBuffer(); } #endif @@ -1710,7 +1709,7 @@ void GPS::toggleGpsMode() { if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) { config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_DISABLED; - LOG_INFO("User toggled GpsMode. Now DISABLED."); + LOG_INFO("User toggled GpsMode. Now DISABLED"); playGPSDisableBeep(); #ifdef GNSS_AIROHA if (powerState == GPS_ACTIVE) { diff --git a/src/main.cpp b/src/main.cpp index 0ce6b3bae6..ff0d622c28 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -389,10 +389,10 @@ void setup() Wire.begin(I2C_SDA, I2C_SCL); #elif defined(ARCH_PORTDUINO) if (settingsStrings[i2cdev] != "") { - LOG_INFO("Using %s as I2C device.", settingsStrings[i2cdev].c_str()); + LOG_INFO("Using %s as I2C device", settingsStrings[i2cdev].c_str()); Wire.begin(settingsStrings[i2cdev].c_str()); } else { - LOG_INFO("No I2C device configured, skipping."); + LOG_INFO("No I2C device configured, skipping"); } #elif HAS_WIRE Wire.begin(); @@ -770,7 +770,7 @@ void setup() if (gps) { gpsStatus->observe(&gps->newStatus); } else { - LOG_DEBUG("Running without GPS."); + LOG_DEBUG("Running without GPS"); } } } @@ -1070,7 +1070,7 @@ void setup() // check if the radio chip matches the selected region if ((config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && (!rIf->wideLora())) { - LOG_WARN("Radio chip does not support 2.4GHz LoRa. Reverting to unset."); + LOG_WARN("LoRa chip does not support 2.4GHz. Reverting to unset"); config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET; nodeDB->saveToDisk(SEGMENT_CONFIG); if (!rIf->reconfigure()) { diff --git a/src/mesh/CryptoEngine.cpp b/src/mesh/CryptoEngine.cpp index 282013ea01..f086e26ab1 100644 --- a/src/mesh/CryptoEngine.cpp +++ b/src/mesh/CryptoEngine.cpp @@ -18,7 +18,7 @@ */ void CryptoEngine::generateKeyPair(uint8_t *pubKey, uint8_t *privKey) { - LOG_DEBUG("Generating Curve25519 key pair..."); + LOG_DEBUG("Generating Curve25519 keypair"); Curve25519::dh1(public_key, private_key); memcpy(pubKey, public_key, sizeof(public_key)); memcpy(privKey, private_key, sizeof(private_key)); @@ -249,4 +249,4 @@ void CryptoEngine::initNonce(uint32_t fromNode, uint64_t packetId, uint32_t extr } #ifndef HAS_CUSTOM_CRYPTO_ENGINE CryptoEngine *crypto = new CryptoEngine; -#endif \ No newline at end of file +#endif diff --git a/src/mesh/FloodingRouter.cpp b/src/mesh/FloodingRouter.cpp index 6760d70ebf..d7550ec62b 100644 --- a/src/mesh/FloodingRouter.cpp +++ b/src/mesh/FloodingRouter.cpp @@ -46,7 +46,7 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas bool isAckorReply = (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) && (p->decoded.request_id != 0); if (isAckorReply && !isToUs(p) && !isBroadcast(p->to)) { // do not flood direct message that is ACKed or replied to - LOG_DEBUG("Rxd an ACK/reply not for me, cancel rebroadcast."); + LOG_DEBUG("Rxd an ACK/reply not for me, cancel rebroadcast"); Router::cancelSending(p->to, p->decoded.request_id); // cancel rebroadcast for this DM } if (!isToUs(p) && (p->hop_limit > 0) && !isFromUs(p)) { @@ -76,4 +76,4 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas } // handle the packet as normal Router::sniffReceived(p, c); -} \ No newline at end of file +} diff --git a/src/mesh/MeshService.cpp b/src/mesh/MeshService.cpp index de4750653a..ea48c04060 100644 --- a/src/mesh/MeshService.cpp +++ b/src/mesh/MeshService.cpp @@ -83,15 +83,15 @@ int MeshService::handleFromRadio(const meshtastic_MeshPacket *mp) IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_ROUTER, meshtastic_Config_DeviceConfig_Role_REPEATER); if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp->decoded.portnum == meshtastic_PortNum_TELEMETRY_APP && mp->decoded.request_id > 0) { - LOG_DEBUG("Received telemetry response. Skip sending our NodeInfo."); // because this potentially a Repeater which will - // ignore our request for its NodeInfo + LOG_DEBUG("Received telemetry response. Skip sending our NodeInfo"); // because this potentially a Repeater which will + // ignore our request for its NodeInfo } else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user && nodeInfoModule && !isPreferredRebroadcaster) { if (airTime->isTxAllowedChannelUtil(true)) { - LOG_INFO("Heard new node on channel %d, sending NodeInfo and asking for a response.", mp->channel); + LOG_INFO("Heard new node on chan %d, sending NodeInfo and asking for a response", mp->channel); nodeInfoModule->sendOurNodeInfo(mp->from, true, mp->channel); } else { - LOG_DEBUG("Skip sending NodeInfo due to > 25 percent channel util."); + LOG_DEBUG("Skip sending NodeInfo due to > 25 percent chan util"); } } @@ -306,7 +306,7 @@ void MeshService::sendToPhone(meshtastic_MeshPacket *p) if (d) releaseToPool(d); } else { - LOG_WARN("ToPhone queue is full, dropping packet."); + LOG_WARN("ToPhone queue is full, dropping packet"); releaseToPool(p); fromNum++; // Make sure to notify observers in case they are reconnected so they can get the packets return; diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 247cbd2545..8f697a9494 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -1279,4 +1279,4 @@ void recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, co LOG_ERROR("A critical failure occurred, portduino is exiting..."); exit(2); #endif -} \ No newline at end of file +} diff --git a/src/mesh/PhoneAPI.cpp b/src/mesh/PhoneAPI.cpp index 88ff95760e..8e07fe7d07 100644 --- a/src/mesh/PhoneAPI.cpp +++ b/src/mesh/PhoneAPI.cpp @@ -449,7 +449,7 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf) void PhoneAPI::sendConfigComplete() { - LOG_INFO("Config Send Complete."); + LOG_INFO("Config Send Complete"); fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_complete_id_tag; fromRadioScratch.config_complete_id = config_nonce; config_nonce = 0; diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 00dbafdaab..a4653fd619 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -346,7 +346,7 @@ bool RadioInterface::reconfigure() bool RadioInterface::init() { - LOG_INFO("Starting meshradio init..."); + LOG_INFO("Starting meshradio init"); configChangedObserver.observe(&service->configChanged); preflightSleepObserver.observe(&preflightSleep); @@ -494,7 +494,7 @@ void RadioInterface::applyModemConfig() } if ((myRegion->freqEnd - myRegion->freqStart) < bw / 1000) { - static const char *err_string = "Regional frequency range is smaller than bandwidth. Falling back to default preset."; + static const char *err_string = "Regional frequency range is smaller than bandwidth. Falling back to default preset"; LOG_ERROR(err_string); RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING); diff --git a/src/mesh/RadioLibInterface.cpp b/src/mesh/RadioLibInterface.cpp index 51d0ba5403..bb24ea426c 100644 --- a/src/mesh/RadioLibInterface.cpp +++ b/src/mesh/RadioLibInterface.cpp @@ -143,12 +143,12 @@ bool RadioLibInterface::receiveDetected(uint16_t irq, ulong syncWordHeaderValidF } else if (!Throttle::isWithinTimespanMs(activeReceiveStart, 2 * preambleTimeMsec) && !(irq & syncWordHeaderValidFlag)) { // The HEADER_VALID flag should be set by now if it was really a packet, so ignore PREAMBLE_DETECTED flag activeReceiveStart = 0; - LOG_DEBUG("Ignore false preamble detection."); + LOG_DEBUG("Ignore false preamble detection"); return false; } else if (!Throttle::isWithinTimespanMs(activeReceiveStart, maxPacketTimeMsec)) { // We should have gotten an RX_DONE IRQ by now if it was really a packet, so ignore HEADER_VALID flag activeReceiveStart = 0; - LOG_DEBUG("Ignore false header detection."); + LOG_DEBUG("Ignore false header detection"); return false; } } @@ -366,7 +366,7 @@ void RadioLibInterface::handleReceiveInterrupt() // when this is called, we should be in receive mode - if we are not, just jump out instead of bombing. Possible Race // Condition? if (!isReceiving) { - LOG_ERROR("handleReceiveInterrupt called when not in receive mode, which shouldn't happen."); + LOG_ERROR("handleReceiveInterrupt called when not in rx mode, which shouldn't happen"); return; } diff --git a/src/mesh/Router.cpp b/src/mesh/Router.cpp index 0cf5b127f9..6deb962619 100644 --- a/src/mesh/Router.cpp +++ b/src/mesh/Router.cpp @@ -143,7 +143,7 @@ void Router::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFro void Router::abortSendAndNak(meshtastic_Routing_Error err, meshtastic_MeshPacket *p) { - LOG_ERROR("Error=%d, returning NAK and dropping packet.", err); + LOG_ERROR("Error=%d, returning NAK and dropping packet", err); sendAckNak(err, getFrom(p), p->id, p->channel); packetPool.release(p); } @@ -218,13 +218,13 @@ ErrorCode Router::send(meshtastic_MeshPacket *p) if (hourlyTxPercent > myRegion->dutyCycle) { #ifdef DEBUG_PORT uint8_t silentMinutes = airTime->getSilentMinutes(hourlyTxPercent, myRegion->dutyCycle); - LOG_WARN("Duty cycle limit exceeded. Aborting send for now, you can send again in %d minutes.", silentMinutes); + LOG_WARN("Duty cycle limit exceeded. Aborting send for now, you can send again in %d mins", silentMinutes); meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed(); cn->has_reply_id = true; cn->reply_id = p->id; cn->level = meshtastic_LogRecord_Level_WARNING; cn->time = getValidTime(RTCQualityFromNet); - sprintf(cn->message, "Duty cycle limit exceeded. You can send again in %d minutes.", silentMinutes); + sprintf(cn->message, "Duty cycle limit exceeded. You can send again in %d mins", silentMinutes); service->sendClientNotification(cn); #endif meshtastic_Routing_Error err = meshtastic_Routing_Error_DUTY_CYCLE_LIMIT; @@ -462,13 +462,13 @@ meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p) // If the compressed length is greater than or equal to the original size, don't use the compressed form if (compressed_len >= p->decoded.payload.size) { - LOG_DEBUG("Not using compressing message."); + LOG_DEBUG("Not using compressing message"); // Set the uncompressed payload variant anyway. Shouldn't hurt? // p->decoded.which_payloadVariant = Data_payload_tag; // Otherwise we use the compressor } else { - LOG_DEBUG("Using compressed message."); + LOG_DEBUG("Using compressed message"); // Copy the compressed data into the meshpacket p->decoded.payload.size = compressed_len; @@ -671,4 +671,4 @@ void Router::perhapsHandleReceived(meshtastic_MeshPacket *p) // cache/learn of the existence of nodes (i.e. FloodRouter) that they should not handleReceived(p); packetPool.release(p); -} \ No newline at end of file +} diff --git a/src/mesh/http/WebServer.cpp b/src/mesh/http/WebServer.cpp index 62a8431fa0..93257efc77 100644 --- a/src/mesh/http/WebServer.cpp +++ b/src/mesh/http/WebServer.cpp @@ -69,13 +69,13 @@ static void taskCreateCert(void *parameter) #if 0 // Delete the saved certs (used in debugging) - LOG_DEBUG("Deleting any saved SSL keys ..."); + LOG_DEBUG("Deleting any saved SSL keys"); // prefs.clear(); prefs.remove("PK"); prefs.remove("cert"); #endif - LOG_INFO("Checking if we have a previously saved SSL Certificate."); + LOG_INFO("Checking if we have a saved SSL Certificate"); size_t pkLen = prefs.getBytesLength("PK"); size_t certLen = prefs.getBytesLength("cert"); @@ -139,7 +139,7 @@ void createSSLCert() 16, /* Priority of the task. */ NULL); /* Task handle. */ - LOG_DEBUG("Waiting for SSL Cert to be generated."); + LOG_DEBUG("Waiting for SSL Cert to be generated"); while (!isCertReady) { if ((millis() / 500) % 2) { if (runLoop) { @@ -189,7 +189,7 @@ int32_t WebServerThread::runOnce() void initWebServer() { - LOG_DEBUG("Initializing Web Server ..."); + LOG_DEBUG("Initializing Web Server..."); // We can now use the new certificate to setup our server as usual. secureServer = new HTTPSServer(cert); @@ -210,4 +210,4 @@ void initWebServer() LOG_ERROR("Web Servers Failed! ;-( "); } } -#endif \ No newline at end of file +#endif diff --git a/src/mesh/raspihttp/PiWebServer.cpp b/src/mesh/raspihttp/PiWebServer.cpp index 711a81024e..8fa7fed80c 100644 --- a/src/mesh/raspihttp/PiWebServer.cpp +++ b/src/mesh/raspihttp/PiWebServer.cpp @@ -403,19 +403,19 @@ int PiWebServerThread::CreateSSLCertificate() X509 *x509 = NULL; if (generate_rsa_key(&pkey) != 0) { - LOG_ERROR("Error generating RSA-Key."); + LOG_ERROR("Error generating RSA-Key"); return 1; } if (generate_self_signed_x509(pkey, &x509) != 0) { - LOG_ERROR("Error generating of X509-Certificat."); + LOG_ERROR("Error generating X509-Cert"); return 2; } // Ope file to write private key file FILE *pkey_file = fopen("private_key.pem", "wb"); if (!pkey_file) { - LOG_ERROR("Error opening private key file."); + LOG_ERROR("Error opening private key file"); return 3; } // write private key file @@ -425,7 +425,7 @@ int PiWebServerThread::CreateSSLCertificate() // open Certificate file FILE *x509_file = fopen("certificate.pem", "wb"); if (!x509_file) { - LOG_ERROR("Error opening certificate."); + LOG_ERROR("Error opening cert"); return 4; } // write cirtificate @@ -434,7 +434,7 @@ int PiWebServerThread::CreateSSLCertificate() EVP_PKEY_free(pkey); X509_free(x509); - LOG_INFO("Create SSL Certifictate -certificate.pem- succesfull "); + LOG_INFO("Create SSL Cert -certificate.pem- succesfull "); return 0; } @@ -453,9 +453,9 @@ PiWebServerThread::PiWebServerThread() if (settingsMap[webserverport] != 0) { webservport = settingsMap[webserverport]; - LOG_INFO("Using webserver port from yaml config. %i ", webservport); + LOG_INFO("Using webserver port from yaml config %i ", webservport); } else { - LOG_INFO("Webserver port in yaml config set to 0, so defaulting to port 443."); + LOG_INFO("Webserver port in yaml config set to 0, defaulting to port 443"); webservport = 443; } @@ -464,7 +464,7 @@ PiWebServerThread::PiWebServerThread() LOG_ERROR("Webserver couldn't be started, abort execution"); } else { - LOG_INFO("Webserver started ...."); + LOG_INFO("Webserver started"); u_map_init(&configWeb.mime_types); u_map_put(&configWeb.mime_types, "*", "application/octet-stream"); u_map_put(&configWeb.mime_types, ".html", "text/html"); @@ -527,4 +527,4 @@ PiWebServerThread::~PiWebServerThread() } #endif -#endif \ No newline at end of file +#endif diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 90722f5472..c4a23f1779 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -77,12 +77,12 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta LOG_DEBUG("Allowing admin response message"); } else if (mp.from == 0) { if (config.security.is_managed) { - LOG_INFO("Ignoring local admin payload because is_managed."); + LOG_INFO("Ignoring local admin payload because is_managed"); return handled; } } else if (strcasecmp(ch->settings.name, Channels::adminChannel) == 0) { if (!config.security.admin_channel_enabled) { - LOG_INFO("Ignoring admin channel, as legacy admin is disabled."); + LOG_INFO("Ignoring admin channel, as legacy admin is disabled"); myReply = allocErrorResponse(meshtastic_Routing_Error_NOT_AUTHORIZED, &mp); return handled; } @@ -93,7 +93,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta memcmp(mp.public_key.bytes, config.security.admin_key[1].bytes, 32) == 0) || (config.security.admin_key[2].size == 32 && memcmp(mp.public_key.bytes, config.security.admin_key[2].bytes, 32) == 0)) { - LOG_INFO("PKC admin payload with authorized sender key."); + LOG_INFO("PKC admin payload with authorized sender key"); } else { myReply = allocErrorResponse(meshtastic_Routing_Error_ADMIN_PUBLIC_KEY_UNAUTHORIZED, &mp); LOG_INFO("Received PKC admin payload, but the sender public key does not match the admin authorized key!"); @@ -216,7 +216,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta disableBluetooth(); LOG_INFO("Initiating factory config reset"); nodeDB->factoryReset(); - LOG_INFO("Factory config reset finished, rebooting soon."); + LOG_INFO("Factory config reset finished, rebooting soon"); reboot(DEFAULT_REBOOT_SECONDS); break; } @@ -252,7 +252,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta break; } case meshtastic_AdminMessage_get_module_config_response_tag: { - LOG_INFO("Client is receiving a get_module_config response."); + LOG_INFO("Client is receiving a get_module_config response"); if (fromOthers && r->get_module_config_response.which_payload_variant == meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG) { handleGetModuleConfigResponse(mp, r); @@ -260,13 +260,13 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta break; } case meshtastic_AdminMessage_remove_by_nodenum_tag: { - LOG_INFO("Client is receiving a remove_nodenum command."); + LOG_INFO("Client is receiving a remove_nodenum command"); nodeDB->removeNodeByNum(r->remove_by_nodenum); this->notifyObservers(r); // Observed by screen break; } case meshtastic_AdminMessage_set_favorite_node_tag: { - LOG_INFO("Client is receiving a set_favorite_node command."); + LOG_INFO("Client is receiving a set_favorite_node command"); meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->set_favorite_node); if (node != NULL) { node->is_favorite = true; @@ -275,7 +275,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta break; } case meshtastic_AdminMessage_remove_favorite_node_tag: { - LOG_INFO("Client is receiving a remove_favorite_node command."); + LOG_INFO("Client is receiving a remove_favorite_node command"); meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->remove_favorite_node); if (node != NULL) { node->is_favorite = false; @@ -284,7 +284,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta break; } case meshtastic_AdminMessage_set_fixed_position_tag: { - LOG_INFO("Client is receiving a set_fixed_position command."); + LOG_INFO("Client is receiving a set_fixed_position command"); meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum()); node->has_position = true; node->position = TypeConversions::ConvertToPositionLite(r->set_fixed_position); @@ -300,14 +300,14 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta break; } case meshtastic_AdminMessage_remove_fixed_position_tag: { - LOG_INFO("Client is receiving a remove_fixed_position command."); + LOG_INFO("Client is receiving a remove_fixed_position command"); nodeDB->clearLocalPosition(); config.position.fixed_position = false; saveChanges(SEGMENT_DEVICESTATE | SEGMENT_CONFIG, false); break; } case meshtastic_AdminMessage_set_time_only_tag: { - LOG_INFO("Client is receiving a set_time_only command."); + LOG_INFO("Client is receiving a set_time_only command"); struct timeval tv; tv.tv_sec = r->set_time_only; tv.tv_usec = 0; @@ -316,7 +316,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta break; } case meshtastic_AdminMessage_enter_dfu_mode_request_tag: { - LOG_INFO("Client is requesting to enter DFU mode."); + LOG_INFO("Client is requesting to enter DFU mode"); #if defined(ARCH_NRF52) || defined(ARCH_RP2040) enterDfuMode(); #endif @@ -1096,4 +1096,4 @@ void disableBluetooth() nrf52Bluetooth->shutdown(); #endif #endif -} \ No newline at end of file +} diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index 90c8c0f2cc..4931d5c200 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -481,7 +481,7 @@ int32_t CannedMessageModule::runOnce() } this->runState = CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE; } else { - // LOG_DEBUG("Reset message is empty."); + // LOG_DEBUG("Reset message is empty"); this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; } } @@ -1256,4 +1256,4 @@ String CannedMessageModule::drawWithCursor(String text, int cursor) return result; } -#endif \ No newline at end of file +#endif diff --git a/src/modules/NodeInfoModule.cpp b/src/modules/NodeInfoModule.cpp index 855cf44918..3688627ec5 100644 --- a/src/modules/NodeInfoModule.cpp +++ b/src/modules/NodeInfoModule.cpp @@ -65,16 +65,16 @@ 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."); + LOG_DEBUG("Skip sending NodeInfo due to > 40 percent chan 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."); + LOG_DEBUG("Skip sending NodeInfo since we sent it <5 mins 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."); + LOG_DEBUG("Skip sending requested NodeInfo since we sent it <60s ago."); ignoreRequest = true; // Mark it as ignored for MeshModule return NULL; } else { @@ -112,4 +112,4 @@ int32_t NodeInfoModule::runOnce() 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); -} \ No newline at end of file +} diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 570371080f..8cb9b18596 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -351,7 +351,7 @@ void PositionModule::sendOurPosition(NodeNum dest, bool wantReplies, uint8_t cha if (IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_TRACKER, meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) && config.power.is_power_saving) { - LOG_DEBUG("Starting next execution in 5 seconds and then going to sleep."); + LOG_DEBUG("Starting next execution in 5s, then going to sleep"); sleepOnNextExecution = true; setIntervalFromNow(5000); } @@ -364,7 +364,7 @@ int32_t PositionModule::runOnce() if (sleepOnNextExecution == true) { sleepOnNextExecution = false; uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(config.position.position_broadcast_secs); - LOG_DEBUG("Sleeping for %ims, then awaking to send position again.", nightyNightMs); + LOG_DEBUG("Sleeping for %ims, then awaking to send position again", nightyNightMs); doDeepSleep(nightyNightMs, false); } diff --git a/src/modules/RangeTestModule.cpp b/src/modules/RangeTestModule.cpp index 2deb2ba921..19209efc2f 100644 --- a/src/modules/RangeTestModule.cpp +++ b/src/modules/RangeTestModule.cpp @@ -215,7 +215,7 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp) } if (FSCom.totalBytes() - FSCom.usedBytes() < 51200) { - LOG_DEBUG("Filesystem doesn't have enough free space. Aborting write."); + LOG_DEBUG("Filesystem doesn't have enough free space. Aborting write"); return 0; } @@ -292,4 +292,4 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp) #endif return 1; -} \ No newline at end of file +} diff --git a/src/modules/StoreForwardModule.cpp b/src/modules/StoreForwardModule.cpp index 039523207f..59216ac81c 100644 --- a/src/modules/StoreForwardModule.cpp +++ b/src/modules/StoreForwardModule.cpp @@ -187,7 +187,7 @@ void StoreForwardModule::historyAdd(const meshtastic_MeshPacket &mp) const auto &p = mp.decoded; if (this->packetHistoryTotalCount == this->records) { - LOG_WARN("S&F - PSRAM Full. Starting overwrite."); + LOG_WARN("S&F - PSRAM Full. Starting overwrite"); this->packetHistoryTotalCount = 0; for (auto &i : lastRequest) { i.second = 0; // Clear the last request index for each client device @@ -393,7 +393,7 @@ ProcessMessage StoreForwardModule::handleReceived(const meshtastic_MeshPacket &m } } else { storeForwardModule->historyAdd(mp); - LOG_INFO("S&F stored. Message history contains %u records now.", this->packetHistoryTotalCount); + LOG_INFO("S&F stored. Message history contains %u records now", this->packetHistoryTotalCount); } } else if (!isFromUs(&mp) && mp.decoded.portnum == meshtastic_PortNum_STORE_FORWARD_APP) { auto &p = mp.decoded; @@ -482,7 +482,7 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, LOG_INFO("Client Request to send STATS"); if (this->busy) { storeForwardModule->sendMessage(getFrom(&mp), meshtastic_StoreAndForward_RequestResponse_ROUTER_BUSY); - LOG_INFO("S&F - Busy. Try again shortly."); + LOG_INFO("S&F - Busy. Try again shortly"); } else { storeForwardModule->statsSend(getFrom(&mp)); } @@ -602,10 +602,10 @@ StoreForwardModule::StoreForwardModule() is_server = true; } else { LOG_INFO("."); - LOG_INFO("S&F: not enough PSRAM free, disabling."); + LOG_INFO("S&F: not enough PSRAM free, disabling"); } } else { - LOG_INFO("S&F: device doesn't have PSRAM, disabling."); + LOG_INFO("S&F: device doesn't have PSRAM, disabling"); } // Client @@ -617,4 +617,4 @@ StoreForwardModule::StoreForwardModule() disable(); } #endif -} \ No newline at end of file +} diff --git a/src/modules/Telemetry/EnvironmentTelemetry.cpp b/src/modules/Telemetry/EnvironmentTelemetry.cpp index 452c7747b4..a08aae07ad 100644 --- a/src/modules/Telemetry/EnvironmentTelemetry.cpp +++ b/src/modules/Telemetry/EnvironmentTelemetry.cpp @@ -73,7 +73,7 @@ int32_t EnvironmentTelemetryModule::runOnce() sleepOnNextExecution = false; uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.environment_update_interval, default_telemetry_broadcast_interval_secs); - LOG_DEBUG("Sleeping for %ims, then awaking to send metrics again.", nightyNightMs); + LOG_DEBUG("Sleeping for %ims, then waking to send metrics again", nightyNightMs); doDeepSleep(nightyNightMs, true); } @@ -463,7 +463,7 @@ bool EnvironmentTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) service->sendToMesh(p, RX_SRC_LOCAL, true); if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) { - LOG_DEBUG("Starting next execution in 5 seconds and then going to sleep."); + LOG_DEBUG("Starting next execution in 5s, then going to sleep"); sleepOnNextExecution = true; setIntervalFromNow(5000); } @@ -586,4 +586,4 @@ AdminMessageHandleResult EnvironmentTelemetryModule::handleAdminMessageForModule return result; } -#endif \ No newline at end of file +#endif diff --git a/src/modules/Telemetry/HealthTelemetry.cpp b/src/modules/Telemetry/HealthTelemetry.cpp index 9b86ae2b81..6d258cce18 100644 --- a/src/modules/Telemetry/HealthTelemetry.cpp +++ b/src/modules/Telemetry/HealthTelemetry.cpp @@ -39,7 +39,7 @@ int32_t HealthTelemetryModule::runOnce() sleepOnNextExecution = false; uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.health_update_interval, default_telemetry_broadcast_interval_secs); - LOG_DEBUG("Sleeping for %ims, then awaking to send metrics again.", nightyNightMs); + LOG_DEBUG("Sleeping for %ims, then waking to send metrics again", nightyNightMs); doDeepSleep(nightyNightMs, true); } @@ -236,7 +236,7 @@ bool HealthTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) service->sendToMesh(p, RX_SRC_LOCAL, true); if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) { - LOG_DEBUG("Starting next execution in 5 seconds and then going to sleep."); + LOG_DEBUG("Starting next execution in 5s, then going to sleep"); sleepOnNextExecution = true; setIntervalFromNow(5000); } diff --git a/src/modules/Telemetry/PowerTelemetry.cpp b/src/modules/Telemetry/PowerTelemetry.cpp index c5f19b295b..19f58e114d 100644 --- a/src/modules/Telemetry/PowerTelemetry.cpp +++ b/src/modules/Telemetry/PowerTelemetry.cpp @@ -27,7 +27,7 @@ int32_t PowerTelemetryModule::runOnce() sleepOnNextExecution = false; uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.power_update_interval, default_telemetry_broadcast_interval_secs); - LOG_DEBUG("Sleeping for %ims, then awaking to send metrics again.", nightyNightMs); + LOG_DEBUG("Sleeping for %ims, then waking to send metrics again", nightyNightMs); doDeepSleep(nightyNightMs, true); } @@ -243,7 +243,7 @@ bool PowerTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly) service->sendToMesh(p, RX_SRC_LOCAL, true); if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) { - LOG_DEBUG("Starting next execution in 5s then going to sleep."); + LOG_DEBUG("Starting next execution in 5s then going to sleep"); sleepOnNextExecution = true; setIntervalFromNow(5000); } diff --git a/src/modules/Telemetry/Sensor/BME680Sensor.cpp b/src/modules/Telemetry/Sensor/BME680Sensor.cpp index 21c74c52f6..18515d0a8b 100644 --- a/src/modules/Telemetry/Sensor/BME680Sensor.cpp +++ b/src/modules/Telemetry/Sensor/BME680Sensor.cpp @@ -80,9 +80,9 @@ void BME680Sensor::loadState() file.read((uint8_t *)&bsecState, BSEC_MAX_STATE_BLOB_SIZE); file.close(); bme680.setState(bsecState); - LOG_INFO("%s state read from %s.", sensorName, bsecConfigFileName); + LOG_INFO("%s state read from %s", sensorName, bsecConfigFileName); } else { - LOG_INFO("No %s state found (File: %s).", sensorName, bsecConfigFileName); + LOG_INFO("No %s state found (File: %s)", sensorName, bsecConfigFileName); } #else LOG_ERROR("ERROR: Filesystem not implemented"); @@ -119,12 +119,12 @@ void BME680Sensor::updateState() } auto file = FSCom.open(bsecConfigFileName, FILE_O_WRITE); if (file) { - LOG_INFO("%s state write to %s.", sensorName, bsecConfigFileName); + LOG_INFO("%s state write to %s", sensorName, bsecConfigFileName); file.write((uint8_t *)&bsecState, BSEC_MAX_STATE_BLOB_SIZE); file.flush(); file.close(); } else { - LOG_INFO("Can't write %s state (File: %s).", sensorName, bsecConfigFileName); + LOG_INFO("Can't write %s state (File: %s)", sensorName, bsecConfigFileName); } } #else @@ -145,4 +145,4 @@ void BME680Sensor::checkStatus(String functionName) LOG_WARN("%s BME68X code: %s", functionName.c_str(), String(bme680.sensor.status).c_str()); } -#endif \ No newline at end of file +#endif diff --git a/src/modules/Telemetry/Sensor/MLX90614Sensor.cpp b/src/modules/Telemetry/Sensor/MLX90614Sensor.cpp index 3a13eeba40..d9908fce3f 100644 --- a/src/modules/Telemetry/Sensor/MLX90614Sensor.cpp +++ b/src/modules/Telemetry/Sensor/MLX90614Sensor.cpp @@ -19,7 +19,7 @@ int32_t MLX90614Sensor::runOnce() LOG_DEBUG("MLX90614 emissivity: %f", mlx.readEmissivity()); if (fabs(MLX90614_EMISSIVITY - mlx.readEmissivity()) > 0.001) { mlx.writeEmissivity(MLX90614_EMISSIVITY); - LOG_INFO("MLX90614 emissivity updated. In case of weird data, power cycle."); + LOG_INFO("MLX90614 emissivity updated. In case of weird data, power cycle"); } LOG_DEBUG("MLX90614 Init Succeed"); status = true; diff --git a/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp b/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp index 856a1aeecb..5bbf6b5634 100644 --- a/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp +++ b/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp @@ -103,7 +103,7 @@ bool NAU7802Sensor::saveCalibrationData() nau7802config.calibrationFactor = nau7802.getCalibrationFactor(); bool okay = false; - LOG_INFO("%s state write to %s.", sensorName, nau7802ConfigFileName); + LOG_INFO("%s state write to %s", sensorName, nau7802ConfigFileName); pb_ostream_t stream = {&writecb, static_cast(&file), meshtastic_Nau7802Config_size}; if (!pb_encode(&stream, &meshtastic_Nau7802Config_msg, &nau7802config)) { @@ -121,7 +121,7 @@ bool NAU7802Sensor::loadCalibrationData() auto file = FSCom.open(nau7802ConfigFileName, FILE_O_READ); bool okay = false; if (file) { - LOG_INFO("%s state read from %s.", sensorName, nau7802ConfigFileName); + LOG_INFO("%s state read from %s", sensorName, nau7802ConfigFileName); pb_istream_t stream = {&readcb, &file, meshtastic_Nau7802Config_size}; if (!pb_decode(&stream, &meshtastic_Nau7802Config_msg, &nau7802config)) { LOG_ERROR("Error: can't decode protobuf %s", PB_GET_ERROR(&stream)); @@ -132,9 +132,9 @@ bool NAU7802Sensor::loadCalibrationData() } file.close(); } else { - LOG_INFO("No %s state found (File: %s).", sensorName, nau7802ConfigFileName); + LOG_INFO("No %s state found (File: %s)", sensorName, nau7802ConfigFileName); } return okay; } -#endif \ No newline at end of file +#endif diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index 39d554100b..691aa433a4 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -122,13 +122,13 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length) &meshtastic_Position_msg, &pos); // make the Data protobuf from position service->sendToMesh(p, RX_SRC_LOCAL); } else { - LOG_DEBUG("JSON Ignoring downlink message with unsupported type."); + LOG_DEBUG("JSON Ignoring downlink message with unsupported type"); } } else { - LOG_ERROR("JSON Received payload on MQTT but not a valid envelope."); + LOG_ERROR("JSON Received payload on MQTT but not a valid envelope"); } } else { - LOG_WARN("JSON downlink received on channel not called 'mqtt' or without downlink enabled."); + LOG_WARN("JSON downlink received on channel not called 'mqtt' or without downlink enabled"); } } else { // no json, this is an invalid payload @@ -155,7 +155,7 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length) if (e.packet && isFromUs(e.packet)) routingModule->sendAckNak(meshtastic_Routing_Error_NONE, getFrom(e.packet), e.packet->id, ch.index); else - LOG_INFO("Ignoring downlink message we originally sent."); + LOG_INFO("Ignoring downlink message we originally sent"); } else { // Find channel by channel_id and check downlink_enabled if ((strcmp(e.channel_id, "PKI") == 0 && e.packet) || @@ -165,18 +165,18 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length) p->via_mqtt = true; // Mark that the packet was received via MQTT if (isFromUs(p)) { - LOG_INFO("Ignoring downlink message we originally sent."); + LOG_INFO("Ignoring downlink message we originally sent"); packetPool.release(p); return; } if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) { if (moduleConfig.mqtt.encryption_enabled) { - LOG_INFO("Ignoring decoded message on MQTT, encryption is enabled."); + LOG_INFO("Ignoring decoded message on MQTT, encryption is enabled"); packetPool.release(p); return; } if (p->decoded.portnum == meshtastic_PortNum_ADMIN_APP) { - LOG_INFO("Ignoring decoded admin packet."); + LOG_INFO("Ignoring decoded admin packet"); packetPool.release(p); return; } @@ -242,7 +242,7 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), mqttQueue(MAX_MQTT_QUEUE) isMqttServerAddressPrivate = isPrivateIpAddress(moduleConfig.mqtt.address); if (isMqttServerAddressPrivate) { - LOG_INFO("MQTT server is a private IP address."); + LOG_INFO("MQTT server on a private IP"); } #if HAS_NETWORKING @@ -251,7 +251,7 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), mqttQueue(MAX_MQTT_QUEUE) #endif if (moduleConfig.mqtt.proxy_to_client_enabled) { - LOG_INFO("MQTT configured to use client proxy..."); + LOG_INFO("MQTT configured to use client proxy"); enabled = true; runASAP = true; reconnectCount = 0; @@ -315,7 +315,7 @@ void MQTT::reconnect() { if (wantsLink()) { if (moduleConfig.mqtt.proxy_to_client_enabled) { - LOG_INFO("MQTT connecting via client proxy instead..."); + LOG_INFO("MQTT connecting via client proxy instead"); enabled = true; runASAP = true; reconnectCount = 0; @@ -385,7 +385,7 @@ void MQTT::reconnect() } else { #if HAS_WIFI && !defined(ARCH_PORTDUINO) reconnectCount++; - LOG_ERROR("Failed to contact MQTT server directly (%d/%d)...", reconnectCount, reconnectMax); + LOG_ERROR("Failed to contact MQTT server directly (%d/%d)", reconnectCount, reconnectMax); if (reconnectCount >= reconnectMax) { needReconnect = true; wifiReconnect->setIntervalFromNow(0); @@ -630,9 +630,9 @@ void MQTT::perhapsReportToMap() if (map_position_precision == 0 || (localPosition.latitude_i == 0 && localPosition.longitude_i == 0)) { last_report_to_map = millis(); if (map_position_precision == 0) - LOG_WARN("MQTT Map reporting is enabled, but precision is 0"); + LOG_WARN("MQTT Map reporting enabled, but precision is 0"); if (localPosition.latitude_i == 0 && localPosition.longitude_i == 0) - LOG_WARN("MQTT Map reporting is enabled, but no position available."); + LOG_WARN("MQTT Map reporting enabled, but no position available"); return; } @@ -768,4 +768,4 @@ bool MQTT::isPrivateIpAddress(const char address[]) int octet2Num = atoi(octet2); return octet2Num >= 16 && octet2Num <= 31; -} \ No newline at end of file +} diff --git a/src/platform/nrf52/main-nrf52.cpp b/src/platform/nrf52/main-nrf52.cpp index 72a223c44f..0b0158812b 100644 --- a/src/platform/nrf52/main-nrf52.cpp +++ b/src/platform/nrf52/main-nrf52.cpp @@ -309,4 +309,4 @@ void enterDfuMode() #else enterUf2Dfu(); #endif -} \ No newline at end of file +} diff --git a/src/platform/portduino/SimRadio.cpp b/src/platform/portduino/SimRadio.cpp index 840a0f5bac..0ed281338c 100644 --- a/src/platform/portduino/SimRadio.cpp +++ b/src/platform/portduino/SimRadio.cpp @@ -22,7 +22,7 @@ ErrorCode SimRadio::send(meshtastic_MeshPacket *p) // set (random) transmit delay to let others reconfigure their radio, // to avoid collisions and implement timing-based flooding - LOG_DEBUG("Set random delay before transmitting."); + LOG_DEBUG("Set random delay before tx"); setTransmitDelay(); return res; } @@ -193,7 +193,7 @@ void SimRadio::startSend(meshtastic_MeshPacket *txp) memcpy(&c.data.bytes, p->decoded.payload.bytes, p->decoded.payload.size); c.data.size = p->decoded.payload.size; } else { - LOG_WARN("Payload size is larger than compressed message allows! Sending empty payload."); + LOG_WARN("Payload size larger than compressed message allows! Sending empty payload"); } p->decoded.payload.size = pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_Compressed_msg, &c); @@ -265,4 +265,4 @@ int16_t SimRadio::readData(uint8_t *data, size_t len) } return state; -} \ No newline at end of file +} diff --git a/src/sleep.cpp b/src/sleep.cpp index 083d2a07ef..949ce97fbf 100644 --- a/src/sleep.cpp +++ b/src/sleep.cpp @@ -71,7 +71,7 @@ void setCPUFast(bool on) * (Added: Dec 23, 2021 by Jm Casler) */ #ifndef CONFIG_IDF_TARGET_ESP32C3 - LOG_DEBUG("Setting CPU to 240MHz because WiFi is in use."); + LOG_DEBUG("Setting CPU to 240MHz because WiFi is in use"); setCpuFrequencyMhz(240); #endif return; @@ -305,7 +305,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false) PMU->disablePowerOutput(XPOWERS_LDO2); // lora radio power channel } if (msecToWake == portMAX_DELAY) { - LOG_INFO("PMU shutdown."); + LOG_INFO("PMU shutdown"); console->flush(); PMU->shutdown(); } @@ -512,4 +512,4 @@ void enableLoraInterrupt() } #endif } -#endif \ No newline at end of file +#endif diff --git a/src/xmodem.cpp b/src/xmodem.cpp index 9eef9690b8..4ebf421324 100644 --- a/src/xmodem.cpp +++ b/src/xmodem.cpp @@ -97,7 +97,7 @@ void XModemAdapter::sendControl(meshtastic_XModem_Control c) { xmodemStore = meshtastic_XModem_init_zero; xmodemStore.control = c; - LOG_DEBUG("XModem: Notify Sending control %d.", c); + LOG_DEBUG("XModem: Notify Sending control %d", c); packetReady.notifyObservers(packetno); } @@ -141,7 +141,7 @@ void XModemAdapter::handlePacket(meshtastic_XModem xmodemPacket) xmodemStore.seq = packetno; xmodemStore.buffer.size = file.read(xmodemStore.buffer.bytes, sizeof(meshtastic_XModem_buffer_t::bytes)); xmodemStore.crc16 = crc16_ccitt(xmodemStore.buffer.bytes, xmodemStore.buffer.size); - LOG_DEBUG("XModem: STX Notify Sending packet %d, %d Bytes.", packetno, xmodemStore.buffer.size); + LOG_DEBUG("XModem: STX Notify Sending packet %d, %d Bytes", packetno, xmodemStore.buffer.size); if (xmodemStore.buffer.size < sizeof(meshtastic_XModem_buffer_t::bytes)) { isEOT = true; // send EOT on next Ack @@ -208,7 +208,7 @@ void XModemAdapter::handlePacket(meshtastic_XModem xmodemPacket) xmodemStore.seq = packetno; xmodemStore.buffer.size = file.read(xmodemStore.buffer.bytes, sizeof(meshtastic_XModem_buffer_t::bytes)); xmodemStore.crc16 = crc16_ccitt(xmodemStore.buffer.bytes, xmodemStore.buffer.size); - LOG_DEBUG("XModem: ACK Notify Sending packet %d, %d Bytes.", packetno, xmodemStore.buffer.size); + LOG_DEBUG("XModem: ACK Notify Sending packet %d, %d Bytes", packetno, xmodemStore.buffer.size); if (xmodemStore.buffer.size < sizeof(meshtastic_XModem_buffer_t::bytes)) { isEOT = true; // send EOT on next Ack @@ -235,7 +235,7 @@ void XModemAdapter::handlePacket(meshtastic_XModem xmodemPacket) file.seek((packetno - 1) * sizeof(meshtastic_XModem_buffer_t::bytes)); xmodemStore.buffer.size = file.read(xmodemStore.buffer.bytes, sizeof(meshtastic_XModem_buffer_t::bytes)); xmodemStore.crc16 = crc16_ccitt(xmodemStore.buffer.bytes, xmodemStore.buffer.size); - LOG_DEBUG("XModem: NAK Notify Sending packet %d, %d Bytes.", packetno, xmodemStore.buffer.size); + LOG_DEBUG("XModem: NAK Notify Sending packet %d, %d Bytes", packetno, xmodemStore.buffer.size); if (xmodemStore.buffer.size < sizeof(meshtastic_XModem_buffer_t::bytes)) { isEOT = true; // send EOT on next Ack @@ -251,4 +251,4 @@ void XModemAdapter::handlePacket(meshtastic_XModem xmodemPacket) break; } } -#endif \ No newline at end of file +#endif