fix setting the hostname
This commit is contained in:
parent
cccb6c9a97
commit
9bb11299d2
@ -16,10 +16,9 @@ namespace Wifi {
|
|||||||
tWifiConnected.restart();
|
tWifiConnected.restart();
|
||||||
});
|
});
|
||||||
|
|
||||||
WiFi.hostname("esp-clock");
|
|
||||||
|
|
||||||
ESP8266WiFiMulti wifiMulti;
|
ESP8266WiFiMulti wifiMulti;
|
||||||
for (int i = 0; i < sizeof(credentials)/sizeof(WifiCredentials); i++) {
|
for (uint32_t i = 0; i < sizeof(credentials) / sizeof(WifiCredentials); i++) {
|
||||||
wifiMulti.addAP(credentials[i].ssid, credentials[i].password);
|
wifiMulti.addAP(credentials[i].ssid, credentials[i].password);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,6 +26,7 @@ namespace Wifi {
|
|||||||
while (wifiMulti.run() != WL_CONNECTED) {
|
while (wifiMulti.run() != WL_CONNECTED) {
|
||||||
delay(500);
|
delay(500);
|
||||||
}
|
}
|
||||||
|
WiFi.setHostname("esp-clock");
|
||||||
currentSSID = WiFi.SSID();
|
currentSSID = WiFi.SSID();
|
||||||
currentPsk = WiFi.psk();
|
currentPsk = WiFi.psk();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user