Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hyd): changed gear lever mechanism / added gear door drag #7390

Merged
merged 40 commits into from
Dec 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9c69734
Changed gear lever mechanism
crocket63 Aug 1, 2022
aa623a0
fix animation range
crocket63 Aug 1, 2022
7f855de
Update A320_NEO_INTERIOR.xml
crocket63 Aug 2, 2022
425314e
Update gear.rs
crocket63 Aug 2, 2022
a16ad09
testing improved aspect handling with door drag
crocket63 Aug 2, 2022
baabd82
less door drag
crocket63 Aug 2, 2022
963b6ef
Update simvar usage for new custom lvars
crocket63 Aug 2, 2022
6da216d
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Aug 2, 2022
6bdac09
possible random fail test fix
crocket63 Aug 3, 2022
d89ed18
less restrictive test
crocket63 Aug 3, 2022
fb5d96f
trying new template
crocket63 Aug 3, 2022
5b0f7cf
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Aug 11, 2022
61386cf
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Aug 18, 2022
7fbe8fd
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Sep 1, 2022
a07b0e7
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Sep 5, 2022
4634dce
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Oct 3, 2022
6fee370
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Oct 6, 2022
ee46a18
Merge branch 'master' of https://github.com/flybywiresim/a32nx into f…
crocket63 Oct 12, 2022
b1bf1e1
gear lever handled in systems
crocket63 Oct 13, 2022
7a99dfd
flt init
crocket63 Oct 13, 2022
6779238
anim test
crocket63 Oct 13, 2022
4979cc4
working anim interaction
crocket63 Oct 13, 2022
56e950a
clean up
crocket63 Oct 13, 2022
2b95358
restore fbw original var for now
crocket63 Oct 13, 2022
fcde211
fix nose light
crocket63 Oct 13, 2022
0cee252
Update a320-simvars.md
crocket63 Oct 13, 2022
6111976
update non boolean variable check
crocket63 Oct 13, 2022
5562445
Update A32NX_Interior_Handling.xml
crocket63 Oct 13, 2022
3c2e7c0
added sound lvar for locked gear lever
crocket63 Oct 21, 2022
421467f
Merge branch 'master' of https://github.com/flybywiresim/a32nx into f…
crocket63 Nov 21, 2022
8f89f7a
Update sound.xml
crocket63 Nov 21, 2022
f2e87fd
Update gear.rs
crocket63 Nov 21, 2022
d3aeb55
Merge branch 'master' of https://github.com/flybywiresim/a32nx into f…
crocket63 Dec 2, 2022
c4795e2
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Dec 9, 2022
3ccdc74
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Dec 9, 2022
ed88c9c
Update A32NX_BrakeTemp.js
crocket63 Dec 14, 2022
65a5adf
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Dec 14, 2022
ac508dc
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Dec 15, 2022
4371921
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Dec 27, 2022
0e83f6a
Merge branch 'master' into feat_custom_gear_lever_var
crocket63 Dec 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,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
12 changes: 12 additions & 0 deletions docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -3240,6 +3240,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
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 @@ -264,6 +264,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 @@ -264,6 +264,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 @@ -266,6 +266,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
Original file line number Diff line number Diff line change
Expand Up @@ -840,12 +840,12 @@
<TOOLTIPID>%((L:A32NX_BRAKE_FAN_BTN_PRESSED, Bool))%{if}Turn OFF brake fan%{else}Turn ON brake fan%{end}</TOOLTIPID>
</UseTemplate>

<UseTemplate Name="FBW_LANDING_GEAR_Gear_Lever_Template">
<UseTemplate Name="FBW_HANDLING_Gear_Lever_Template">
<ANIM_NAME>lever_landing_gear</ANIM_NAME>
<NODE_ID>LEVER_LANDINGGEAR</NODE_ID>
<WWISE_EVENT>gearleverclick</WWISE_EVENT>
<NO_GEARUP_IF_LOCKED/>
<ANIM_LENGTH>3</ANIM_LENGTH>
</UseTemplate>

<UseTemplate Name="FBW_Airbus_LANDING_GEAR_Light_Template">
<NODE_ID>PUSH_AUTOBKR_LDGGEAR_1</NODE_ID>
<ID>1</ID>
Expand Down Expand Up @@ -1777,7 +1777,7 @@
<UseTemplate Name="ASOBO_GT_Update">
<FREQUENCY>5</FREQUENCY>
<UPDATE_CODE>
(A:GEAR HANDLE POSITION, Bool) (A:GEAR POSITION, percent) 99.9 &gt; and (&gt;O:_ShouldBeConnectedToPowerGrid)
(L:A32NX_LGCIU_2_NOSE_GEAR_DOWNLOCKED, Bool) 1 == (&gt;O:_ShouldBeConnectedToPowerGrid)
(O:_ShouldBeConnectedToPowerGrid) sp0
2 (&gt;A:BUS LOOKUP INDEX, Number)
(A:CIRCUIT CONNECTION ON:17, Bool) l0 != if{ 17 2 (&gt;K:2:ELECTRICAL_BUS_TO_CIRCUIT_CONNECTION_TOGGLE) }
Expand Down Expand Up @@ -1833,7 +1833,7 @@

