Browse Source

Check also carriage returns to show timestamp in debug messages

i18n
Xose Pérez 7 years ago
parent
commit
a845d96f6c
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      code/espurna/debug.ino
  2. +1
    -1
      code/espurna/ota.ino

+ 1
- 1
code/espurna/debug.ino View File

@ -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


+ 1
- 1
code/espurna/ota.ino View File

@ -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) {


Loading…
Cancel
Save