mirror of
https://github.com/wled/WLED.git
synced 2026-04-20 14:12:55 +00:00
more V4 vs V5 compatibility fixes
This commit is contained in:
@@ -14,7 +14,7 @@ default_envs =
|
||||
; nodemcuv2
|
||||
; esp8266_2m
|
||||
; esp01_1m_full
|
||||
; nodemcuv2_160
|
||||
nodemcuv2_160 ;; 8266 regression test build
|
||||
; esp8266_2m_160
|
||||
; esp01_1m_full_160
|
||||
; nodemcuv2_compat
|
||||
@@ -513,6 +513,7 @@ build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_
|
||||
-DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3
|
||||
-D WLED_DISABLE_INFRARED ;; TODO: remove once we have updated for V5
|
||||
-D WLED_USE_SHARED_RMT ;; TODO: disabled NeoEsp32RmtMethodIsr
|
||||
-D WLED_USE_ETHERNET -D RLYPIN=-1 -D BTNPIN=-1 ;; TODO: this is just for testing - remove before merging to main
|
||||
lib_deps = ${esp32_idf_V4.lib_deps}
|
||||
lib_ignore =
|
||||
NeoESP32RmtHI ;; TODO: disabled NeoEsp32RmtMethodIsr
|
||||
|
||||
@@ -231,7 +231,8 @@ bool initEthernet()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ETH.begin(
|
||||
#if defined(ESP_IDF_VERSION) && (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0))
|
||||
if (!ETH.begin( // parameter order in V5 has changed
|
||||
(eth_phy_type_t) es.eth_type,
|
||||
(int32_t) es.eth_address,
|
||||
(int) es.eth_mdc,
|
||||
@@ -239,6 +240,16 @@ bool initEthernet()
|
||||
(int) es.eth_power,
|
||||
(eth_clock_mode_t) es.eth_clk_mode
|
||||
)) {
|
||||
#else
|
||||
if (!ETH.begin(
|
||||
(uint8_t) es.eth_address,
|
||||
(int) es.eth_power,
|
||||
(int) es.eth_mdc,
|
||||
(int) es.eth_mdio,
|
||||
(eth_phy_type_t) es.eth_type,
|
||||
(eth_clock_mode_t) es.eth_clk_mode
|
||||
)) {
|
||||
#endif
|
||||
DEBUG_PRINTLN(F("initE: ETH.begin() failed"));
|
||||
// de-allocate the allocated pins
|
||||
for (managed_pin_type mpt : pinsToAllocate) {
|
||||
|
||||
@@ -270,7 +270,7 @@ private:
|
||||
EA_DEBUGLN(body);
|
||||
});
|
||||
#ifndef ESPALEXA_NO_SUBPAGE
|
||||
serverAsync->on("/espalexa", HTTP_GET, [=](AsyncWebServerRequest *request){server = request; servePage();});
|
||||
serverAsync->on("/espalexa", HTTP_GET, [this](AsyncWebServerRequest *request){server = request; servePage();});
|
||||
#endif
|
||||
serverAsync->on("/description.xml", HTTP_GET, [this](AsyncWebServerRequest *request){server = request; serveDescription();}); // fix: implicit capture of "this"
|
||||
serverAsync->begin();
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
#endif
|
||||
#include "mbedtls/sha1.h" // for SHA1 on ESP32
|
||||
#include "esp_efuse.h"
|
||||
#include "esp_chip_info.h"
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
|
||||
#include <esp_mac.h> // V5 requirement
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user