Skip to content

Commit

Permalink
debug: discriminate id to print
Browse files Browse the repository at this point in the history
  • Loading branch information
gromain committed Mar 29, 2022
1 parent 1a2c00e commit eb253fd
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions UAV-Beacon-Monitor/UAV-Beacon-Monitor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,12 @@ void wifi_promiscuous(void* buf, wifi_promiscuous_pkt_type_t type)
time(&beacons_known[u].lastreceived_timestamp);
beacon_tmp.firstreceived_timestamp = beacons_known[u].firstreceived_timestamp; // This is for the log
beacons_known[u].lastreceived_timestamp = beacon_tmp.lastreceived_timestamp; // Update last seen timestamp
Serial.printf("[Beacon] Already known, first seen at %is\n", beacon_tmp.firstreceived_timestamp);
if (beacon_tmp.use_ansi){
Serial.printf("[Beacon] %s Already known, first seen at %is\n", beacon_tmp.id_ansi, beacon_tmp.firstreceived_timestamp);
}
else {
Serial.printf("[Beacon] %s Already known, first seen at %is\n", beacon_tmp.id_fr, beacon_tmp.firstreceived_timestamp);
}
break;
}
}
Expand All @@ -495,8 +500,12 @@ void wifi_promiscuous(void* buf, wifi_promiscuous_pkt_type_t type)
// In case we do, we should purge the oldest beacon out of the structure and replace it by the new one
beacons_known[beacons_count - 1] = beacon_tmp;
Serial.println("[Beacon] New beacon");
Serial.printf("[Beacon] ID FR %s\n", beacon_tmp.id_fr);
Serial.printf("[Beacon] ID ANSI %s\n", beacon_tmp.id_ansi);
if (beacon_tmp.use_ansi) {
Serial.printf("[Beacon] ID ANSI %s\n", beacon_tmp.id_ansi);
}
else {
Serial.printf("[Beacon] ID FR %s\n", beacon_tmp.id_fr);
}

// Show immediately
//beacon_shown = beacons_count - 1;
Expand Down

0 comments on commit eb253fd

Please sign in to comment.