mirror of
https://github.com/esphome/esphome.git
synced 2025-09-12 00:02:21 +01:00
Run clang-tidy against ESP32 (#2147)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -581,7 +581,7 @@ wl_status_t WiFiComponent::wifi_sta_status_() {
|
||||
}
|
||||
}
|
||||
bool WiFiComponent::wifi_scan_start_() {
|
||||
static bool FIRST_SCAN = false;
|
||||
static bool first_scan = false;
|
||||
|
||||
// enable STA
|
||||
if (!this->wifi_mode_(true, {}))
|
||||
@@ -595,7 +595,7 @@ bool WiFiComponent::wifi_scan_start_() {
|
||||
config.show_hidden = 1;
|
||||
#if ARDUINO_VERSION_CODE >= VERSION_CODE(2, 4, 0)
|
||||
config.scan_type = WIFI_SCAN_TYPE_ACTIVE;
|
||||
if (FIRST_SCAN) {
|
||||
if (first_scan) {
|
||||
config.scan_time.active.min = 100;
|
||||
config.scan_time.active.max = 200;
|
||||
} else {
|
||||
@@ -603,7 +603,7 @@ bool WiFiComponent::wifi_scan_start_() {
|
||||
config.scan_time.active.max = 500;
|
||||
}
|
||||
#endif
|
||||
FIRST_SCAN = false;
|
||||
first_scan = false;
|
||||
bool ret = wifi_station_scan(&config, &WiFiComponent::s_wifi_scan_done_callback);
|
||||
if (!ret) {
|
||||
ESP_LOGV(TAG, "wifi_station_scan failed!");
|
||||
|
Reference in New Issue
Block a user