Restored functinality to disable WIFI AP mode with at runtime with a setting.

Restored ifdefs for double battery and charger.
This commit is contained in:
Paul Brand 2024-08-27 14:29:48 +02:00
parent ce93284b51
commit 573658e573
4 changed files with 14 additions and 20 deletions

View file

@ -38,11 +38,15 @@ unsigned long last_wifi_attempt_time = millis(); //init millis so wifi monitor
void init_webserver() {
// Configure WiFi
#ifdef WIFIAP
WiFi.mode(WIFI_AP_STA); // Simultaneous WiFi AP and Router connection
init_WiFi_AP();
if (AccessPointEnabled) {
WiFi.mode(WIFI_AP_STA); // Simultaneous WiFi AP and Router connection
init_WiFi_AP();
} else {
WiFi.mode(WIFI_STA); // Only Router connection
}
#else
WiFi.mode(WIFI_STA); // Only Router connection
#endif
#endif // WIFIAP
init_WiFi_STA(ssid.c_str(), password.c_str(), wifi_channel);
String content = index_html;