more debug output for wifi scan

This commit is contained in:
Hansi, dl9rdz 2019-04-28 23:36:59 +02:00
parent b191f707dc
commit c5ddec7a14
1 changed files with 7 additions and 2 deletions

View File

@ -434,7 +434,11 @@ void SetupAsyncServer() {
int fetchWifiIndex(const char *id) {
for (int i = 0; i < nNetworks; i++) {
if (strcmp(id, networks[i].id.c_str()) == 0) return i;
if (strcmp(id, networks[i].id.c_str()) == 0) {
Serial.printf("Match for %s at %d\n", id, i);
return i;
}
Serial.printf("No match: '%s' vs '%s'\n", id, networks[i].id.c_str());
}
return -1;
}
@ -1049,6 +1053,7 @@ void loopWifiScan() {
int curidx = fetchWifiIndex(id);
if (curidx >= 0 && index == -1) {
index = curidx;
Serial.printf("Match found at scan entry %d, config network %d\n", i, index);
}
}
if (index >= 0) { // some network was found