From 303d3c3fef39a48888468e9ade778f28253c92e8 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 1 Sep 2016 19:11:33 +0100 Subject: [PATCH] Make faup1090 emit iSource to say where the ident came from. --- net_io.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/net_io.c b/net_io.c index 35ee7e6..7dc7fcb 100644 --- a/net_io.c +++ b/net_io.c @@ -1861,6 +1861,21 @@ static void writeFATSV() if (trackDataValidEx(&a->callsign_valid, now, 120000, SOURCE_MODE_S_CHECKED)) { // we accept quite old idents as they shouldn't change often p += snprintf(p, bufsize(p,end), "\tident\t%s", a->callsign); + switch (a->callsign_valid.source) { + case SOURCE_MODE_S: + p += snprintf(p, bufsize(p,end), "\tiSource\tmodes"); + break; + case SOURCE_ADSB: + p += snprintf(p, bufsize(p,end), "\tiSource\tadsb"); + break; + case SOURCE_TISB: + p += snprintf(p, bufsize(p,end), "\tiSource\ttisb"); + break; + default: + p += snprintf(p, bufsize(p,end), "\tiSource\tunknown"); + break; + } + if (a->callsign_valid.source == SOURCE_TISB) { used_tisb = 1; }