kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
more debug output for wifi scan
rodzic
b191f707dc
commit
c5ddec7a14
|
@ -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,7 +1053,8 @@ 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
|
||||
Serial.print("Connecting to: "); Serial.println(fetchWifiSSID(index));
|
||||
|
|
Ładowanie…
Reference in New Issue