made active faction recovery configurable

This commit is contained in:
2023-04-17 22:55:16 +02:00
parent eb771d07d3
commit 7e58db489d
4 changed files with 41 additions and 3 deletions

View File

@@ -200,6 +200,12 @@ String processor(const String &var)
return temp;
}
if (var == "FACTIONREBOOT_CHECKED")
return String(ConfigData.active_faction_on_reboot == true ? "checked" : "");
if (var == "FACTION_RECOVERY")
return String(ConfigData.active_faction_on_reboot);
return String();
}
@@ -256,6 +262,15 @@ void WebserverPOST_Callback(AsyncWebServerRequest *request)
ConfigData.batteryType = temp;
}
if (request->hasParam("factionreboot_cont", true))
{
AsyncWebParameter *param = request->getParam("factionreboot_cont", true);
if (param->value() == "on")
ConfigData.active_faction_on_reboot = true;
else
ConfigData.active_faction_on_reboot = false;
}
if (p->name() == "settingssave")
globals.requestEEAction = EE_CFG_SAVE;
// end: POST Form Settings