faup1090: Track Comm-B ACAS RA separately to ES ACAS RA as it's useful to see both reported.

Fix repeated reporting of ES ACAS RA reports.
This commit is contained in:
Oliver Jowett 2016-09-24 16:09:38 +01:00
parent 2bcd0741c9
commit 14a003710e
3 changed files with 6 additions and 3 deletions

View file

@ -1754,10 +1754,10 @@ static void writeFATSVEvent(struct modesMessage *mm, struct aircraft *a)
case 17:
case 18:
// DF 17/18: extended squitter
if (mm->metype == 28 && mm->mesub == 2 && memcmp(&mm->ME[1], &a->fatsv_emitted_bds_30[1], 6) != 0) {
if (mm->metype == 28 && mm->mesub == 2 && memcmp(mm->ME, &a->fatsv_emitted_es_acas_ra, 7) != 0) {
// type 28 subtype 2: ACAS RA report
// first byte has the type/subtype, remaining bytes match the BDS 3,0 format
memcpy(a->fatsv_emitted_bds_30, &mm->ME[1], 6);
memcpy(a->fatsv_emitted_es_acas_ra, mm->ME, 7);
writeFATSVEventMessage(mm, "es_acas_ra", mm->ME, 7);
} else if (mm->metype == 31 && (mm->mesub == 0 || mm->mesub == 1) && memcmp(mm->ME, a->fatsv_emitted_es_status, 7) != 0) {
// aircraft operational status