Update ports/esp32s2/common-hal/wifi/Radio.c

adding suggested changes
This commit is contained in:
BennyE 2020-11-20 09:40:32 +01:00 committed by GitHub
parent 6760cdf678
commit 2773f534c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,6 +146,8 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
// This will ensure that the best AP in range is chosen automatically
if ((config->sta.bssid_set == 0) && (config->sta.channel == 0)) {
config->sta.scan_method = WIFI_ALL_CHANNEL_SCAN;
} else {
config->sta.scan_method = WIFI_FAST_SCAN;
}
esp_wifi_set_config(ESP_IF_WIFI_STA, config);
self->starting_retries = 5;