diff --git a/Ota.cpp b/Ota.cpp index cb3a925..7948266 100644 --- a/Ota.cpp +++ b/Ota.cpp @@ -3,7 +3,7 @@ #define FULL_PACKET 1436 // HTTP_UPLOAD_BUFLEN in WebServer,h -void Ota::updateFirmware(uint8_t buf, size_t size) +void Ota::updateFirmware(uint8_t* buf, size_t size) { if (!_updateFlag) { //If it's the first packet of OTA since bootup, begin OTA @@ -11,7 +11,7 @@ void Ota::updateFirmware(uint8_t buf, size_t size) esp_ota_begin(esp_ota_get_next_update_partition(NULL), OTA_SIZE_UNKNOWN, &otaHandler); _updateFlag = true; } - esp_ota_write(otaHandler, (const void*)buf, size); + esp_ota_write(otaHandler, buf, size); if (size != FULL_PACKET) { esp_ota_end(otaHandler); diff --git a/Ota.h b/Ota.h index 4b3a38f..967c1d5 100644 --- a/Ota.h +++ b/Ota.h @@ -7,7 +7,7 @@ class Ota { public: - void updateFirmware(uint8_t buf, size_t size); + void updateFirmware(uint8_t* buf, size_t size); private: bool _updateFlag = false; diff --git a/WebCfgServer.cpp b/WebCfgServer.cpp index 1a9a235..9cbb08e 100644 --- a/WebCfgServer.cpp +++ b/WebCfgServer.cpp @@ -125,7 +125,8 @@ void WebCfgServer::initialize() return _server.requestAuthentication(); } - String response = "ok"; + String response = ""; + buildConfirmHtml(response, "Initiating Over-the-air Update. This will take a moment, please be patient.", 35); _server.send(200, "text/html", response); }, [&]() { @@ -463,7 +464,7 @@ void WebCfgServer::buildOtaHtml(String &response) void WebCfgServer::buildMqttConfigHtml(String &response) { response.concat("