1
0
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:
Oxan van Leeuwen
2021-09-13 18:11:27 +02:00
committed by GitHub
parent a2d2863c72
commit 40c474cd83
74 changed files with 291 additions and 364 deletions

View File

@@ -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!");