Skip to content

Commit

Permalink
feat(fmgc): add FMGC and FCU
Browse files Browse the repository at this point in the history
feat(pfd): add first version of FMGC data on PFD

feat(pdf): add first version of FCU data on PFD

feat(pfd): adjust PFD mach display logic for FCU data

feat(failures): add FCU to failure list

refactor(pfd): remove some more now unused vars

feat(pfd): adjust PFD selected alt logic for FCU/FMGC

feat(pfd): adjust FMA for FMGC data

fix(fbw): add std namespace resolution after rebase

fix(fbw): fix some build errors

fix(pfd): fix some small errors in the new PFD indications

feat(pfd): add FD fail flag

fix(pfd): fix simvar publisher after rebase

fix(fmgc): move new files after rebase

feat(afs): add FCU initial version, adjust templates for FCU

fix(pfd): fix issues after rebase

temporary fix

feat(afs): add FCU simulink code

feat(fcu): change XML to new LVars, update docs, FLT files and baro selector code

feat(fcu): add new FCU display based on Avionics Framework

feat: split fcu baro display

feat(fcu): add EIS display, add AFS display output provision

fix(pfd): correctly invert FD active signal from FCU

refactor(fbw): remove old FCU init code

feat(afs): add FCU client data

feat(afs): add some missing data to FMGC A bus

feat(fcu): add AFS FCU JS display logic

feat(fcu): add lights test

fix: fix baro unit selector being incorrect at startup

fix(behavior): use new Lvar in alt increment selector

feat(fcu): initial implementation of target selection logic

chore: remove old FCU

fix(pfd): fix multiple small issues in the PFD

fix(fmgc): add time and sim data inputs to FMGC and FCU

feat(fcu): add FMGC word passthrough, add button processing

fix: add back A/THR to keep engine control

fix(fbw): enable reading of FMGC busses when Simulink is active

feat(fcu): update FCU CSS after flybywiresim#7947

fix(pfd/fcu): fix msfssdk usages after update

fix(pfd): fix rebase issues

fix(pfd): dont always show FD FMA box, fix sel HDG display condition

feat(fmgc/fcu): general updates to FG logic

fix(pfd): fix boxing logic for FMA

feat(fmgc): add placeholder FMS inputs

chore(fmgc): remove now unused Lvars

feat(fmgc/fcu): various changes

feat(fmgc/fcu): various changes, add FMS client data

fix(pfd): missing trailing comma after rebase

fix(pfd): actually call function

chore(pfd): fix import after rebase

refactor(pfd): move FG and FCU busses to own publisher

fix(pfd): use FCU bus word for heading QFU indicator

feat(fcu): selection now works properly

fix(failures): fix failures for EFCS/AFS

feat(afs): add first version of failures for FMGC and FCU

fix(pfd): various fixes in the FMA logic

feat(fmgc): various fixes and additions to FMGC discrete inputs

fix(pfd): fix priority for app capability messages

fix(pfd): FD yaw bar logic and sel spd/alt/fd flag blinking

feat(afs): update FCU and FMGC models

feat(afs): add initial FMGC PFD SPD output, add FCU SEL SPD output

fix(pfd): fix ls after rebase

fix after rebase

feat(fmgc): add FLX condition to SRS mode, add A/THR engage conditions

fix(pfd): fix some issues after rebase

feat(pfd): correct size of FD flag

fix(fcu): fixes after rebase

fix(fcu): re-add display color adjustment after rebase

fix(fcu): comment out text shadow due to coherent bug

fix(pfd): fix after rebase
  • Loading branch information
lukecologne committed Jul 17, 2024
1 parent 5a5eb07 commit 7152406
Show file tree
Hide file tree
Showing 74 changed files with 15,783 additions and 5,879 deletions.
197 changes: 179 additions & 18 deletions fbw-a32nx/docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -1300,9 +1300,9 @@ These variables are the interface between the 3D model and the systems/code.

## EIS Display System

- A32NX_EFIS_{side}_NAVAID_{1|2}_MODE
- A32NX_FCU_EFIS_{side}_NAVAID_{1|2}_MODE
- Enum
- Provides the selected NAVAIDs for display on the EFIS
- Provides the selected NAVAID knob posiiton. For use systems, use the FCU discrete words instead.
Value | Meaning
--- | ---
0 | Off
Expand All @@ -1312,9 +1312,9 @@ These variables are the interface between the 3D model and the systems/code.
- L
- R

