Skip to content

Commit ca7d7d9

Browse files
committed
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
1 parent 02f14ba commit ca7d7d9

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

wled00/wled_server.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ void initServer()
365365
createEditHandler(correctPIN);
366366

367367
static const char _update[] PROGMEM = "/update";
368-
#ifndef WLED_DISABLE_OTA
369368
//init ota page
370369
server.on(_update, HTTP_GET, [](AsyncWebServerRequest *request){
371370
if (otaLock) {
@@ -419,12 +418,6 @@ void initServer()
419418
}
420419
}
421420
});
422-
#else
423-
server.on(_update, HTTP_GET, [](AsyncWebServerRequest *request){
424-
serveMessage(request, 501, FPSTR(s_notimplemented), F("OTA updating is disabled in this build."), 254);
425-
});
426-
#endif
427-
428421

429422
#ifdef WLED_ENABLE_DMX
430423
server.on(F("/dmxmap"), HTTP_GET, [](AsyncWebServerRequest *request){

0 commit comments

Comments
 (0)