more fixes
This commit is contained in:
@@ -177,14 +177,8 @@ String processor(const String &var)
|
||||
return String(buff);
|
||||
}
|
||||
|
||||
if (var == "STATUS_FAC_1")
|
||||
return PersistenceData.activeFaction == FACTION_1 ? "ACTIVE" : "INACTIVE";
|
||||
|
||||
if (var == "STATUS_FAC_2")
|
||||
return PersistenceData.activeFaction == FACTION_2 ? "ACTIVE" : "INACTIVE";
|
||||
|
||||
if (var == "STATUS_FAC_3")
|
||||
return PersistenceData.activeFaction == FACTION_3 ? "ACTIVE" : "INACTIVE";
|
||||
if (var == "ACTIVE_FACTION")
|
||||
return String(PersistenceData.activeFaction);
|
||||
|
||||
if (var == "NAME_FAC_1")
|
||||
return FACTION_1_NAME;
|
||||
@@ -225,8 +219,36 @@ void WebserverPOST_Callback(AsyncWebServerRequest *request)
|
||||
AsyncWebParameter *p = request->getParam(i);
|
||||
Debug_pushMessage("%s : %s\n", p->name().c_str(), p->value().c_str());
|
||||
|
||||
// begin: POST Form Maintenance
|
||||
if (p->name() == "reset_ee_btn")
|
||||
{
|
||||
if (request->hasParam("reset_ee_pds", true))
|
||||
{
|
||||
AsyncWebParameter *param = request->getParam("reset_ee_pds", true);
|
||||
if (param->value() == "on")
|
||||
globals.requestEEAction = globals.requestEEAction == EE_CFG_FORMAT ? EE_FORMAT_ALL : EE_PDS_FORMAT;
|
||||
}
|
||||
if (request->hasParam("reset_ee_cfg", true))
|
||||
{
|
||||
AsyncWebParameter *param = request->getParam("reset_ee_cfg", true);
|
||||
if (param->value() == "on")
|
||||
globals.requestEEAction = globals.requestEEAction == EE_PDS_FORMAT ? EE_FORMAT_ALL : EE_CFG_FORMAT;
|
||||
}
|
||||
}
|
||||
if (p->name() == "reboot")
|
||||
{
|
||||
globals.systemStatus = sysStat_Shutdown;
|
||||
}
|
||||
// end: POST Form Maintenance
|
||||
|
||||
// begin: POST Form Settings
|
||||
if (p->name() == "cmdsubmit")
|
||||
if (p->name() == "battery_select")
|
||||
{
|
||||
batteryType_t temp = (batteryType_t)p->value().toInt();
|
||||
ConfigData.batteryType = temp;
|
||||
}
|
||||
|
||||
if (p->name() == "settingssave")
|
||||
globals.requestEEAction = EE_CFG_SAVE;
|
||||
// end: POST Form Settings
|
||||
}
|
||||
|
Reference in New Issue
Block a user