From adff1a728d624dc9360340e7f4e5109c97abd211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sat, 31 Mar 2018 12:26:42 +0200 Subject: [PATCH] RESET.SAFE command to reboot into safe mode --- code/espurna/settings.ino | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/espurna/settings.ino b/code/espurna/settings.ino index c114e7ba..cc07c7bd 100644 --- a/code/espurna/settings.ino +++ b/code/espurna/settings.ino @@ -285,6 +285,12 @@ void _settingsInitCommands() { deferredReset(100, CUSTOM_RESET_TERMINAL); }); + settingsRegisterCommand(F("RESET.SAFE"), [](Embedis* e) { + EEPROM.write(EEPROM_CRASH_COUNTER, SYSTEM_CHECK_MAX); + DEBUG_MSG_P(PSTR("+OK\n")); + deferredReset(100, CUSTOM_RESET_TERMINAL); + }); + settingsRegisterCommand(F("UPTIME"), [](Embedis* e) { DEBUG_MSG_P(PSTR("Uptime: %d seconds\n"), getUptime()); DEBUG_MSG_P(PSTR("+OK\n"));