Connect Wifi to strongest AP

* do full channel scan
  * connect to strongest AP
This commit is contained in:
helgeerbe 2023-02-20 09:51:21 +01:00
parent 6a6165e8c5
commit 07f4473a4e

View File

@ -121,6 +121,8 @@ void NetworkSettingsClass::setupMode()
dnsServer->stop();
dnsServerStatus = false;
if (_networkMode == network_mode::WiFi) {
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL);
WiFi.mode(WIFI_STA);
} else {
WiFi.mode(WIFI_MODE_NULL);