Skip to content

Commit

Permalink
add wifitest3 (#19259)
Browse files Browse the repository at this point in the history
  • Loading branch information
Staars authored Aug 4, 2023
1 parent e2c79b4 commit 732e410
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tasmota/tasmota_support/support_command.ino
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,15 @@ void CmndWifiTest(void)
if (0 == XdrvMailbox.index) { Wifi.wifi_Test_Restart = true; } // If WifiTest is successful, save data on SSID1 and restart
if (2 == XdrvMailbox.index) { Wifi.wifi_Test_Save_SSID2 = true; } // If WifiTest is successful, save data on SSID2

SettingsUpdateText(Wifi.wifi_Test_Save_SSID2 ? SET_STASSID2 : SET_STASSID1, ssid_test);
SettingsUpdateText(Wifi.wifi_Test_Save_SSID2 ? SET_STAPWD2 : SET_STAPWD1, pswd_test);
if (3 != XdrvMailbox.index) { // WifiTest3 never ever makes anything persistent, thus works without webserver
SettingsUpdateText(Wifi.wifi_Test_Save_SSID2 ? SET_STASSID2 : SET_STASSID1, ssid_test);
SettingsUpdateText(Wifi.wifi_Test_Save_SSID2 ? SET_STAPWD2 : SET_STAPWD1, pswd_test);
}

AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_WIFI D_CONNECTING_TO_AP " %s " D_AS " %s ..."),
SettingsText(Wifi.wifi_Test_Save_SSID2 ? SET_STASSID2 : SET_STASSID1), TasmotaGlobal.hostname);
ssid_test, TasmotaGlobal.hostname);

WiFi.begin(SettingsText(Wifi.wifi_Test_Save_SSID2 ? SET_STASSID2 : SET_STASSID1), SettingsText(Wifi.wifi_Test_Save_SSID2 ? SET_STAPWD2 : SET_STAPWD1));
WiFi.begin(ssid_test,pswd_test);
}
} else {
ResponseCmndChar(D_JSON_BUSY);
Expand Down Expand Up @@ -2746,4 +2748,4 @@ void CmndTouchThres(void) {
}
#endif // ESP32 SOC_TOUCH_VERSION_1 or SOC_TOUCH_VERSION_2

#endif // ESP32
#endif // ESP32

0 comments on commit 732e410

Please sign in to comment.