log no networks found when scanResult is 0 (#2484)
This commit is contained in:
parent
2ceab7c279
commit
dffda0bd6e
@ -55,7 +55,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
|
|||||||
if(scanResult == WIFI_SCAN_RUNNING) {
|
if(scanResult == WIFI_SCAN_RUNNING) {
|
||||||
// scan is running
|
// scan is running
|
||||||
return WL_NO_SSID_AVAIL;
|
return WL_NO_SSID_AVAIL;
|
||||||
} else if(scanResult > 0) {
|
} else if(scanResult >= 0) {
|
||||||
// scan done analyze
|
// scan done analyze
|
||||||
WifiAPlist_t bestNetwork { NULL, NULL };
|
WifiAPlist_t bestNetwork { NULL, NULL };
|
||||||
int bestNetworkDb = INT_MIN;
|
int bestNetworkDb = INT_MIN;
|
||||||
@ -64,7 +64,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
|
|||||||
|
|
||||||
log_i("[WIFI] scan done");
|
log_i("[WIFI] scan done");
|
||||||
|
|
||||||
if(scanResult <= 0) {
|
if(scanResult == 0) {
|
||||||
log_e("[WIFI] no networks found");
|
log_e("[WIFI] no networks found");
|
||||||
} else {
|
} else {
|
||||||
log_i("[WIFI] %d networks found", scanResult);
|
log_i("[WIFI] %d networks found", scanResult);
|
||||||
|
Loading…
Reference in New Issue
Block a user