diff --git a/net_io.c b/net_io.c index bb3ae1a..51a7a61 100644 --- a/net_io.c +++ b/net_io.c @@ -2089,7 +2089,8 @@ static void writeFATSV() (callsignValid && strcmp(a->callsign, a->fatsv_emitted_callsign) != 0) || (airgroundValid && a->airground == AG_AIRBORNE && a->fatsv_emitted_airground == AG_GROUND) || (airgroundValid && a->airground == AG_GROUND && a->fatsv_emitted_airground == AG_AIRBORNE) || - (squawkValid && a->squawk != a->fatsv_emitted_squawk); + (squawkValid && a->squawk != a->fatsv_emitted_squawk) || + (trackDataValid(&a->emergency_valid) && a->emergency != a->fatsv_emitted_emergency); uint64_t minAge; if (immediate) { @@ -2227,6 +2228,7 @@ static void writeFATSV() a->fatsv_emitted_sil = a->sil; a->fatsv_emitted_sil_type = a->sil_type; a->fatsv_emitted_nic_baro = a->nic_baro; + a->fatsv_emitted_emergency = a->emergency; a->fatsv_last_emitted = now; if (forceEmit) { a->fatsv_last_force_emit = now; diff --git a/track.h b/track.h index 721f7cc..05f264f 100644 --- a/track.h +++ b/track.h @@ -236,6 +236,7 @@ struct aircraft { unsigned fatsv_emitted_sil; // -"- SIL sil_type_t fatsv_emitted_sil_type; // -"- SIL supplement unsigned fatsv_emitted_nic_baro; // -"- NICbaro + emergency_t fatsv_emitted_emergency; // -"- emergency/priority status uint64_t fatsv_last_emitted; // time (millis) aircraft was last FA emitted uint64_t fatsv_last_force_emit; // time (millis) we last emitted only-on-change data