mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-07-06 06:08:22 +00:00
Merge branch 'main' into HendrikRauh/issue31
This commit is contained in:
commit
b6d74857f2
10 changed files with 11913 additions and 11913 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue