From ca7d7d93691cc99047f8002cec97b564e20133ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sun, 20 Apr 2025 11:01:19 +0200 Subject: [PATCH] Only disable Arduino OTA when using -D WLED_DISABLE_OTA - since Update object is accessible even with ArduinoOTA disabled it should possible to use HTTP OTA regardless - this saves about 12kB while still allowing OTA updates - HTTP OTA updates can be blocked using PIN or OTA lock --- wled00/wled_server.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 06750838f..3da3a7a99 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -365,7 +365,6 @@ void initServer() createEditHandler(correctPIN); static const char _update[] PROGMEM = "/update"; -#ifndef WLED_DISABLE_OTA //init ota page server.on(_update, HTTP_GET, [](AsyncWebServerRequest *request){ if (otaLock) { @@ -419,12 +418,6 @@ void initServer() } } }); -#else - server.on(_update, HTTP_GET, [](AsyncWebServerRequest *request){ - serveMessage(request, 501, FPSTR(s_notimplemented), F("OTA updating is disabled in this build."), 254); - }); -#endif - #ifdef WLED_ENABLE_DMX server.on(F("/dmxmap"), HTTP_GET, [](AsyncWebServerRequest *request){