From 70f82aa2c40655ca1e06e19f0cf7424969303638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Tue, 6 Mar 2018 22:01:39 +0100 Subject: [PATCH] Clear srash info after displaying it. Change copy --- code/espurna/debug.ino | 2 +- code/espurna/settings.ino | 1 + code/espurna/telnet.ino | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/espurna/debug.ino b/code/espurna/debug.ino index c9daf3de..d03e438d 100644 --- a/code/espurna/debug.ino +++ b/code/espurna/debug.ino @@ -195,7 +195,7 @@ void debugDumpCrashInfo() { return; } - DEBUG_MSG_P(PSTR("[DEBUG] Crash at %lu ms\n"), crash_time); + DEBUG_MSG_P(PSTR("[DEBUG] Latest crash was at %lu ms after boot\n"), crash_time); DEBUG_MSG_P(PSTR("[DEBUG] Reason of restart: %u\n"), EEPROM.read(SAVE_CRASH_EEPROM_OFFSET + SAVE_CRASH_RESTART_REASON)); DEBUG_MSG_P(PSTR("[DEBUG] Exception cause: %u\n"), EEPROM.read(SAVE_CRASH_EEPROM_OFFSET + SAVE_CRASH_EXCEPTION_CAUSE)); diff --git a/code/espurna/settings.ino b/code/espurna/settings.ino index d57e87ff..b535c590 100644 --- a/code/espurna/settings.ino +++ b/code/espurna/settings.ino @@ -195,6 +195,7 @@ void _settingsInitCommands() { #if DEBUG_SUPPORT settingsRegisterCommand(F("CRASH"), [](Embedis* e) { debugDumpCrashInfo(); + debugClearCrashInfo(); DEBUG_MSG_P(PSTR("+OK\n")); }); #endif diff --git a/code/espurna/telnet.ino b/code/espurna/telnet.ino index 93703c64..373e3c5d 100644 --- a/code/espurna/telnet.ino +++ b/code/espurna/telnet.ino @@ -123,6 +123,7 @@ void _telnetNewClient(AsyncClient *client) { info(); wifiStatus(); debugDumpCrashInfo(); + debugClearCrashInfo(); #endif _telnetFirst = true;