Merge branch 'main' into HendrikRauh/issue33

This commit is contained in:
Hendrik Rauh 2025-02-16 17:35:17 +01:00 committed by GitHub
commit 34aa221c9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 11899 additions and 11901 deletions

View file

@ -52,7 +52,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};
@ -160,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();
@ -194,7 +193,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

View file

@ -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);