<!-- PARK BRK EXT LT -->
<UseTemplate Name="FBW_Potentiometer_Toggle">
<TOGGLE_CONDITION>(A:GEAR CENTER POSITION, Percent over 100) 1 == (L:A32NX_PARK_BRAKE_LEVER_POS, bool) 1 == and</TOGGLE_CONDITION>
<TOGGLE_CONDITION>(L:A32NX_GEAR_CENTER_POSITION, Percent over 100) 1 == (L:A32NX_PARK_BRAKE_LEVER_POS, bool) 1 == and</TOGGLE_CONDITION>
<TOGGLE_REQUISITE>(L:A32NX_ELEC_DC_GND_FLT_SVC_BUS_IS_POWERED, Bool)</TOGGLE_REQUISITE>
<POTENTIOMETER>99</POTENTIOMETER>
</UseTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,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 @@ -642,11 +642,11 @@
<WwiseRTPC LocalVar="A32NX_COCKPIT_DOOR_LOCKED" Units="bool" Index="1" RTPCName="LOCALVAR_A32NX_COCKPIT_DOOR_LOCKED" />
</Sound>

<Sound WwiseData="true" WwiseEvent="gearleverclick" Continuous="false" NodeName="PEDALS_LEFT" ViewPoint="Inside" SimVar="GEAR HANDLE POSITION" Units="BOOLEAN" Index="0">
<Sound WwiseData="true" WwiseEvent="gearleverclick" Continuous="false" NodeName="PEDALS_LEFT" ViewPoint="Inside" LocalVar="A32NX_GEAR_HANDLE_POSITION">
<Range LowerBound="1" />
</Sound>

