Minor formatting fixes
This commit is contained in:
parent
2131d86224
commit
59d2646823
@ -61,10 +61,11 @@ void WiFiSettingsService::reconfigureWiFiConnection() {
|
|||||||
// disconnect and de-configure wifi and software access point
|
// disconnect and de-configure wifi and software access point
|
||||||
WiFi.disconnect(true);
|
WiFi.disconnect(true);
|
||||||
|
|
||||||
// configure static ip config for station mode (if set)
|
// configure for static IP
|
||||||
if (_staticIPConfig) {
|
if (_staticIPConfig) {
|
||||||
WiFi.config(_localIP, _gatewayIP, _subnetMask, _dnsIP1, _dnsIP2);
|
WiFi.config(_localIP, _gatewayIP, _subnetMask, _dnsIP1, _dnsIP2);
|
||||||
} else { // else setting dynamic ip config and hostname
|
} else {
|
||||||
|
// configure for DHCP
|
||||||
#if defined(ESP8266)
|
#if defined(ESP8266)
|
||||||
WiFi.config(INADDR_ANY, INADDR_ANY, INADDR_ANY);
|
WiFi.config(INADDR_ANY, INADDR_ANY, INADDR_ANY);
|
||||||
WiFi.hostname(_hostname);
|
WiFi.hostname(_hostname);
|
||||||
@ -79,7 +80,7 @@ void WiFiSettingsService::reconfigureWiFiConnection() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WiFiSettingsService::readIP(JsonObject& root, String key, IPAddress& _ip){
|
void WiFiSettingsService::readIP(JsonObject& root, String key, IPAddress& _ip){
|
||||||
if ( !root[key].is<String>() || !_ip.fromString(root[key].as<String>())){
|
if (!root[key].is<String>() || !_ip.fromString(root[key].as<String>())){
|
||||||
_ip = INADDR_NONE;
|
_ip = INADDR_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user