diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 04f16bf8..fd3b18f3 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -2,7 +2,9 @@ #include "wled.h" #include "wled_ethernet.h" #include +#ifdef ARDUINO_ARCH_ESP32 #include "esp_ota_ops.h" +#endif #warning WLED-MM GPL-v3. By installing WLED MM you implicitly accept the terms! #if defined(ARDUINO_ARCH_ESP32) && defined(WLED_DISABLE_BROWNOUT_DET) diff --git a/wled00/wled_serial.cpp b/wled00/wled_serial.cpp index 2e2165b1..91efb9c0 100644 --- a/wled00/wled_serial.cpp +++ b/wled00/wled_serial.cpp @@ -1,5 +1,7 @@ #include "wled.h" +#ifdef ARDUINO_ARCH_ESP32 #include "esp_ota_ops.h" +#endif /* * Adalight and TPM2 handler @@ -121,6 +123,7 @@ void handleSerial() Serial.print("WLED"); Serial.write(' '); Serial.println(VERSION); } else if (next == '^') { + #ifdef ARDUINO_ARCH_ESP32 esp_err_t err; const esp_partition_t *boot_partition = esp_ota_get_boot_partition(); const esp_partition_t *running_partition = esp_ota_get_running_partition(); @@ -144,6 +147,9 @@ void handleSerial() } else { USER_PRINTF("Looks like the other partion is invalid as we exepected %s but we booted failsafe to %s. Ignoring boot change.\n",boot_partition->label,running_partition->label); } + #else + USER_PRINTLN("This function is only for ESP32 and newer boards."); + #endif } else if (next == 'X') { forceReconnect = true; // WLEDMM - force reconnect via Serial } else if (next == 0xB0) {updateBaudRate( 115200);