corrected default values for ip addresses

This commit is contained in:
RaffaelW 2024-12-15 21:08:42 +01:00
parent a6500cb8cc
commit 140d43f58b
3 changed files with 4 additions and 4 deletions

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", DEFAULT_GATEWAY);
IPAddress gateway = config.getUInt("gateway", NULL);
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.toString();
doc["gateway"] = gateway != NULL ? 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);