diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 9854b06a..04850ea1 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -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 diff --git a/code/espurna/settings.ino b/code/espurna/settings.ino index 713ede6e..53657cab 100644 --- a/code/espurna/settings.ino +++ b/code/espurna/settings.ino @@ -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 + } // -----------------------------------------------------------------------------