Show AP IP if no connection handler

This commit is contained in:
Gunnar Skjold 2023-12-10 17:31:39 +01:00
parent 194905237b
commit 91958f5464

View File

@ -259,7 +259,13 @@ void AmsWebServer::sysinfoJson() {
IPAddress dns1;
IPAddress dns2;
if(ch != NULL) {
if(ch == NULL) {
localIp = WiFi.softAPIP();
subnet = IPAddress(255,255,255,0);
gateway = WiFi.subnetMask();
dns1 = WiFi.dnsIP(0);
dns2 = WiFi.dnsIP(1);
} else {
localIp = ch->getIP();
subnet = ch->getSubnetMask();
gateway = ch->getGateway();