Keep OTA headers aligned with the checked-out vendored source

This commit is contained in:
mikecarper committed 2026-10-05 11:56:00 -07:00
1 parent e95cf6d618
commit 7821329851
5 files changed
+12 -6

No files matched your search

@@ -1,4 +1,4 @@
#include <AsyncElegantOTA.h>
#include "AsyncElegantOTA.h"
#include <atomic>
static std::atomic<bool> ota_uploads_enabled{false};
static std::atomic<bool> ota_upload_busy{false};
@@ -11,7 +11,7 @@
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <AsyncElegantOTA.h>
#include "../../arch/esp32/AsyncElegantOTA/src/AsyncElegantOTA.h"
#include <SPIFFS.h>
#include <helpers/esp32/WiFiRadioPolicy.h>
+1 -1
View File
@@ -2,7 +2,7 @@
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <AsyncElegantOTA.h>
#include "../../arch/esp32/AsyncElegantOTA/src/AsyncElegantOTA.h"
#include <Preferences.h>
#include <SPIFFS.h>
#include <esp_ota_ops.h>
+8 -2
View File
@@ -35,6 +35,14 @@ def replace_async_source(build_env, node):
return node
destination = Path(build_env.subst("$BUILD_DIR")) / "patched-esp32-web" / source.name
destination.parent.mkdir(parents=True, exist_ok=True)
if source.name == "AsyncElegantOTA.cpp":
# Quoted includes resolve beside this private source, ahead of any
# stale library include path inherited by PlatformIO's build clone.
for name in ("AsyncElegantOTA.h", "Hash.h", "elegantWebpage.h"):
header = (include_dir / name).read_bytes()
target = destination.parent / name
if not target.exists() or target.read_bytes() != header:
target.write_bytes(header)
if not destination.exists() or destination.read_text(encoding="ascii") != content:
destination.write_text(content, encoding="ascii")
build_env.PrependUnique(CPPPATH=[str(include_dir)])
@@ -42,8 +50,6 @@ def replace_async_source(build_env, node):
def install(build_env):
build_env.PrependUnique(CPPPATH=[str(Path(build_env.subst("$PROJECT_DIR"))
/ "arch/esp32/AsyncElegantOTA/src")])
build_env.AddBuildMiddleware(replace_async_source, "*AsyncTCP*src*AsyncTCP.cpp")
build_env.AddBuildMiddleware(replace_async_source, "*AsyncElegantOTA*src*AsyncElegantOTA.cpp")
+1 -1
View File
@@ -365,7 +365,7 @@ bool ESP32Board::stopOTAUpdate(char reply[]) {
#include <helpers/esp32/WiFiRadioPolicy.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <AsyncElegantOTA.h>
#include "../../arch/esp32/AsyncElegantOTA/src/AsyncElegantOTA.h"
#include <new>
#include <SPIFFS.h>