fix setting the hostname

This commit is contained in:
Nicu Hodos 2022-01-01 11:50:21 +01:00
parent af85295bb2
commit d9b5b0093e
2 changed files with 3 additions and 3 deletions

View File

@ -16,10 +16,9 @@ namespace Wifi {
tWifiConnected.restart();
});
WiFi.hostname("esp-clock");
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);
}
@ -27,6 +26,7 @@ namespace Wifi {
while (wifiMulti.run() != WL_CONNECTED) {
delay(500);
}
WiFi.setHostname("esp-clock");
currentSSID = WiFi.SSID();
currentPsk = WiFi.psk();
}

View File

@ -28,5 +28,5 @@ build_flags = -D IR=1 -D WIFI_ALWAYS_ON=1
[env:laptop_home]
[env:ota_home]
upload_port = 192.168.5.191
upload_port = esp-clock
upload_protocol = espota