Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings fix #56

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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]);
}

Expand Down Expand Up @@ -68,6 +68,6 @@ async function loadNetworks() {
async function updateNetworks() {
const networks = await loadNetworks();
if (networks) {
insertNetworks(["", ...networks], true);
insertNetworks(["", ...networks]);
HendrikRauh marked this conversation as resolved.
Show resolved Hide resolved
}
}
5 changes: 2 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -159,7 +158,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();

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/routes/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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() : "";
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gateway 0.0.0.0 will be "" then. Gateway 0.0.0.0 should be invalid anyway if im right.

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);
Expand Down
Loading