log no networks found when scanResult is 0 (#2484)

This commit is contained in:
A C SREEDHAR REDDY 2019-03-03 20:19:16 +05:30 committed by Me No Dev
parent 2ceab7c279
commit dffda0bd6e

View File

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