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 3 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
}
}
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