Use the time we last saw a message for data validity checks / data age info,
rather than the time we eventually decide to emit it.
This commit is contained in:
parent
a256833e17
commit
f1036702ce
5
net_io.c
5
net_io.c
|
@ -2038,8 +2038,6 @@ static void writeFATSV()
|
||||||
// scan once a second at most
|
// scan once a second at most
|
||||||
next_update = now + 1000;
|
next_update = now + 1000;
|
||||||
|
|
||||||
// Pretend we are "processing a message" so the validity checks work as expected
|
|
||||||
_messageNow = now;
|
|
||||||
for (a = Modes.aircrafts; a; a = a->next) {
|
for (a = Modes.aircrafts; a; a = a->next) {
|
||||||
if (a->messages < 2) // basic filter for bad decodes
|
if (a->messages < 2) // basic filter for bad decodes
|
||||||
continue;
|
continue;
|
||||||
|
@ -2049,6 +2047,9 @@ static void writeFATSV()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pretend we are "processing a message" so the validity checks work as expected
|
||||||
|
_messageNow = a->seen;
|
||||||
|
|
||||||
// some special cases:
|
// some special cases:
|
||||||
int altValid = trackDataValid(&a->altitude_baro_valid);
|
int altValid = trackDataValid(&a->altitude_baro_valid);
|
||||||
int airgroundValid = trackDataValid(&a->airground_valid) && a->airground_valid.source >= SOURCE_MODE_S_CHECKED; // for non-ADS-B transponders, only trust DF11 CA field
|
int airgroundValid = trackDataValid(&a->airground_valid) && a->airground_valid.source >= SOURCE_MODE_S_CHECKED; // for non-ADS-B transponders, only trust DF11 CA field
|
||||||
|
|
Loading…
Reference in a new issue