Flag non-ICAO addresses in json output.

This commit is contained in:
Oliver Jowett 2015-01-22 12:18:14 +00:00
parent d0605629b6
commit 6e1315e3a6

View file

@ -749,7 +749,7 @@ char *generateAircraftJson(const char *url_path, int *len) {
else else
*p++ = ','; *p++ = ',';
p += snprintf(p, end-p, "\n {\"hex\":\"%06x\"", a->addr); p += snprintf(p, end-p, "\n {\"hex\":\"%06x%s\"", a->addr, (a->bFlags & MODES_ACFLAGS_NON_ICAO) ? "~" : "");
if (a->bFlags & MODES_ACFLAGS_SQUAWK_VALID) if (a->bFlags & MODES_ACFLAGS_SQUAWK_VALID)
p += snprintf(p, end-p, ",\"squawk\":\"%04x\"", a->modeA); p += snprintf(p, end-p, ",\"squawk\":\"%04x\"", a->modeA);
if (a->bFlags & MODES_ACFLAGS_CALLSIGN_VALID) if (a->bFlags & MODES_ACFLAGS_CALLSIGN_VALID)