Browse Source

Start SmartConfig without any networks configured (#1785)

master
Max Prokhorov 5 years ago
committed by GitHub
parent
commit
88b8fcc9e4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      code/espurna/wifi.ino

+ 9
- 0
code/espurna/wifi.ino View File

@ -12,6 +12,7 @@ Copyright (C) 2016-2019 by Xose Pérez <xose dot perez at gmail dot com>
uint32_t _wifi_scan_client_id = 0;
bool _wifi_wps_running = false;
bool _wifi_smartconfig_running = false;
bool _wifi_smartconfig_initial = false;
uint8_t _wifi_ap_mode = WIFI_AP_FALLBACK;
// -----------------------------------------------------------------------------
@ -73,6 +74,10 @@ void _wifiConfigure() {
}
}
#if JUSTWIFI_ENABLE_SMARTCONFIG
if (i == 0) _wifi_smartconfig_initial = true;
#endif
jw.enableScan(getSetting("wifiScan", WIFI_SCAN_NETWORKS).toInt() == 1);
unsigned char sleep_mode = getSetting("wifiSleep", WIFI_SLEEP_MODE).toInt();
@ -608,6 +613,10 @@ void wifiSetup() {
_wifiInject();
_wifiConfigure();
#if JUSTWIFI_ENABLE_SMARTCONFIG
if (_wifi_smartconfig_initial) jw.startSmartConfig();
#endif
// Message callbacks
wifiRegister(_wifiCallback);
#if WIFI_AP_CAPTIVE


Loading…
Cancel
Save