Fixes ethernet initialisation of static IP settings. Also corrected some debug messages.

This commit is contained in:
brettbear
2026-01-02 18:25:46 +11:00
parent 979e3fd1f7
commit 60b2c3bb54
2 changed files with 17 additions and 14 deletions

View File

@@ -49,13 +49,6 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
//long vid = doc[F("vid")]; // 2010020
#ifdef WLED_USE_ETHERNET
JsonObject ethernet = doc[F("eth")];
CJSON(ethernetType, ethernet["type"]);
// NOTE: Ethernet configuration takes priority over other use of pins
initEthernet();
#endif
JsonObject id = doc["id"];
getStringFromJson(cmDNS, id[F("mdns")], 33);
getStringFromJson(serverDescription, id[F("name")], 33);
@@ -125,6 +118,14 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
}
}
// https://github.com/wled/WLED/issues/5247
#ifdef WLED_USE_ETHERNET
JsonObject ethernet = doc[F("eth")];
CJSON(ethernetType, ethernet["type"]);
// NOTE: Ethernet configuration takes priority over other use of pins
initEthernet();
#endif
JsonObject ap = doc["ap"];
getStringFromJson(apSSID, ap[F("ssid")], 33);
getStringFromJson(apPass, ap["psk"] , 65); //normally not present due to security