mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
fix WiFiSpi on empty config
This commit is contained in:
parent
08d793c848
commit
8d32de4cc6
@ -181,12 +181,14 @@ void wifiSetup()
|
||||
}
|
||||
|
||||
// attempt to connect to Wifi network
|
||||
int status = WL_IDLE_STATUS; // the Wifi radio's status
|
||||
|
||||
// int status = WL_IDLE_STATUS; // the Wifi radio's status
|
||||
if(!wifiShowAP()) {
|
||||
// while (status != WL_CONNECTED) {
|
||||
Log.notice(F("WIFI: Connecting to : %s"), wifiSsid);
|
||||
// Connect to WPA/WPA2 network
|
||||
status = WiFi.begin(wifiSsid, wifiPassword);
|
||||
// status = WiFi.begin(wifiSsid, wifiPassword);
|
||||
WiFi.begin(wifiSsid, wifiPassword);
|
||||
}
|
||||
// }
|
||||
|
||||
#else
|
||||
@ -214,7 +216,9 @@ void wifiSetup()
|
||||
bool wifiEvery5Seconds()
|
||||
{
|
||||
#if defined(STM32F4xx)
|
||||
if(WiFi.status() == WL_CONNECTED) {
|
||||
if(wifiShowAP()) { // no ssid is set yet wait for user on-screen input
|
||||
return false;
|
||||
} else if(WiFi.status() == WL_CONNECTED) {
|
||||
#else
|
||||
if(WiFi.getMode() != WIFI_STA) {
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user