From a147f4120c86514aa053527552f7d4b93e19ef90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Mon, 26 May 2025 18:19:20 +0200 Subject: [PATCH] Compile fix --- wled00/wled_server.cpp | 4 +++- wled00/xml.cpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 213eae9c8..f4a96761c 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -33,7 +33,7 @@ static bool isIp(const String &str) { } static bool inSubnet(const IPAddress &ip, const IPAddress &subnet, const IPAddress &mask) { - return ((ip & mask) == (subnet & mask)); + return (((uint32_t)ip & (uint32_t)mask) == ((uint32_t)subnet & (uint32_t)mask)); } static bool inSameSubnet(const IPAddress &client) { @@ -653,6 +653,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) { #endif case SUBPAGE_UM : content = PAGE_settings_um; len = PAGE_settings_um_length; break; case SUBPAGE_UPDATE : content = PAGE_update; len = PAGE_update_length; + #ifdef ARDUINO_ARCH_ESP32 if (request->hasArg(F("revert")) && inLocalSubnet(request->client()->remoteIP()) && Update.canRollBack()) { doReboot = Update.rollBack(); if (doReboot) { @@ -662,6 +663,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) { } return; } + #endif break; #ifndef WLED_DISABLE_2D case SUBPAGE_2D : content = PAGE_settings_2D; len = PAGE_settings_2D_length; break; diff --git a/wled00/xml.cpp b/wled00/xml.cpp index abdc4219c..da5a6b656 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -663,6 +663,9 @@ void getSettingsJS(byte subPage, Print& settingsScript) VERSION); printSetClassElementHTML(settingsScript,PSTR("sip"),0,tmp_buf); + #ifndef ARDUINO_ARCH_ESP32 + settingsScript.print(F("toggle('rev');")); // hide revert button on ESP8266 + #endif } if (subPage == SUBPAGE_2D) // 2D matrices