fix syntax errors
This commit is contained in:
2
Ota.cpp
2
Ota.cpp
@@ -45,7 +45,7 @@ bool Ota::updateCompleted()
|
|||||||
return _updateCompleted;
|
return _updateCompleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Ota::restart()
|
void Ota::restart()
|
||||||
{
|
{
|
||||||
_updateCompleted = false;
|
_updateCompleted = false;
|
||||||
_updateStarted = false;
|
_updateStarted = false;
|
||||||
|
|||||||
@@ -165,14 +165,14 @@ void WebCfgServer::initialize()
|
|||||||
return _server.requestAuthentication();
|
return _server.requestAuthentication();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_ota->updateStarted() && _ota->updateCompleted()) {
|
if (_ota.updateStarted() && _ota.updateCompleted()) {
|
||||||
String response = "";
|
String response = "";
|
||||||
buildOtaCompletedHtml(response);
|
buildOtaCompletedHtml(response);
|
||||||
_server.send(200, "text/html", response);
|
_server.send(200, "text/html", response);
|
||||||
delay(2000);
|
delay(2000);
|
||||||
restartEsp(RestartReason::OTACompleted);
|
restartEsp(RestartReason::OTACompleted);
|
||||||
} else {
|
} else {
|
||||||
ota->restart();
|
_ota.restart();
|
||||||
_server.sendHeader("Location", "/ota?errored=true");
|
_server.sendHeader("Location", "/ota?errored=true");
|
||||||
_server.send(302, "text/plain", "");
|
_server.send(302, "text/plain", "");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user