From 7e003097a0e47da2594c99b3e31f1e39a7bb3f50 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 15 Sep 2016 15:09:22 +0100 Subject: [PATCH] faup1090: apply the same update rules to squawks/idents as to other data. --- net_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net_io.c b/net_io.c index ef08516..5315163 100644 --- a/net_io.c +++ b/net_io.c @@ -1904,7 +1904,7 @@ static void writeFATSV() p += snprintf(p, bufsize(p, end), "\taddrtype\t%s", addrtype_short_string(a->addrtype)); } - if (trackDataValidEx(&a->callsign_valid, now, 120000, SOURCE_MODE_S_CHECKED)) { // we accept quite old idents as they shouldn't change often + if (trackDataValidEx(&a->callsign_valid, now, 15000, SOURCE_MODE_S_CHECKED) && a->callsign_valid.updated > a->fatsv_last_emitted) { p += snprintf(p, bufsize(p,end), "\tident\t%s", a->callsign); switch (a->callsign_valid.source) { case SOURCE_MODE_S: @@ -1928,7 +1928,7 @@ static void writeFATSV() useful = 1; } - if (trackDataValidEx(&a->squawk_valid, now, 120000, SOURCE_MODE_S)) { // we accept quite old squawks as they shouldn't change often + if (trackDataValidEx(&a->squawk_valid, now, 15000, SOURCE_MODE_S) && a->squawk_valid.updated > a->fatsv_last_emitted) { p += snprintf(p, bufsize(p,end), "\tsquawk\t%04x", a->squawk); if (a->squawk_valid.source == SOURCE_TISB) { used_tisb = 1;