mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Add way to disable AP
This commit is contained in:
parent
e964b890c6
commit
9268b61018
3 changed files with 9 additions and 3 deletions
|
@ -42,10 +42,15 @@ unsigned long wifi_connect_current_time;
|
|||
const long wifi_connect_timeout = 5000; // Timeout for WiFi connect in milliseconds
|
||||
|
||||
void init_webserver() {
|
||||
// Configure WiFi
|
||||
WiFi.mode(WIFI_AP_STA); // Simultaneous WiFi Access Point and WiFi STAtion
|
||||
// Configure WiFi
|
||||
#ifdef ENABLE_AP
|
||||
WiFi.mode(WIFI_AP_STA); // Simultaneous WiFi AP and Router connection
|
||||
init_WiFi_AP();
|
||||
init_WiFi_STA(ssid, password);
|
||||
#else
|
||||
WiFi.mode(WIFI_STA); // Only Router connection
|
||||
init_WiFi_STA(ssid, password);
|
||||
#endif
|
||||
|
||||
// Route for root / web page
|
||||
server.on("/", HTTP_GET,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue