reduce some code size

This commit is contained in:
J. Nick Koston
2026-01-02 22:53:42 -10:00
parent 039ae65ed8
commit 828a27b1b6
+5 -5
View File
@@ -1968,11 +1968,6 @@ void WiFiComponent::check_roaming_(uint32_t now) {
if (!this->post_connect_roaming_)
return;
// Guard: not for hidden networks (may not appear in scan)
const WiFiAP *selected = this->get_selected_sta_();
if (selected == nullptr || selected->get_hidden())
return;
// Guard: attempt limit
if (this->roaming_attempts_ >= ROAMING_MAX_ATTEMPTS)
return;
@@ -1990,6 +1985,11 @@ void WiFiComponent::check_roaming_(uint32_t now) {
if (current_rssi == WIFI_RSSI_DISCONNECTED)
return;
// Guard: not for hidden networks (may not appear in scan)
const WiFiAP *selected = this->get_selected_sta_();
if (selected == nullptr || selected->get_hidden())
return;
this->roaming_last_check_ = now;
ESP_LOGD(TAG, "Roaming: scanning for better AP (current RSSI %d dBm)", current_rssi);
this->roaming_scan_active_ = true;