Skip to content

Commit a147f41

Browse files
committed
Compile fix
1 parent dcd3e07 commit a147f41

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

wled00/wled_server.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static bool isIp(const String &str) {
3333
}
3434

3535
static bool inSubnet(const IPAddress &ip, const IPAddress &subnet, const IPAddress &mask) {
36-
return ((ip & mask) == (subnet & mask));
36+
return (((uint32_t)ip & (uint32_t)mask) == ((uint32_t)subnet & (uint32_t)mask));
3737
}
3838

3939
static bool inSameSubnet(const IPAddress &client) {
@@ -653,6 +653,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) {
653653
#endif
654654
case SUBPAGE_UM : content = PAGE_settings_um; len = PAGE_settings_um_length; break;
655655
case SUBPAGE_UPDATE : content = PAGE_update; len = PAGE_update_length;
656+
#ifdef ARDUINO_ARCH_ESP32
656657
if (request->hasArg(F("revert")) && inLocalSubnet(request->client()->remoteIP()) && Update.canRollBack()) {
657658
doReboot = Update.rollBack();
658659
if (doReboot) {
@@ -662,6 +663,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) {
662663
}
663664
return;
664665
}
666+
#endif
665667
break;
666668
#ifndef WLED_DISABLE_2D
667669
case SUBPAGE_2D : content = PAGE_settings_2D; len = PAGE_settings_2D_length; break;

wled00/xml.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,9 @@ void getSettingsJS(byte subPage, Print& settingsScript)
663663
VERSION);
664664

665665
printSetClassElementHTML(settingsScript,PSTR("sip"),0,tmp_buf);
666+
#ifndef ARDUINO_ARCH_ESP32
667+
settingsScript.print(F("toggle('rev');")); // hide revert button on ESP8266
668+
#endif
666669
}
667670

668671
if (subPage == SUBPAGE_2D) // 2D matrices

0 commit comments

Comments
 (0)