Tweak tracking of AP modes, emit in json & faup1090 output
This commit is contained in:
parent
e3c8c91852
commit
382554a250
6 changed files with 106 additions and 29 deletions
8
comm_b.c
8
comm_b.c
|
|
@ -383,9 +383,11 @@ static int decodeBDS40(struct modesMessage *mm, bool store)
|
|||
}
|
||||
|
||||
if (mode_valid) {
|
||||
mm->intent.mode_vnav = (mode_raw & 4) ? 1 : 0;
|
||||
mm->intent.mode_alt_hold = (mode_raw & 2) ? 1 : 0;
|
||||
mm->intent.mode_approach = (mode_raw & 1) ? 1 : 0;
|
||||
mm->intent.modes_valid = 1;
|
||||
mm->intent.modes =
|
||||
((mode_raw & 4) ? INTENT_MODE_VNAV : 0) |
|
||||
((mode_raw & 2) ? INTENT_MODE_ALT_HOLD : 0) |
|
||||
((mode_raw & 1) ? INTENT_MODE_APPROACH : 0);
|
||||
}
|
||||
|
||||
if (source_valid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue