From c415ffa8b50b7478ed04364e34d044fb44ce19c6 Mon Sep 17 00:00:00 2001 From: Hendrik Rauh <114620133+HendrikRauh@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:21:05 +0100 Subject: [PATCH 1/5] Removal of an attribute that was too much --- data/networks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/networks.js b/data/networks.js index ac10ca4..0c7aa70 100644 --- a/data/networks.js +++ b/data/networks.js @@ -21,6 +21,7 @@ refreshButton.addEventListener("click", async () => { // check if connected via WiFi-Station if (data.connection === 0) { // show currently connected wifi + // show currently connected WiFi insertNetworks([data.ssid]); } @@ -68,6 +69,6 @@ async function loadNetworks() { async function updateNetworks() { const networks = await loadNetworks(); if (networks) { - insertNetworks(["", ...networks], true); + insertNetworks(["", ...networks]); } } From 48bf64253686d4a805709d1e82e4d8d4fc64fdf7 Mon Sep 17 00:00:00 2001 From: Hendrik Rauh <114620133+HendrikRauh@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:22:10 +0100 Subject: [PATCH 2/5] NULL should not be used here passing NULL to non-pointer argument fixed --- src/routes/config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/config.cpp b/src/routes/config.cpp index d586feb..53aafce 100644 --- a/src/routes/config.cpp +++ b/src/routes/config.cpp @@ -78,7 +78,7 @@ void onGetConfig(AsyncWebServerRequest *request) IPAddress ip = config.getUInt("ip", DEFAULT_IP); IPAddress subnet = config.getUInt("subnet", DEFAULT_SUBNET); - IPAddress gateway = config.getUInt("gateway", NULL); + IPAddress gateway = config.getUInt("gateway", 0); JsonDocument doc; doc["connection"] = config.getUInt("connection", DEFAULT_CONNECTION); @@ -87,7 +87,7 @@ void onGetConfig(AsyncWebServerRequest *request) doc["ip-method"] = config.getUInt("ip-method", DEFAULT_IP_METHOD); doc["ip"] = ip.toString(); doc["subnet"] = subnet.toString(); - doc["gateway"] = gateway != NULL ? gateway.toString() : ""; + doc["gateway"] = gateway != 0 ? gateway.toString() : ""; doc["universe-1"] = config.getUInt("universe-1", DEFAULT_UNIVERSE1); doc["direction-1"] = config.getUInt("direction-1", DEFAULT_DIRECTION1); doc["universe-2"] = config.getUInt("universe-2", DEFAULT_UNIVERSE2); From 0470a4acde87c98f47a210c7f23113d0c576f04b Mon Sep 17 00:00:00 2001 From: Hendrik Rauh <114620133+HendrikRauh@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:27:00 +0100 Subject: [PATCH 3/5] fixed line duplicated by accident --- data/networks.js | 1 - 1 file changed, 1 deletion(-) diff --git a/data/networks.js b/data/networks.js index 0c7aa70..11295bb 100644 --- a/data/networks.js +++ b/data/networks.js @@ -20,7 +20,6 @@ refreshButton.addEventListener("click", async () => { // check if connected via WiFi-Station if (data.connection === 0) { - // show currently connected wifi // show currently connected WiFi insertNetworks([data.ssid]); } From df54c04d211ca65a36b331c3a04ac7d8618690aa Mon Sep 17 00:00:00 2001 From: Hendrik Rauh <114620133+HendrikRauh@users.noreply.github.com> Date: Fri, 20 Dec 2024 21:26:42 +0100 Subject: [PATCH 4/5] fixed NULL pointer warning warning: passing NULL to non-pointer argument 2 of 'uint32_t Preferences::getUInt(const char*, uint32_t)' [-Wconversion-null] --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 40b1153..f985f13 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -159,7 +159,7 @@ void setup() // Default IP as defined in standard https://art-net.org.uk/downloads/art-net.pdf, page 13 IPAddress ip = config.getUInt("ip", DEFAULT_IP); IPAddress subnet = config.getUInt("subnet", DEFAULT_SUBNET); - IPAddress gateway = config.getUInt("gateway", NULL); + IPAddress gateway = config.getUInt("gateway", 0); config.end(); From f77e9a46de5683481a4a1302d013b4488b616364 Mon Sep 17 00:00:00 2001 From: Hendrik Rauh <114620133+HendrikRauh@users.noreply.github.com> Date: Fri, 20 Dec 2024 21:37:27 +0100 Subject: [PATCH 5/5] got rid of the redefinition of SPI2_HOST @psxde pls check if this breaks functionality --- src/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f985f13..d11d3cb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,7 +51,6 @@ void IRAM_ATTR onTimer() #define ETH_MOSI 35 #define ETH_MISO 37 #define ETH_INT 38 -#define ETH_SPI_HOST SPI2_HOST #define ETH_SPI_CLOCK_MHZ 25 byte mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; @@ -193,7 +192,7 @@ void setup() Serial.println("Initialize as ETH"); ESP32_W5500_onEvent(); - if (ETH.begin(ETH_MISO, ETH_MOSI, ETH_SCK, ETH_SS, ETH_INT, ETH_SPI_CLOCK_MHZ, ETH_SPI_HOST, mac)) + if (ETH.begin(ETH_MISO, ETH_MOSI, ETH_SCK, ETH_SS, ETH_INT, ETH_SPI_CLOCK_MHZ, SPI2_HOST, mac)) { // Dynamic IP setup } else