fixed WiFi-Client Feature
This commit is contained in:
		| @@ -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"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user