- A32NX_EFIS_{side}_ND_MODE
- A32NX_FCU_EFIS_{side}_EFIS_MODE
- Enum
- Provides the selected navigation display mode for the EFIS
- Provides the navigation display mode knob position. For use systems, use the FCU discrete words instead.
Value | Meaning
--- | ---
0 | ROSE ILS
Expand All @@ -1326,9 +1326,9 @@ These variables are the interface between the 3D model and the systems/code.
- L
- R

- A32NX_EFIS_{side}_ND_RANGE
- A32NX_FCU_EFIS_{side}_EFIS_RANGE
- Enum
- Provides the selected navigation display range for the EFIS
- Provides the selected navigation display range knob position. For use systems, use the FCU discrete words instead.
Value | Meaning
--- | ---
0 | 10
Expand All @@ -1341,17 +1341,16 @@ These variables are the interface between the 3D model and the systems/code.
- L
- R

- A32NX_EFIS_{side}_OPTION
- Enum
- Provides the selected EFIS option/overlay
Value | Meaning
--- | ---
0 | None
1 | Constraints
2 | VOR/DMEs
3 | Waypoints
4 | NDBs
5 | Airports
- A32NX_FCU_EFIS_{side}_{FILTER}_LIGHT_ON
- Bool
- If the related EFIS filter is selected, this Lvar is true. For use systems, use the FCU discrete words instead.
- {FILTER}
- None
- Constraints
- VOR/DMEs
- Waypoints
- NDBs
- Airports
- {side}
- L
- R
Expand Down Expand Up @@ -3186,7 +3185,169 @@ In the variables below, {number} should be replaced with one item in the set: {
- Bool
## Autoflight (ATA 22)

- - A32NX_FAC_{number}_PUSHBUTTON_PRESSED
- A32NX_FMGC_{number}_HEALTHY
- Indicates if this FMGC is healthy
- Boolean

- A32NX_FMGC_{number}_ATHR_ENGAGED
- Indicates if the A/THR of this FMGC is engaged
- Boolean

- A32NX_FMGC_{number}_FD_ENGAGED
- Indicates if the FD of this FMGC is engaged
- Boolean

- A32NX_FMGC_{number}_AP_ENGAGED
- Indicates if the AP of this FMGC is engaged
- Boolean

- A32NX_FMGC_{number}_ROLL_FD_COMMAND
- The Roll FD command
- Arinc429<Degrees>

- A32NX_FMGC_{number}_PITCH_FD_COMMAND
- The Pitch FD command
- Arinc429<Degrees>

- A32NX_FMGC_{number}_YAW_FD_COMMAND
- The Yaw FD command
- Arinc429<Degrees>

- A32NX_FMGC_{number}_DISCRETE_WORD_5
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:---------------------------------:|
| 11 | Mach Selected |
| 12 | VPATH/SPEED submode active |
| 13 | VPATH/THRUST submode active |
| 14 | V/S selected submode active |
| 15 | FPA selected submode active |
| 16 | Alt selected submode active |
| 19 | AUTO SPD control active |
| 20 | MANUAL SPD control active |
| 24 | Pitch FD bars flashing |
| 27 | SPD Window Display |
| 28 | Top of SPD Synchro |
| 29 | FMS Mach Selection |

- A32NX_FMGC_{number}_DISCRETE_WORD_4
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:---------------------------------:|
| 11 | AP Instinctive Disc |
| 12 | AP Engaged |
| 13 | FD Engaged |
| 14 | LAND TRK mode active |
| 16 | LAND 2 Capability |
| 17 | LAND 3 FAIL PASSIVE Capability |
| 18 | LAND 3 FAIL OP Capability |
| 19 | AP Inop |
| 20 | LAND 2 Inop |
| 21 | LAND 3 FAIL PASSIVE Inop |
| 22 | LAND 3 FAIL OP Inop |
| 23 | LAND 2 Capacity |
| 24 | LAND 3 FAIL PASSIVE Capacity |
| 25 | LAND 3 FAIL OP Capacity |
| 26 | RWY Heading memorized |

- A32NX_FMGC_{number}_ATS_DISCRETE_WORD
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:---------------------------------:|
| 13 | A/THR Engaged |
| 14 | A/THR Active |
| 17 | A/THR Instinctive Disconnect |
| 18 | A/THR SPD MACH mode |
| 19 | FCU Mach Selection |
| 20 | RETARD Mode Active |
| 21 | THRUST N1 Mode Active |
| 22 | THRUST EPR Mode Active |
| 23 | A/THR ALPHA FLOOR |
| 24 | A/THR Inop |

- A32NX_FMGC_{number}_ATS_FMA_DISCRETE_WORD
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:---------------------------------:|
| 11 | TO/GA Display |
| 12 | MCT Display |
| 13 | FLX Display |
| 14 | CLB Display |
| 15 | THR Display |
| 16 | IDLE Display |
| 17 | A.FLOOR Display |
| 18 | SPEED Display |
| 19 | MACH Display |
| 20 | ASYM Display |
| 21 | CLB Demand Display |
| 22 | MCT Demand Display |

- A32NX_FMGC_{number}_DISCRETE_WORD_3
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:---------------------------------:|
| 11 | HDG Preset |
| 12 | ALT ACQ Arm |
| 13 | ALT ACQ Arm Possible |
| 14 | NAV Arm |
| 16 | LOC Arm |
| 17 | FG Approach Phase |
| 18 | FMA LONGI Mode |
| 19 | LOC Backbeam Selection |
| 20 | LAND Arm |
| 21 | GS Capt Before LOC Capt |
| 22 | GLIDE Arm |
| 23 | FINAL DES Arm |
| 24 | CLB Arm |
| 25 | DES Arm |
| 26 | LONG MODE Reset |
| 27 | LAT MODE Reset |
| 28 | QFU Equal COM |
| 29 | FMA Longi Box |

- A32NX_FMGC_{number}_DISCRETE_WORD_1
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:---------------------------------:|
| 11 | Climb Mode |
| 12 | Descent Mode |
| 13 | Immediate Mode |
| 14 | Open Mode |
| 15 | Pitch T/O Mode |
| 16 | Pitch G/A Mode |
| 17 | V/S Mode |
| 18 | FPA Mode |
| 19 | ALT Mode |
| 20 | Track Mode |
| 21 | Capture Mode |
| 22 | G/S Mode |
| 23 | FINAL DES Mode |
| 24 | EXPED Mode |
| 25 | FLARE Mode |
| 26 | FMA Dash Display |
| 27 | FMA SPEED/MACH Preset Display |

- A32NX_FMGC_{number}_DISCRETE_WORD_2
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:---------------------------------:|
| 11 | Runway Mode |
| 12 | NAV Mode |
| 13 | LOC Capture Mode |
| 14 | LOC Track Mode |
| 15 | Roll G/A Mode |
| 16 | HDG Mode |
| 17 | TRK Mode |
| 20 | Runway LOC Submode |
| 21 | H/PATH Submode |
| 22 | HDG Submode |
| 23 | Runway TRK Submode |
| 24 | VOR Submode |
| 25 | ALIGN Submode |
| 26 | ROLLOUT Submode |
| 28 | Roll FD Bars Flashing |

- A32NX_FAC_{number}_PUSHBUTTON_PRESSED
- Boolean

- A32NX_FAC_{number}_HEALTHY
Expand Down
1 change: 1 addition & 0 deletions fbw-a32nx/mach.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = {
msfsAvionicsInstrument('ND'),
msfsAvionicsInstrument('EWD'),
msfsAvionicsInstrument('Clock'),
msfsAvionicsInstrument('FCU'),

reactInstrument('SD'),
reactInstrument('DCDU'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,6 @@
</UseTemplate>
</Template>

<Template Name="FBW_AIRBUS_Push_Metric_Alt_Template">
<DefaultTemplateParameters>
<NODE_ID>AIRBUS_Push_Metric_Alt</NODE_ID>
<ANIM_NAME>AIRBUS_Push_Metric_Alt</ANIM_NAME>
<PART_ID>AIRBUS_Push_Metric_Alt</PART_ID>
<WWISE_EVENT_1>fcubutton</WWISE_EVENT_1>
<WWISE_EVENT_2>fcubutton</WWISE_EVENT_2>
<NORMALIZED_TIME_1>0.1</NORMALIZED_TIME_1>
<NORMALIZED_TIME_2>0.5</NORMALIZED_TIME_2>
<TOOLTIPID>%((L:A32NX_METRIC_ALT_TOGGLE, bool))%{if}TT:COCKPIT.TOOLTIPS.AUTOPILOT_PANEL_METRIC_ALT_TURN_OFF%{else}TT:COCKPIT.TOOLTIPS.AUTOPILOT_PANEL_METRIC_ALT_TURN_ON%{end}</TOOLTIPID>
</DefaultTemplateParameters>

<Component ID="#NODE_ID#" Node="#NODE_ID#">
<UseTemplate Name="ASOBO_GT_Push_Button">
<LEFT_SINGLE_CODE>(L:A32NX_METRIC_ALT_TOGGLE, bool) ! (&gt;L:A32NX_METRIC_ALT_TOGGLE)</LEFT_SINGLE_CODE>
</UseTemplate>
</Component>
</Template>

<Template Name="FBW_AIRBUS_Push_Transfer_Template">
<DefaultTemplateParameters>
<NODE_ID>AIRBUS_Push_Transfer</NODE_ID>
Expand All @@ -62,57 +43,6 @@
</Component>
</Template>

<Template Name="FBW_AIRBUS_NAV_AID_SWITCH_SubTemplate">
<DefaultTemplateParameters>
<ANIM_NAME>#BASE_NAME#</ANIM_NAME>
<NODE_ID>#BASE_NAME#</NODE_ID>
<PART_ID>#BASE_NAME#</PART_ID>
<WWISE_EVENT>lswitch</WWISE_EVENT>

</DefaultTemplateParameters>
<Component ID="#NODE_ID#" Node="#NODE_ID#">
<UseTemplate Name="ASOBO_GT_Switch_3States">
<SWITCH_DIRECTION>Horizontal</SWITCH_DIRECTION>
<CODE_POS_0>
(* LEFT *)
1 (&gt;L:#STATE_VAR_NAME#)
</CODE_POS_0>
<CODE_POS_1>
(* OFF *)
0 (&gt;L:#STATE_VAR_NAME#)
</CODE_POS_1>
<CODE_POS_2>
(* RIGHT *)
2 (&gt;L:#STATE_VAR_NAME#)
</CODE_POS_2>
<STATE0_TEST>(L:#STATE_VAR_NAME#) 1 ==</STATE0_TEST>
<STATE1_TEST>(L:#STATE_VAR_NAME#) 0 ==</STATE1_TEST>
<STATE2_TEST>(L:#STATE_VAR_NAME#) 2 ==</STATE2_TEST>

</UseTemplate>
</Component>
</Template>

<Template Name="FBW_AIRBUS_NAV_AID_SWITCH_Template">
<DefaultTemplateParameters>
<BASE_NAME>UNKNOWN</BASE_NAME>
<PART_ID>NAVAID_Switch</PART_ID>
<ANIMREF_ID>0</ANIMREF_ID>
<ANIMCURSOR_MAX>1</ANIMCURSOR_MAX>
<STATE_VAR_NAME>A32NX_EFIS_#SIDE#_NAVAID_#INDEX#_MODE</STATE_VAR_NAME>
<ANIMTIP_0>TT:COCKPIT.TOOLTIPS.EFIS_PANEL_ADFSWITCH_ADF#INDEX#</ANIMTIP_0>
<ANIMTIP_1>TT:COCKPIT.TOOLTIPS.EFIS_PANEL_ADFSWITCH_OFF#INDEX#</ANIMTIP_1>
<ANIMTIP_2>TT:COCKPIT.TOOLTIPS.EFIS_PANEL_ADFSWITCH_VOR#INDEX#</ANIMTIP_2>
<ANIMTIP_0_ON_PERCENT>0</ANIMTIP_0_ON_PERCENT>
<ANIMTIP_1_ON_PERCENT>.5</ANIMTIP_1_ON_PERCENT>
<ANIMTIP_2_ON_PERCENT>1</ANIMTIP_2_ON_PERCENT>
<ANIM_DURATION>0.5</ANIM_DURATION>
</DefaultTemplateParameters>

<UseTemplate Name="FBW_AIRBUS_NAV_AID_SWITCH_SubTemplate">
</UseTemplate>
</Template>

<Template Name="FBW_AIRBUS_Push_TERRONND_Template">
<DefaultTemplateParameters>
<ID>1</ID>
Expand Down
Loading

0 comments on commit 7152406

Please sign in to comment.