Fix for AutoSave checkbox not saving.

This commit is contained in:
Blaz Kristan 2021-04-15 22:29:26 +02:00
parent dcc7ba8f93
commit 1070d8d3fa

View File

@ -170,7 +170,8 @@ class AutoSaveUsermod : public Usermod {
autoSavePreset = min(250,max(0,(int)root[F("Autosave_autoSavePreset")])); autoSavePreset = min(250,max(0,(int)root[F("Autosave_autoSavePreset")]));
} }
if (root[F("Autosave_autoSaveApplyOnBoot")] != nullptr) { if (root[F("Autosave_autoSaveApplyOnBoot")] != nullptr) {
applyAutoSaveOnBoot = (bool)root[F("Autosave_autoSaveApplyOnBoot")]; String str = root[F("Autosave_autoSaveApplyOnBoot")]; // checkbox -> off or on
applyAutoSaveOnBoot = (bool)(str!="off"); // off is guaranteed to be present
} }
} }