Skip to content

Commit

Permalink
feat(hyd): changed gear lever mechanism / added gear door drag flybyw…
Browse files Browse the repository at this point in the history
  • Loading branch information
Saschl committed Dec 2, 2022
1 parent 8d16889 commit d52ac19
Show file tree
Hide file tree
Showing 65 changed files with 774 additions and 271 deletions.
2 changes: 2 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
1. [FMGC] Fix inbound leg time for holds - @tracernz (Mike)
1. [MCDU] Improved visuals of Init-A and Init-B page - @derl30n (Leon)
1. [MODEL] Added new animated gear gravity extension handle- @tyler58546 (tyler58546), @MoreRightRudder (Mike), @Crocket63 (crocket), @Lantarius
1. [HYD] Custom Lvar for gear lever to fix ground collision bug - @Crocket63 (crocket)
1. [HYD] Randomised per actuator flow restrictions at plane init - @Crocket63 (crocket)
1. [MCDU] Hide stored elements on A/C Status when there are none - @tracernz (Mike)
1. [FMGC] Fix ident for CD legs - @tracernz (Mike)
Expand Down Expand Up @@ -103,6 +104,7 @@
1. [HYD] Fix incorrect gain in down pitch commands - @Crocket63 (crocket)
1. [PFD] Improve appearance of L/DEV and V/DEV scales - @tracernz (Mike)
1. [HYD] Implemented Electro Hydrostatic actuators - @Crocket63 (crocket)
1. [MISC] Change 2 way overhead switches to be also controllable with mouse wheel up/down @patsta32 (Pat)
1. [FAC] Move Speedscale computation to FAC - @lukecologne (luke)
1. [EFB] Added pause at T/D function - @2hwk (2Cas#1022)
1. [RMP] RMPs navigation backup - Julian Sebline (Julian Sebline#8476 on Discord)
Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ members = [
[profile.release]
lto = true
strip = true

[profile.test]
# We enable some basic optimization to prevent stack overflows during testing (flybywiresim/a32nx#7631)
# However, if this interferes with your ability to debug locally you can disable it here
opt-level=1
lto = false
debug-assertions=true
debug=true
12 changes: 12 additions & 0 deletions docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -3369,6 +3369,18 @@ In the variables below, {number} should be replaced with one item in the set: {
- Indicates the position of the gear emergency extension crank handle from 0 to 300 (3 turns)
- Percent

- A32NX_GEAR_LEVER_POSITION_REQUEST
- Indicates that the pilot tries to move the gear lever (1=down)
- Boolean

- A32NX_GEAR_HANDLE_POSITION
- Indicates the actual position of the gear handle
- Percent over 100

- A32NX_GEAR_HANDLE_HITS_LOCK_SOUND
- Indicates that gear lever just hit the baulk lock mechanism
- Boolean

## ATC (ATA 34)

- A32NX_TRANSPONDER_MODE
Expand Down
122 changes: 122 additions & 0 deletions flybywire-aircraft-a320-neo/ModelBehaviorDefs/A32NX/Airbus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,128 @@
</Component>
</Template>

<Template Name = "FBW_Switch_LeftClick_MouseWheel">
<DefaultTemplateParameters>
<ANIM_GUID/>
<ANIM_WRAP>FALSE</ANIM_WRAP>
<SIMVAR_TYPE>bool</SIMVAR_TYPE>
<ANIM_DELTA>FALSE</ANIM_DELTA>
<ANIM_BLENDWEIGHT>1.0</ANIM_BLENDWEIGHT>
<SIMVAR_GROUP>A</SIMVAR_GROUP>
<ADDITIONAL_EVENT_CODE></ADDITIONAL_EVENT_CODE>
</DefaultTemplateParameters>
<EditableTemplateParameters>
<AddParams>
<ANIM_NAME/>
<SIMVAR_TYPE/>
<TOGGLE_EVENT/>
<TOGGLE_EVENT_2/>
<SIMVAR_INDEX_1/>
<SIMVAR_INDEX_2/>
<SIMVAR_NAME/>
<SIMVAR_NAME_2/>
<SIMVAR_GROUP/>
<ADDITIONAL_EVENT_CODE/>
</AddParams>
</EditableTemplateParameters>
<Component ID="#NODE_ID#" Node="#NODE_ID#">
<UseTemplate Name="ASOBO_GT_Anim_Code">
<ANIM_NAME>#ANIM_NAME#</ANIM_NAME>
<PART_ID>#PART_ID#</PART_ID>
<ANIM_LENGTH>100</ANIM_LENGTH>
<Condition NotEmpty="SIMVAR_INDEX_1">
<True>
<ANIM_CODE>(#SIMVAR_GROUP#:#SIMVAR_NAME#:#SIMVAR_INDEX_1#,#SIMVAR_TYPE#) 100 * </ANIM_CODE>
</True>
<False>
<ANIM_CODE> (#SIMVAR_GROUP#:#SIMVAR_NAME#,#SIMVAR_TYPE#) 100 * </ANIM_CODE>
</False>
</Condition>
<ANIM_LAG>600</ANIM_LAG>
</UseTemplate>
<UseTemplate Name="ASOBO_GT_AnimTriggers_2SoundEvents">
<WWISE_EVENT_1>lswitch</WWISE_EVENT_1>
<WWISE_EVENT_2>lswitch</WWISE_EVENT_2>
<ANIM_NAME>#ANIM_NAME#</ANIM_NAME>
</UseTemplate>
<UseTemplate Name="ASOBO_GT_MouseRect">
<Condition NotEmpty="SIMVAR_INDEX_1">
<True>
<TOOLTIPID>%((#SIMVAR_GROUP#:#SIMVAR_NAME#:#SIMVAR_INDEX_1#,#SIMVAR_TYPE#))%{if}#ANIMTIP_1#%{else}#ANIMTIP_0#%{end}</TOOLTIPID>
</True>
<False>
<TOOLTIPID>%((#SIMVAR_GROUP#:#SIMVAR_NAME#,#SIMVAR_TYPE#))%{if}#ANIMTIP_1#%{else}#ANIMTIP_0#%{end}</TOOLTIPID>
</False>
</Condition>
<CURSOR>Hand</CURSOR>
<MOUSEFLAGS_DEFAULT_IM>LeftSingle+WheelUp+WheelDown</MOUSEFLAGS_DEFAULT_IM>
<Condition NotEmpty="SIMVAR_INDEX_1">
<True>
<CALLBACKCODE_DEFAULT_IM>
(M:Event) 'LeftSingle' scmi 0 == if{
(#SIMVAR_GROUP#:#SIMVAR_NAME#:#SIMVAR_INDEX_1#,#SIMVAR_TYPE#) 0 == if{
#SIMVAR_INDEX_1# 1 (&gt;K:2:#TOGGLE_EVENT#)
#SIMVAR_INDEX_2# 1 (&gt;K:2:#TOGGLE_EVENT_2#)
#ADDITIONAL_EVENT_CODE#
} els{
#SIMVAR_INDEX_1# 0 (&gt;K:2:#TOGGLE_EVENT#)
#SIMVAR_INDEX_2# 0 (&gt;K:2:#TOGGLE_EVENT_2#)
#ADDITIONAL_EVENT_CODE#
}
}
(M:Event) 'WheelUp' scmi 0 == if{ (#SIMVAR_GROUP#:#SIMVAR_NAME#:#SIMVAR_INDEX_1#,#SIMVAR_TYPE#) 0 == if{
#SIMVAR_INDEX_1# 1 (&gt;K:2:#TOGGLE_EVENT#)
#SIMVAR_INDEX_2# 1 (&gt;K:2:#TOGGLE_EVENT_2#)
#ADDITIONAL_EVENT_CODE#
} }
(M:Event) 'WheelDown' scmi 0 == if{ (#SIMVAR_GROUP#:#SIMVAR_NAME#:#SIMVAR_INDEX_1#,#SIMVAR_TYPE#) 0 != if{
#SIMVAR_INDEX_1# 0 (&gt;K:2:#TOGGLE_EVENT#)
#SIMVAR_INDEX_2# 0 (&gt;K:2:#TOGGLE_EVENT_2#)
#ADDITIONAL_EVENT_CODE#
} }
</CALLBACKCODE_DEFAULT_IM>
</True>
<False>
<Condition Check="SIMVAR_GROUP" Match="L">
<True>
<CALLBACKCODE_DEFAULT_IM>
(M:Event) 'LeftSingle' scmi 0 == if{
(#SIMVAR_GROUP#:#SIMVAR_NAME#,#SIMVAR_TYPE#) 0 == (&gt;L:#TOGGLE_EVENT#)
#ADDITIONAL_EVENT_CODE#
}
(M:Event) 'WheelUp' scmi 0 == if{ (#SIMVAR_GROUP#:#SIMVAR_NAME#,#SIMVAR_TYPE#) 0 == if{
1 (&gt;L:#TOGGLE_EVENT#)
#ADDITIONAL_EVENT_CODE#
} }
(M:Event) 'WheelDown' scmi 0 == if{ (#SIMVAR_GROUP#:#SIMVAR_NAME#,#SIMVAR_TYPE#) 0 != if{
0 (&gt;L:#TOGGLE_EVENT#)
#ADDITIONAL_EVENT_CODE#
} }
</CALLBACKCODE_DEFAULT_IM>
</True>
<False>
<CALLBACKCODE_DEFAULT_IM>
(M:Event) 'LeftSingle' scmi 0 == if{
(#SIMVAR_GROUP#:#SIMVAR_NAME#,#SIMVAR_TYPE#) 0 == (&gt;K:#TOGGLE_EVENT#)
#ADDITIONAL_EVENT_CODE#
}
(M:Event) 'WheelUp' scmi 0 == if{ (#SIMVAR_GROUP#:#SIMVAR_NAME#,#SIMVAR_TYPE#) 0 == if{
1 (&gt;K:#TOGGLE_EVENT#)
#ADDITIONAL_EVENT_CODE#
} }
(M:Event) 'WheelDown' scmi 0 == if{ (#SIMVAR_GROUP#:#SIMVAR_NAME#,#SIMVAR_TYPE#) 0 != if{
0 (&gt;K:#TOGGLE_EVENT#)
#ADDITIONAL_EVENT_CODE#
} }
</CALLBACKCODE_DEFAULT_IM>
</False>
</Condition>
</False>
</Condition>
</UseTemplate>
</Component>
</Template>

<!-- Copy of A32NX_GT_Switch_Dummy -->
<!-- Removed the INIT_VALUE stuff which was overriding what we had in the flt files -->
<Template Name="A32NX_GT_Switch_Dummy">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<Instrument Id="LANDING_GEAR_Lever_Gear" />
<Test>
<TestValue>
<Val SimVarName="GEAR HANDLE POSITION" Units="Boolean"/>
<Val SimVarName="L:A32NX_GEAR_HANDLE_POSITION" Units="Boolean"/>
</TestValue>
<Action Copilot="True" Condition="TestValueFalse" Once="true" EventID="GEAR_TOGGLE"/>
</Test>
Expand Down Expand Up @@ -1150,7 +1150,7 @@
<Test>
<TestValue>
<Operator OpType="NOT">
<Val SimVarName="GEAR HANDLE POSITION" Units="Boolean"/>
<Val SimVarName="L:A32NX_GEAR_HANDLE_POSITION" Units="Boolean"/>
</Operator>
</TestValue>
<Action Copilot="True" Condition="TestValueFalse" Once="true" EventID="GEAR_TOGGLE"/>
Expand Down Expand Up @@ -1641,7 +1641,7 @@
<Instrument Id="LANDING_GEAR_Lever_Gear" />
<Test>
<TestValue>
<Val SimVarName="GEAR HANDLE POSITION" Units="Boolean"/>
<Val SimVarName="L:A32NX_GEAR_HANDLE_POSITION" Units="Boolean"/>
</TestValue>
<Action Copilot="True" Condition="TestValueFalse" Once="true" EventID="GEAR_TOGGLE"/>
</Test>
Expand Down Expand Up @@ -1841,7 +1841,7 @@
<Instrument Id="LANDING_GEAR_Lever_Gear" />
<Test>
<TestValue>
<Val SimVarName="GEAR HANDLE POSITION" Units="Boolean"/>
<Val SimVarName="L:A32NX_GEAR_HANDLE_POSITION" Units="Boolean"/>
</TestValue>
<Action Copilot="True" Condition="TestValueFalse" Once="true" EventID="GEAR_TOGGLE"/>
</Test>
Expand Down Expand Up @@ -2381,7 +2381,7 @@
<Test>
<TestValue>
<Operator OpType="NOT">
<Val SimVarName="GEAR HANDLE POSITION" Units="Boolean"/>
<Val SimVarName="L:A32NX_GEAR_HANDLE_POSITION" Units="Boolean"/>
</Operator>
</TestValue>
<Action Copilot="True" Condition="TestValueFalse" Once="true" EventID="GEAR_TOGGLE"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ A32NX_SEC_2_PUSHBUTTON_PRESSED=1
A32NX_SEC_3_PUSHBUTTON_PRESSED=1
A32NX_FAC_1_PUSHBUTTON_PRESSED=1
A32NX_FAC_2_PUSHBUTTON_PRESSED=1
A32NX_GEAR_LEVER_POSITION_REQUEST = 0

[Gauges.0]
KollsmanSetting=29.921342849731445313
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ A32NX_OVHD_PRESS_MODE_SEL_PB_IS_AUTO = 1
A32NX_OVHD_PRESS_MAN_VS_CTL_SWITCH = 1
A32NX_TRANSPONDER_MODE = 1
A32NX_SWITCH_ATC_ALT = 1
A32NX_GEAR_LEVER_POSITION_REQUEST = 0

[Gauges.0]
KollsmanSetting=29.921342849731445313
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ A32NX_SWITCH_ATC_ALT = 1
A32NX_GEAR_CENTER_POSITION = 100
A32NX_GEAR_LEFT_POSITION = 100
A32NX_GEAR_RIGHT_POSITION = 100
A32NX_GEAR_LEVER_POSITION_REQUEST = 1

[Gauges.0]
KollsmanSetting=29.921342849731445313
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ A32NX_OVHD_PRESS_MODE_SEL_PB_IS_AUTO = 1
A32NX_OVHD_PRESS_MAN_VS_CTL_SWITCH = 1
A32NX_TRANSPONDER_MODE = 1
A32NX_SWITCH_ATC_ALT = 1
A32NX_GEAR_LEVER_POSITION_REQUEST = 0

[Gauges.0]
KollsmanSetting=29.921342849731445313
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ A32NX_SWITCH_ATC_ALT = 1
A32NX_GEAR_CENTER_POSITION = 100
A32NX_GEAR_LEFT_POSITION = 100
A32NX_GEAR_RIGHT_POSITION = 100
A32NX_GEAR_LEVER_POSITION_REQUEST = 1

[Gauges.0]
KollsmanSetting=29.921342849731445313
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ XMLVAR_A320_WeatherRadar_Sys=1
A32NX_GEAR_CENTER_POSITION = 100
A32NX_GEAR_LEFT_POSITION = 100
A32NX_GEAR_RIGHT_POSITION = 100
A32NX_GEAR_LEVER_POSITION_REQUEST = 1

[Gauges.0]
KollsmanSetting=29.921342849731445313
Expand Down
Loading

0 comments on commit d52ac19

Please sign in to comment.