Merge pull request #56 from HendrikRauh/warnings-fix

Warnings fix
This commit is contained in:
Raffael Wolf 2025-02-16 17:34:49 +01:00 committed by GitHub
commit ebb1948216
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 7 deletions

View file

@ -20,7 +20,7 @@ refreshButton.addEventListener("click", async () => {
// check if connected via WiFi-Station // check if connected via WiFi-Station
if (data.connection === 0) { if (data.connection === 0) {
// show currently connected wifi // show currently connected WiFi
insertNetworks([data.ssid]); insertNetworks([data.ssid]);
} }
@ -68,6 +68,6 @@ async function loadNetworks() {
async function updateNetworks() { async function updateNetworks() {
const networks = await loadNetworks(); const networks = await loadNetworks();
if (networks) { if (networks) {
insertNetworks(["", ...networks], true); insertNetworks(["", ...networks]);
} }
} }

View file

@ -51,7 +51,6 @@ void IRAM_ATTR onTimer()
#define ETH_MOSI 35 #define ETH_MOSI 35
#define ETH_MISO 37 #define ETH_MISO 37
#define ETH_INT 38 #define ETH_INT 38
#define ETH_SPI_HOST SPI2_HOST
#define ETH_SPI_CLOCK_MHZ 25 #define ETH_SPI_CLOCK_MHZ 25
byte mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; byte mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
@ -159,7 +158,7 @@ void setup()
// Default IP as defined in standard https://art-net.org.uk/downloads/art-net.pdf, page 13 // 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 ip = config.getUInt("ip", DEFAULT_IP);
IPAddress subnet = config.getUInt("subnet", DEFAULT_SUBNET); IPAddress subnet = config.getUInt("subnet", DEFAULT_SUBNET);
IPAddress gateway = config.getUInt("gateway", NULL); IPAddress gateway = config.getUInt("gateway", 0);
config.end(); config.end();
@ -193,7 +192,7 @@ void setup()
Serial.println("Initialize as ETH"); Serial.println("Initialize as ETH");
ESP32_W5500_onEvent(); 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 { // Dynamic IP setup
} }
else else

View file

@ -78,7 +78,7 @@ void onGetConfig(AsyncWebServerRequest *request)
IPAddress ip = config.getUInt("ip", DEFAULT_IP); IPAddress ip = config.getUInt("ip", DEFAULT_IP);
IPAddress subnet = config.getUInt("subnet", DEFAULT_SUBNET); IPAddress subnet = config.getUInt("subnet", DEFAULT_SUBNET);
IPAddress gateway = config.getUInt("gateway", NULL); IPAddress gateway = config.getUInt("gateway", 0);
JsonDocument doc; JsonDocument doc;
doc["connection"] = config.getUInt("connection", DEFAULT_CONNECTION); 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-method"] = config.getUInt("ip-method", DEFAULT_IP_METHOD);
doc["ip"] = ip.toString(); doc["ip"] = ip.toString();
doc["subnet"] = subnet.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["universe-1"] = config.getUInt("universe-1", DEFAULT_UNIVERSE1);
doc["direction-1"] = config.getUInt("direction-1", DEFAULT_DIRECTION1); doc["direction-1"] = config.getUInt("direction-1", DEFAULT_DIRECTION1);
doc["universe-2"] = config.getUInt("universe-2", DEFAULT_UNIVERSE2); doc["universe-2"] = config.getUInt("universe-2", DEFAULT_UNIVERSE2);