mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 16:56:35 +00:00
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
This commit is contained in:
parent
02f14baad4
commit
ca7d7d9369
@ -365,7 +365,6 @@ void initServer()
|
|||||||
createEditHandler(correctPIN);
|
createEditHandler(correctPIN);
|
||||||
|
|
||||||
static const char _update[] PROGMEM = "/update";
|
static const char _update[] PROGMEM = "/update";
|
||||||
#ifndef WLED_DISABLE_OTA
|
|
||||||
//init ota page
|
//init ota page
|
||||||
server.on(_update, HTTP_GET, [](AsyncWebServerRequest *request){
|
server.on(_update, HTTP_GET, [](AsyncWebServerRequest *request){
|
||||||
if (otaLock) {
|
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
|
#ifdef WLED_ENABLE_DMX
|
||||||
server.on(F("/dmxmap"), HTTP_GET, [](AsyncWebServerRequest *request){
|
server.on(F("/dmxmap"), HTTP_GET, [](AsyncWebServerRequest *request){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user