made active faction recovery configurable
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user