Skip to content

Commit efeda1f

Browse files
committed
feat(ota): add fallback OTA implementation for ESP-IDF < 4.0
1 parent 30417aa commit efeda1f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/platforms/esp/32/ota/ota_impl.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
#if defined(ESP32)
55

66
#include "platforms/ota.h"
7+
#include "platforms/esp/esp_version.h"
8+
9+
// OTA requires IDF 4.0 or higher for HTTP server and OTA APIs
10+
// For IDF 3.3 and earlier, fall back to null implementation
11+
#if ESP_IDF_VERSION_4_OR_HIGHER
712

813
// ESP-IDF headers
914
#include <esp_http_server.h>
@@ -772,4 +777,6 @@ fl::shared_ptr<IOTA> platform_create_ota() {
772777
} // namespace platforms
773778
} // namespace fl
774779

780+
#endif // ESP_IDF_VERSION_4_OR_HIGHER
781+
775782
#endif // ESP32

0 commit comments

Comments
 (0)