From a845d96f6c5a62818d6596a9fcba23138edc52e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sun, 21 Jan 2018 23:15:20 +0100 Subject: [PATCH] Check also carriage returns to show timestamp in debug messages --- code/espurna/debug.ino | 2 +- code/espurna/ota.ino | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/espurna/debug.ino b/code/espurna/debug.ino index 330ac3a3..e98bcc18 100644 --- a/code/espurna/debug.ino +++ b/code/espurna/debug.ino @@ -27,7 +27,7 @@ void _debugSend(char * message) { static bool add_timestamp = true; char timestamp[10] = {0}; if (add_timestamp) snprintf_P(timestamp, sizeof(timestamp), PSTR("[%06lu] "), millis() % 1000000); - add_timestamp = (message[strlen(message)-1] == 10); + add_timestamp = (message[strlen(message)-1] == 10) || (message[strlen(message)-1] == 13); #endif #if DEBUG_SERIAL_SUPPORT diff --git a/code/espurna/ota.ino b/code/espurna/ota.ino index ebeb398e..ffb38148 100644 --- a/code/espurna/ota.ino +++ b/code/espurna/ota.ino @@ -45,7 +45,7 @@ void otaSetup() { }); ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { - DEBUG_MSG_P(PSTR("[OTA] Progress: %u%%%% \r"), (progress / (total / 100))); + DEBUG_MSG_P(PSTR("[OTA] Progress: %u%%\r"), (progress / (total / 100))); }); ArduinoOTA.onError([](ota_error_t error) {