diff --git a/package-lock.json b/package-lock.json index 42f12801..c6b006a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "wled", - "version": "0.11.0", + "version": "0.11.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/platformio.ini b/platformio.ini index 416bd52c..b61cd88b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -284,7 +284,7 @@ board = esp32-poe platform = espressif32@2.0 upload_speed = 921600 build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET +build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 lib_ignore = ESPAsyncTCP ESPAsyncUDP diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 9b4f99f9..43d2615e 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -71,6 +71,11 @@ void deserializeConfig() { if (apHide > 1) apHide = 1; CJSON(apBehavior, ap[F("behav")]); + + #ifdef WLED_USE_ETHERNET + JsonObject ethernet = doc[F("eth")]; + CJSON(ethernetType, ethernet[F("type")]); + #endif /* JsonArray ap_ip = ap[F("ip")]; @@ -383,6 +388,11 @@ void serializeConfig() { wifi[F("sleep")] = !noWifiSleep; wifi[F("phy")] = 1; + #ifdef WLED_USE_ETHERNET + JsonObject ethernet = doc.createNestedObject("eth"); + ethernet[F("type")] = ethernetType; + #endif + JsonObject hw = doc.createNestedObject("hw"); JsonObject hw_led = hw.createNestedObject("led"); diff --git a/wled00/const.h b/wled00/const.h index ee675536..a7a155b6 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -122,6 +122,10 @@ #define BTN_TYPE_SWITCH 4 //not implemented #define BTN_TYPE_SWITCH_ACT_HIGH 5 //not implemented +//Ethernet board types +#define WLED_ETH_NONE 0 +#define WLED_ETH_WT32_ETH01 1 +#define WLED_ETH_ESP32_POE 2 //Hue error codes #define HUE_ERROR_INACTIVE 0 diff --git a/wled00/data/settings_wifi.htm b/wled00/data/settings_wifi.htm index 819fc58a..3e58609b 100644 --- a/wled00/data/settings_wifi.htm +++ b/wled00/data/settings_wifi.htm @@ -63,7 +63,13 @@