<Sound WwiseData="true" WwiseEvent="gearleverclick" Continuous="false" NodeName="PEDALS_LEFT" ViewPoint="Inside" SimVar="GEAR HANDLE POSITION" Units="BOOLEAN" Index="0">
<Sound WwiseData="true" WwiseEvent="gearleverclick" Continuous="false" NodeName="PEDALS_LEFT" ViewPoint="Inside" LocalVar="A32NX_GEAR_HANDLE_POSITION">
<Range UpperBound="0" />
</Sound>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,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 @@ -82,13 +82,13 @@ class A32NX_BrakeTemp {
SimVar.GetSimVarValue("L:A32NX_REPORTED_BRAKE_TEMPERATURE_4", "celsius")
];
}
const GearLeftPosition = SimVar.GetSimVarValue("GEAR LEFT POSITION", "Percent Over 100");
const GearLeftPosition = SimVar.GetSimVarValue("L:A32NX_GEAR_LEFT_POSITION", "Percent Over 100");
crocket63 marked this conversation as resolved.
Show resolved Hide resolved
const GearLeftExtended = GearLeftPosition >= 0.25;
const GearRightExtended = SimVar.GetSimVarValue("GEAR RIGHT POSITION", "Percent Over 100") >= 0.25;
const GearRightExtended = SimVar.GetSimVarValue("L:A32NX_GEAR_RIGHT_POSITION", "Percent Over 100") >= 0.25;
const currentBrakeFanState = SimVar.GetSimVarValue("L:A32NX_BRAKE_FAN", "Bool");
const brakeFanButtonIsPressed = SimVar.GetSimVarValue("L:A32NX_BRAKE_FAN_BTN_PRESSED", "Bool");
// if the fan button is pressed down and the left main gear is down and locked, the fan is on
const brakeFanIsOn = brakeFanButtonIsPressed && (GearLeftPosition == 1);
const brakeFanIsOn = brakeFanButtonIsPressed && (GearLeftPosition == 100);
let fanMultiplier = 1;
let fanDifferentialFactor = 1;
if (brakeFanIsOn) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ class A32NX_FWC {
// - Glide slope captured
// - Landing locked down

const landingGearIsDown = SimVar.GetSimVarValue("L:A32NX_FLAPS_HANDLE_INDEX", "Enum") >= 1 && SimVar.GetSimVarValue("GEAR HANDLE POSITION", "Boolean");
const landingGearIsDown = SimVar.GetSimVarValue("L:A32NX_FLAPS_HANDLE_INDEX", "Enum") >= 1 && SimVar.GetSimVarValue("L:A32NX_GEAR_HANDLE_POSITION", "Percent over 100") > 0.5;
const verticalMode = SimVar.GetSimVarValue("L:A32NX_FMA_VERTICAL_MODE", "Number");
const glideSlopeCaptured = verticalMode >= 30 && verticalMode <= 34;
const landingGearIsLockedDown = SimVar.GetSimVarValue("GEAR POSITION:0", "Enum") > 0.9;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class A32NX_LocalVarUpdater {
}

_noSmokingMemoSelector() {
const gearPercent = SimVar.GetSimVarValue("GEAR CENTER POSITION", "Percent");
const gearPercent = SimVar.GetSimVarValue("L:A32NX_GEAR_CENTER_POSITION", "Percent");
const noSmokingSwitch = SimVar.GetSimVarValue("L:XMLVAR_SWITCH_OVHD_INTLT_NOSMOKING_Position", "Position");

// Switch is ON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2824,7 +2824,7 @@ class Warnings extends NavSystemElement {
return this.linearMultiPointsEvaluation(this.pullUp_sinkRate_Points, descentRate, height) == 2;
}
landingGearCallback() {
const gear = !SimVar.GetSimVarValue("IS GEAR RETRACTABLE", "Boolean") || SimVar.GetSimVarValue("GEAR HANDLE POSITION", "Boolean");
const gear = !SimVar.GetSimVarValue("IS GEAR RETRACTABLE", "Boolean") || SimVar.GetSimVarValue("L:A32NX_GEAR_HANDLE_POSITION", "Percent over 100") > 0.5;
const throttle = SimVar.GetSimVarValue("L:A32NX_AUTOTHRUST_TLA:1", "number");
const flaps = SimVar.GetSimVarValue("L:A32NX_FLAPS_HANDLE_INDEX", "number");
return !gear && (flaps > 1 || (throttle == 0));
Expand Down
41 changes: 41 additions & 0 deletions src/behavior/src/A32NX_Interior_Handling.xml
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,47 @@
</Component>
</Template>

<Template Name="FBW_HANDLING_Gear_Lever_Template">
<DefaultTemplateParameters>
<TOOLTIPID>TT_Package.LANDING_GEAR_LEVER_GEAR_TITLE</TOOLTIPID>
<ANIM_NAME>lever_landing_gear</ANIM_NAME>
<NODE_ID>LEVER_LANDINGGEAR</NODE_ID>
<PART_ID>LEVER_LANDINGGEAR</PART_ID>
<ANIM_LAG>0</ANIM_LAG>
<DRAG_MIN_VALUE>0</DRAG_MIN_VALUE>
<DRAG_MAX_VALUE>100</DRAG_MAX_VALUE>
<DRAG_DELTA>0.001</DRAG_DELTA>
<DRAG_SPEED>0.03</DRAG_SPEED>
<LEFT_SINGLE_CODE>
(L:A32NX_GEAR_HANDLE_POSITION, Number) 0.95 &gt; if{
(&gt;K:GEAR_UP)
} els{
(&gt;K:GEAR_DOWN)
}
</LEFT_SINGLE_CODE>
<LEFT_RELEASE_CODE>
(L:A32NX_GEAR_LEVER_LOCKED, Boolean) 1 == if{
(&gt;K:GEAR_DOWN)
}
</LEFT_RELEASE_CODE>
<DRAG_CODE>

</DRAG_CODE>
</DefaultTemplateParameters>

<Component ID="#NODE_ID#" Node="#NODE_ID#">
<UseTemplate Name="ASOBO_GT_Lever_DraggingYAxis_Code">
<ANIM_LENGTH>3</ANIM_LENGTH>
<ANIM_CODE>
(L:A32NX_GEAR_HANDLE_POSITION, Percent) 3 *
</ANIM_CODE>
<UP_CODE> (&gt;K:GEAR_UP)</UP_CODE>
<DOWN_CODE> (&gt;K:GEAR_DOWN)</DOWN_CODE>
</UseTemplate>
</Component>
</Template>


<Template Name="FBW_HANDLING_Indicator_ElevatorTrim_Template">
<Parameters Type="Default">
<ANIM_NAME>HANDLING_Indicator_ElevatorTrim</ANIM_NAME>
Expand Down
46 changes: 0 additions & 46 deletions src/behavior/src/A32NX_Interior_Misc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,52 +188,6 @@
</UseTemplate>
</Template>

<!-- GEAR LEVER CUSTOM MODEL LOCKED DOWN WITH SIMVAR FROM SYSTEM WASM -->
<Template Name="FBW_LANDING_GEAR_Gear_Lever_Template">
<Parameters Type="Default">
<ANIM_NAME>LANDING_GEAR_Lever_Gear</ANIM_NAME>
<PART_ID>LANDING_GEAR_Lever_Gear</PART_ID>
<NODE_ID>LANDING_GEAR_Lever_Gear</NODE_ID>
<LIGHT_NODE_ID>LANDING_GEAR_Lever_GearLight</LIGHT_NODE_ID>
<ANIM_LAG>400</ANIM_LAG>
<DRAG_SCALAR>10</DRAG_SCALAR>
<TOOLTIP_LANDING_GEAR_TITLE>@TT_Package.LANDING_GEAR_LEVER_GEAR_TITLE</TOOLTIP_LANDING_GEAR_TITLE>
<WWISE_EVENT>gear_lever</WWISE_EVENT>
<WWISE_EVENT_1>gear_lever_on</WWISE_EVENT_1>
<WWISE_EVENT_2>gear_lever_off</WWISE_EVENT_2>
<ALWAYS_USE_ANIM_LAG>True</ALWAYS_USE_ANIM_LAG> <!-- Only 2 positions so anim lag during drags is wanted -->
</Parameters>
<Parameters Type="Override">
<TOOLTIP_TITLE>#TOOLTIP_LANDING_GEAR_TITLE#</TOOLTIP_TITLE>
<TOOLTIP_ENTRY_0>LANDING_GEAR_Gear</TOOLTIP_ENTRY_0>
<UP_CODE>(&gt;B:LANDING_GEAR_Gear_Inc)</UP_CODE>
<DOWN_CODE>(&gt;B:LANDING_GEAR_Gear_Dec)</DOWN_CODE>
</Parameters>
<Parameters Type="Override">
<Condition Check="NO_GEARUP_IF_LOCKED">
<True>
<UP_CODE>(L:A32NX_GEAR_LEVER_LOCKED, Bool) ! if{ #UP_CODE# }</UP_CODE>
</True>
</Condition>
</Parameters>

<Component ID="#NODE_ID#" Node="#NODE_ID#">
<UseInputEvent ID="LANDING_GEAR">
<GEAR_ID>1</GEAR_ID>
</UseInputEvent>
<UseTemplate Name="ASOBO_GT_Lever_DraggingYAxis_Code">
<ANIM_CODE>(B:LANDING_GEAR_Gear) 100 *</ANIM_CODE>
</UseTemplate>
</Component>

<Condition Check="EMISSIVE_CODE">
<Component ID="#LIGHT_NODE_ID#" Node="#LIGHT_NODE_ID#">
<UseTemplate Name="ASOBO_GT_Emissive_Gauge">
<PART_ID>#LIGHT_NODE_ID#</PART_ID>
</UseTemplate>
</Component>
</Condition>
</Template>

<Template Name="FBW_Airbus_Fuel_Pump">
<UseTemplate Name="FBW_Push_Toggle">
Expand Down
2 changes: 1 addition & 1 deletion src/instruments/src/EWD/elements/PseudoFWC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ const PseudoFWC: React.FC = () => {
// const aircraftOnGround = left1LandingGear === 1 || right1LandingGear === 1;
// FIXME The landing gear triggers the dual engine failure on loading
const aircraftOnGround = SimVar.GetSimVarValue('SIM ON GROUND', 'Bool');
const [landingGearLeverDown] = useSimVar('GEAR HANDLE POSITION', 'bool', 500);
const [landingGearLeverDown] = useSimVar('L:A32NX_GEAR_HANDLE_POSITION', 'bool', 500);
const [landingLight2Retracted] = useSimVar('L:LANDING_2_Retracted', 'bool', 500);
const [landingLight3Retracted] = useSimVar('L:LANDING_3_Retracted', 'bool', 500);
const [autoBrakesArmedMode] = useSimVar('L:A32NX_AUTOBRAKES_ARMED_MODE', 'enum', 500);
Expand Down
3 changes: 2 additions & 1 deletion src/systems/a320_systems/src/hydraulic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8036,6 +8036,7 @@ mod tests {
let mut test_bed = test_bed_on_ground_with()
.on_the_ground()
.set_cold_dark_inputs()
.with_worst_case_ptu()
.set_park_brake(false)
.start_eng2(Ratio::new::<percent>(80.))
.run_one_tick();
Expand All @@ -8048,7 +8049,7 @@ mod tests {

// Yellow pressurised by engine2, green presurised from ptu we expect fault LOW press on EDP1
assert!(test_bed.is_yellow_pressure_switch_pressurised());
assert!(test_bed.yellow_pressure() > Pressure::new::<psi>(2800.));
assert!(test_bed.yellow_pressure() > Pressure::new::<psi>(2500.));
assert!(test_bed.is_green_pressure_switch_pressurised());
assert!(test_bed.green_pressure() > Pressure::new::<psi>(2300.));
assert!(test_bed.is_green_edp_press_low());
Expand Down
Loading