Display ES data for DF=18, CF=2 when showing messages verbosely.

Always show an address for DF=18, using the NON_ICAO flag as needed.
This commit is contained in:
Oliver Jowett 2016-01-22 14:36:59 +00:00
parent cc04f315b4
commit 1a2926b311

View file

@ -1200,12 +1200,12 @@ void displayModesMessage(struct modesMessage *mm) {
} else if (mm->msgtype == 18) { // DF 18 } else if (mm->msgtype == 18) { // DF 18
printf("DF 18: Extended Squitter.\n"); printf("DF 18: Extended Squitter.\n");
printf(" Control Field : %d (%s)\n", mm->cf, cf_str[mm->cf]); printf(" Control Field : %d (%s)\n", mm->cf, cf_str[mm->cf]);
if ((mm->cf == 0) || (mm->cf == 1) || (mm->cf == 5) || (mm->cf == 6)) { if (mm->addr & MODES_NON_ICAO_ADDRESS) {
if (mm->cf == 1 || mm->cf == 5) { printf(" Other Address : %06x\n", mm->addr);
printf(" Other Address : %06x\n", mm->addr); } else {
} else { printf(" ICAO Address : %06x\n", mm->addr);
printf(" ICAO Address : %06x\n", mm->addr); }
} if ((mm->cf == 0) || (mm->cf == 1) || (mm->cf == 2) || (mm->cf == 5) || (mm->cf == 6)) {
displayExtendedSquitter(mm); displayExtendedSquitter(mm);
} }