Browse Source

Command to save settings when SETTINGS_AUTOSAVE is off

ota
Xose Pérez 5 years ago
parent
commit
84af178c3f
2 changed files with 8 additions and 1 deletions
  1. +1
    -1
      code/espurna/config/general.h
  2. +7
    -0
      code/espurna/settings.ino

+ 1
- 1
code/espurna/config/general.h View File

@ -798,7 +798,7 @@
// -----------------------------------------------------------------------------
#ifndef SETTINGS_AUTOSAVE
#define SETTINGS_AUTOSAVE 1 // Autosave settings o force manual commit
#define SETTINGS_AUTOSAVE 1 // Autosave settings or force manual commit
#endif
#define SETTINGS_MAX_LIST_COUNT 10 // Maximum index for settings lists


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

@ -308,6 +308,13 @@ void _settingsInitCommands() {
DEBUG_MSG_P(PSTR("\n+OK\n"));
});
#if not SETTINGS_AUTOSAVE
settingsRegisterCommand(F("SAVE"), [](Embedis* e) {
_settings_save = true;
DEBUG_MSG_P(PSTR("\n+OK\n"));
});
#endif
}
// -----------------------------------------------------------------------------


Loading…
Cancel
Save