File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ static bool isIp(const String &str) {
3333}
3434
3535static 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
3939static 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 ;
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments