From 9c697341d482c5f96d0eb232483a73aeb6ad6cd2 Mon Sep 17 00:00:00 2001 From: davydecorps <38904654+crocket63@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:52:22 +0200 Subject: [PATCH 01/24] Changed gear lever mechanism --- .github/CHANGELOG.md | 1 + .../FlyByWire_A320_NEO/Checklist/Library.xml | 10 ++-- .../model/A320_NEO_INTERIOR.xml | 18 +++++++- .../FlyByWire_A320_NEO/sound/sound.xml | 4 +- .../html_ui/Pages/A32NX_Core/A32NX_FWC.js | 2 +- .../NavSystems/A320_Neo/A32NX_NavSystem.js | 2 +- src/behavior/src/A32NX_Interior_Misc.xml | 46 ------------------- .../src/EWD/elements/PseudoFWC.tsx | 2 +- src/systems/a320_systems_wasm/src/gear.rs | 36 ++++++++++++--- 9 files changed, 57 insertions(+), 64 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 7e1e331234a..0883c8200fd 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -53,6 +53,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) ## 0.8.0 diff --git a/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/Checklist/Library.xml b/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/Checklist/Library.xml index 0fcc7777f0a..fea5b3479fc 100644 --- a/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/Checklist/Library.xml +++ b/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/Checklist/Library.xml @@ -65,7 +65,7 @@ - + @@ -1150,7 +1150,7 @@ - + @@ -1641,7 +1641,7 @@ - + @@ -1841,7 +1841,7 @@ - + @@ -2381,7 +2381,7 @@ - + diff --git a/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO_INTERIOR.xml b/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO_INTERIOR.xml index 6a446a23090..1b688fa8e76 100644 --- a/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO_INTERIOR.xml +++ b/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO_INTERIOR.xml @@ -805,12 +805,26 @@ %((L:A32NX_BRAKE_FAN_BTN_PRESSED, Bool))%{if}Turn OFF brake fan%{else}Turn ON brake fan%{end} - + + + + lever_landing_gear + LEVER_LANDINGGEAR + 3 + 1 + gearleverclick + (L:A32NX_GEAR_HANDLE_POSITION, Bool) ! (>L:A32NX_GEAR_LEVER_POSITION_REQUEST) + + (L:A32NX_GEAR_HANDLE_POSITION, Bool) + + + PUSH_AUTOBKR_LDGGEAR_1 1 @@ -1745,7 +1759,7 @@ 5 - (A:GEAR HANDLE POSITION, Bool) (A:GEAR POSITION, percent) 99.9 > and (>O:_ShouldBeConnectedToPowerGrid) + (L:A32NX_GEAR_HANDLE_POSITION, Bool) (A:GEAR POSITION, percent) 99.9 > and (>O:_ShouldBeConnectedToPowerGrid) (O:_ShouldBeConnectedToPowerGrid) sp0 2 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:17, Bool) l0 != if{ 17 2 (>K:2:ELECTRICAL_BUS_TO_CIRCUIT_CONNECTION_TOGGLE) } diff --git a/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/sound/sound.xml b/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/sound/sound.xml index 827ac6d1380..ee95ba78f82 100644 --- a/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/sound/sound.xml +++ b/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/sound/sound.xml @@ -642,11 +642,11 @@ - + - + diff --git a/flybywire-aircraft-a320-neo/html_ui/Pages/A32NX_Core/A32NX_FWC.js b/flybywire-aircraft-a320-neo/html_ui/Pages/A32NX_Core/A32NX_FWC.js index 975e444ac03..64d1fcbb8d2 100644 --- a/flybywire-aircraft-a320-neo/html_ui/Pages/A32NX_Core/A32NX_FWC.js +++ b/flybywire-aircraft-a320-neo/html_ui/Pages/A32NX_Core/A32NX_FWC.js @@ -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", "Boolean"); 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; diff --git a/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/NavSystems/A320_Neo/A32NX_NavSystem.js b/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/NavSystems/A320_Neo/A32NX_NavSystem.js index 42526b8137c..bdce248615f 100644 --- a/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/NavSystems/A320_Neo/A32NX_NavSystem.js +++ b/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/NavSystems/A320_Neo/A32NX_NavSystem.js @@ -2823,7 +2823,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", "Boolean"); 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)); diff --git a/src/behavior/src/A32NX_Interior_Misc.xml b/src/behavior/src/A32NX_Interior_Misc.xml index 537af210be5..6ac31832189 100644 --- a/src/behavior/src/A32NX_Interior_Misc.xml +++ b/src/behavior/src/A32NX_Interior_Misc.xml @@ -188,52 +188,6 @@ - - + + -