Flag non-ICAO addresses in json output.
This commit is contained in:
parent
d0605629b6
commit
6e1315e3a6
2
net_io.c
2
net_io.c
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue