fixed WiFi-Client Feature
This commit is contained in:
parent
aeab80d5a8
commit
e344977b8f
@ -27,7 +27,7 @@ upload_speed = 921600
|
||||
build_flags=
|
||||
!python git_rev_macro.py
|
||||
-DATOMIC_FS_UPDATE
|
||||
;-DFEATURE_ENABLE_WIFI_CLIENT
|
||||
-DFEATURE_ENABLE_WIFI_CLIENT
|
||||
;-DFEATURE_ENABLE_LORA
|
||||
;-DCAPTIVE
|
||||
-DWIFI_AP_IP_GW=10,0,1,1
|
||||
|
@ -134,7 +134,7 @@ void setup()
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.setHostname(globals.DeviceName);
|
||||
wifiMulti.addAP(QUOTE(WIFI_SSID_CLIENT), QUOTE(WIFI_PASSWORD_CLIENT));
|
||||
WiFiMaintainConnectionTicker.start();
|
||||
tmrWiFiMaintainConnection.start();
|
||||
#else
|
||||
WiFi.mode(WIFI_OFF);
|
||||
#endif
|
||||
@ -231,7 +231,7 @@ void loop()
|
||||
#ifdef CAPTIVE
|
||||
dnsServer.processNextRequest();
|
||||
#endif
|
||||
#ifdef WIFI_CLIENT
|
||||
#ifdef FEATURE_ENABLE_WIFI_CLIENT
|
||||
tmrWiFiMaintainConnection.update();
|
||||
#endif
|
||||
if (globals.systemStatus == sysStat_Shutdown)
|
||||
@ -446,7 +446,7 @@ void tmrCallback_WiFiMaintainConnection()
|
||||
}
|
||||
else
|
||||
{
|
||||
debugV("WiFi not connected! - Start AP");
|
||||
Debug_pushMessage("WiFi not connected! - Start AP");
|
||||
toggleWiFiAP();
|
||||
}
|
||||
}
|
||||
@ -460,7 +460,7 @@ void toggleWiFiAP(boolean shutdown)
|
||||
WiFi.mode(WIFI_OFF);
|
||||
Serial.println("WiFi turned off");
|
||||
#ifdef FEATURE_ENABLE_WIFI_CLIENT
|
||||
WiFiMaintainConnectionTicker.stop();
|
||||
tmrWiFiMaintainConnection.stop();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@ -469,7 +469,7 @@ void toggleWiFiAP(boolean shutdown)
|
||||
WiFi.softAPConfig(IPAddress(WIFI_AP_IP_GW), IPAddress(WIFI_AP_IP_GW), IPAddress(255, 255, 255, 0));
|
||||
WiFi.softAP(QUOTE(WIFI_AP_SSID), QUOTE(WIFI_AP_PASSWORD));
|
||||
#ifdef FEATURE_ENABLE_WIFI_CLIENT
|
||||
WiFiMaintainConnectionTicker.stop();
|
||||
tmrWiFiMaintainConnection.stop();
|
||||
Serial.println("WiFi AP started, stopped Maintain-Timer");
|
||||
#else
|
||||
Serial.println("WiFi AP started");
|
||||
|
Loading…
x
Reference in New Issue
Block a user