diff --git a/lib/framework/NetworkSettingsService.cpp b/lib/framework/NetworkSettingsService.cpp index 0cf7d6d55..ad2cf0e9c 100644 --- a/lib/framework/NetworkSettingsService.cpp +++ b/lib/framework/NetworkSettingsService.cpp @@ -7,6 +7,7 @@ NetworkSettingsService::NetworkSettingsService(AsyncWebServer * server, FS * fs, , _fsPersistence(NetworkSettings::read, NetworkSettings::update, this, fs, NETWORK_SETTINGS_FILE) , _lastConnectionAttempt(0) { addUpdateHandler([&](const String & originId) { reconfigureWiFiConnection(); }, false); + WiFi.onEvent(std::bind(&NetworkSettingsService::WiFiEvent, this, _1)); } void NetworkSettingsService::begin() { @@ -22,15 +23,12 @@ void NetworkSettingsService::begin() { WiFi.mode(WIFI_MODE_MAX); WiFi.mode(WIFI_MODE_NULL); - WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); // default is FAST_SCAN - WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); // is default, no need to set + // WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); // default is FAST_SCAN, connect issues in 2.0.14 + // WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); // is default, no need to set - WiFi.onEvent(std::bind(&NetworkSettingsService::WiFiEvent, this, _1)); _fsPersistence.readFromFS(); // reconfigureWiFiConnection(); - _lastConnectionAttempt = 0; - _stopping = false; } void NetworkSettingsService::reconfigureWiFiConnection() { @@ -108,7 +106,7 @@ void NetworkSettingsService::WiFiEvent(WiFiEvent_t event) { _stopping = false; } } - if (!_stopping && (event == ARDUINO_EVENT_WIFI_STA_LOST_IP || event == ARDUINO_EVENT_WIFI_STA_DISCONNECTED)) { - reconfigureWiFiConnection(); - } + // if (!_stopping && (event == ARDUINO_EVENT_WIFI_STA_LOST_IP || event == ARDUINO_EVENT_WIFI_STA_DISCONNECTED)) { + // reconfigureWiFiConnection(); + // } } diff --git a/src/version.h b/src/version.h index d3e789318..74e8e77ac 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.6.3-dev.4e" +#define EMSESP_APP_VERSION "3.6.3-dev.4f"