mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-27 12:43:08 +00:00
Fixed factory reset
This commit is contained in:
@@ -1403,9 +1403,13 @@ void AmsWebServer::factoryResetHtml() {
|
||||
}
|
||||
|
||||
void AmsWebServer::factoryResetPost() {
|
||||
printD("Performing factory reset");
|
||||
if(server.hasArg("perform") && server.arg("perform") == "true") {
|
||||
printD("Formatting SPIFFS");
|
||||
SPIFFS.format();
|
||||
printD("Clearing configuration");
|
||||
config->clear();
|
||||
printD("Setting restart flag and redirecting");
|
||||
performRestart = true;
|
||||
server.sendHeader("Location","/restart-wait");
|
||||
server.send(303);
|
||||
|
||||
Reference in New Issue
Block a user