Browse Source

Configure AP fallback at build time

webui
Xose Pérez 6 years ago
parent
commit
7e22a8878e
2 changed files with 4 additions and 1 deletions
  1. +3
    -0
      code/espurna/config/general.h
  2. +1
    -1
      code/espurna/wifi.ino

+ 3
- 0
code/espurna/config/general.h View File

@ -312,6 +312,9 @@
#define WIFI_AP_CAPTIVE 1 // Captive portal enabled when in AP mode
#endif
#ifndef WIFI_FALLBACK_APMODE
#define WIFI_FALLBACK_APMODE 1 // Fallback to AP mode if no STA connection
#endif
#ifndef WIFI_SLEEP_MODE
#define WIFI_SLEEP_MODE WIFI_NONE_SLEEP // WIFI_NONE_SLEEP, WIFI_LIGHT_SLEEP or WIFI_MODEM_SLEEP


+ 1
- 1
code/espurna/wifi.ino View File

@ -40,7 +40,7 @@ void _wifiConfigure() {
#endif
jw.setConnectTimeout(WIFI_CONNECT_TIMEOUT);
wifiReconnectCheck();
jw.enableAPFallback(true);
jw.enableAPFallback(WIFI_FALLBACK_APMODE);
jw.cleanNetworks();
_wifi_ap_mode = getSetting("apmode", WIFI_AP_FALLBACK).toInt();


Loading…
Cancel
Save