mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-03 19:21:38 +02:00
Update web.h
This commit is contained in:
parent
8f49aae4f3
commit
48c4884e80
1 changed files with 6 additions and 5 deletions
|
@ -18,7 +18,6 @@
|
|||
#include "../appInterface.h"
|
||||
|
||||
#include "../hm/hmSystem.h"
|
||||
#include "../utils/ahoyTimer.h"
|
||||
#include "../utils/helper.h"
|
||||
|
||||
#include "html/h/index_html.h"
|
||||
|
@ -132,6 +131,8 @@ class Web {
|
|||
}
|
||||
|
||||
void showUpdate2(AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final) {
|
||||
mApp->setOnUpdate();
|
||||
|
||||
if(!index) {
|
||||
Serial.printf("Update Start: %s\n", filename.c_str());
|
||||
#ifndef ESP32
|
||||
|
@ -246,7 +247,7 @@ class Web {
|
|||
AsyncWebServerResponse *response = request->beginResponse(200, F("text/html"), html);
|
||||
response->addHeader("Connection", "close");
|
||||
request->send(response);
|
||||
if(reboot)
|
||||
//if(reboot)
|
||||
mApp->setRebootFlag();
|
||||
}
|
||||
|
||||
|
@ -263,7 +264,7 @@ class Web {
|
|||
AsyncWebServerResponse *response = request->beginResponse(200, F("text/html"), html);
|
||||
response->addHeader("Connection", "close");
|
||||
request->send(response);
|
||||
if(reboot)
|
||||
//if(reboot)
|
||||
mApp->setRebootFlag();
|
||||
}
|
||||
|
||||
|
@ -550,8 +551,8 @@ class Web {
|
|||
mConfig->mqtt.port = request->arg("mqttPort").toInt();
|
||||
mConfig->mqtt.interval = request->arg("mqttInterval").toInt();
|
||||
mConfig->mqtt.rstYieldMidNight = (request->arg("mqttRstMid") == "on");
|
||||
mConfig->mqtt.rstValsNotAvail = (request->arg("mqttRstComStop") == "on");
|
||||
mConfig->mqtt.rstValsCommStop = (request->arg("mqttRstNotAvail") == "on");
|
||||
mConfig->mqtt.rstValsNotAvail = (request->arg("mqttRstNotAvail") == "on");
|
||||
mConfig->mqtt.rstValsCommStop = (request->arg("mqttRstComStop") == "on");
|
||||
|
||||
// serial console
|
||||
if(request->arg("serIntvl") != "") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue