From dfdd3e425701bd177893beb447fe82be6c244d2d Mon Sep 17 00:00:00 2001 From: lulol Date: Sat, 23 Sep 2023 23:31:58 +0000 Subject: [PATCH] console log formatting Fix some console log formatting that is actually mixed with CR and CRLF. To work properly still is need to change in ArduinoLog/ArduinoLog.h `#define CR "\r\n"` or to use NL instead of CR in all the relevant files available in the latest version of ArduinoLog. --- main/main.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/main.ino b/main/main.ino index b76fc787c5..f2cef59beb 100644 --- a/main/main.ino +++ b/main/main.ino @@ -870,7 +870,8 @@ void setup() { //Launch serial for debugging purposes Serial.begin(SERIAL_BAUD); Log.begin(LOG_LEVEL, &Serial); - Log.notice(F(CR "************* WELCOME TO OpenMQTTGateway **************" CR)); + Serial.print(CR); + Log.notice(F("************* WELCOME TO OpenMQTTGateway **************" CR)); #if defined(TRIGGER_GPIO) && !defined(ESPWifiManualSetup) pinMode(TRIGGER_GPIO, INPUT_PULLUP); checkButton(); @@ -1536,7 +1537,9 @@ void setup_wifimanager(bool reset_settings) { if (error) { Log.error(F("deserialize config failed: %s, buffer capacity: %u" CR), error.c_str(), json.capacity()); } + Log.notice(F("Configuration:" CR)); serializeJsonPretty(json, Serial); + Serial.print(CR); if (!json.isNull()) { Log.trace(F("\nparsed json, size: %u" CR), json.memoryUsage()); if (json.containsKey("mqtt_server"))