Merge branch 'main' into 30-add-dmx-in-capability

This commit is contained in:
Raffael Wolf 2025-02-16 17:42:05 +01:00 committed by GitHub
commit f3ef3aa9b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 11899 additions and 11901 deletions

View file

@ -65,7 +65,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];
@ -195,7 +194,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();
@ -231,7 +230,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);