Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebUI] Use common methods for restart and erase #1624

Merged
merged 1 commit into from
Apr 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions main/ZwebUI.ino
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,7 @@ void handleRoot() {

delay(2000); // Wait for web page to be sent before

# if defined(ESP8266)
ESP.reset();
# else
ESP.restart();
# endif
ESPRestart();
} else {
// WEBUI_TRACE_LOG(F("Arguments %s" CR), message);
server.send(200, "text/plain", "00:14:36.767 RSL: RESULT = {\"Topic\":\"topic\"}");
Expand Down Expand Up @@ -888,8 +884,7 @@ void handleRT() {
response += String(buffer);
server.send(200, "text/html", response);

nvs_flash_erase();
ESP.restart();
eraseAndRestart();
} else {
handleCN();
}
Expand Down Expand Up @@ -1358,7 +1353,6 @@ String stateWebUIStatus() {
WebUIdata["displayMetric"] = (bool)displayMetric;
WebUIdata["webUISecure"] = (bool)webUISecure;
WebUIdata["displayQueue"] = uxQueueMessagesWaiting(webUIQueue);
;

String output;
serializeJson(WebUIdata, output);
Expand Down