From 04eff1778f4e78a3385d13feb883eeee29dfc392 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 22 Jan 2015 10:59:11 +0000 Subject: [PATCH] Use the right field for CF in DF 18 --- mode_s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mode_s.c b/mode_s.c index 3f2b9e6..87f02f3 100644 --- a/mode_s.c +++ b/mode_s.c @@ -1073,9 +1073,9 @@ void displayModesMessage(struct modesMessage *mm) { displayExtendedSquitter(mm); } else if (mm->msgtype == 18) { // DF 18 printf("DF 18: Extended Squitter.\n"); - printf(" Control Field : %d (%s)\n", mm->ca, cf_str[mm->ca]); - if ((mm->ca == 0) || (mm->ca == 1) || (mm->ca == 5) || (mm->ca == 6)) { - if (mm->ca == 1 || mm->ca == 5) { + 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->cf == 1 || mm->cf == 5) { printf(" Other Address : %06x\n", mm->addr); } else { printf(" ICAO Address : %06x\n", mm->addr);