mirror of
https://github.com/esphome/esphome.git
synced 2026-09-13 16:18:41 +00:00
Merge branch 'wifi_roaming_prevent_ping_pong_broken_ap' into integration
This commit is contained in:
@@ -2039,7 +2039,7 @@ void WiFiComponent::check_roaming_(uint32_t now) {
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "Roam scan (%d dBm)", rssi);
|
||||
ESP_LOGD(TAG, "Roam scan (%d dBm, attempt %u/%u)", rssi, this->roaming_attempts_, ROAMING_MAX_ATTEMPTS);
|
||||
this->roaming_state_ = RoamingState::SCANNING;
|
||||
this->wifi_scan_start_(this->passive_scan_);
|
||||
}
|
||||
@@ -2085,7 +2085,8 @@ void WiFiComponent::process_roaming_scan_() {
|
||||
const WiFiAP *selected = this->get_selected_sta_();
|
||||
int8_t improvement = (best == nullptr) ? 0 : best->get_rssi() - current_rssi;
|
||||
if (selected == nullptr || improvement < ROAMING_MIN_IMPROVEMENT) {
|
||||
ESP_LOGV(TAG, "Roam best %+d dB (need +%d)", improvement, ROAMING_MIN_IMPROVEMENT);
|
||||
ESP_LOGV(TAG, "Roam best %+d dB (need +%d), attempt %u/%u", improvement, ROAMING_MIN_IMPROVEMENT,
|
||||
this->roaming_attempts_, ROAMING_MAX_ATTEMPTS);
|
||||
this->release_scan_results_();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user