Browse Source

RESET.SAFE command to reboot into safe mode

rfm69
Xose Pérez 6 years ago
parent
commit
adff1a728d
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      code/espurna/settings.ino

+ 6
- 0
code/espurna/settings.ino View File

@ -285,6 +285,12 @@ void _settingsInitCommands() {
deferredReset(100, CUSTOM_RESET_TERMINAL); 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) { settingsRegisterCommand(F("UPTIME"), [](Embedis* e) {
DEBUG_MSG_P(PSTR("Uptime: %d seconds\n"), getUptime()); DEBUG_MSG_P(PSTR("Uptime: %d seconds\n"), getUptime());
DEBUG_MSG_P(PSTR("+OK\n")); DEBUG_MSG_P(PSTR("+OK\n"));


Loading…
Cancel
Save