From 2443d3a4d0e56959cd1f667bf2594b06e4048a96 Mon Sep 17 00:00:00 2001 From: fly Date: Fri, 30 Apr 2021 15:38:58 +0000 Subject: [PATCH] Fix priority left/right being cut off in some cases Signed-off-by: fly --- Nasal/FMGC/FCU.nas | 11 +++++++++++ Sounds/A320-common-sound.xml | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 37720dfa..6727f995 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -174,6 +174,17 @@ var FCUController = { setprop("/fdm/jsbsim/fbw/sidestick/active[" ~ (2 - side) ~ "]", 0); setprop("/fdm/jsbsim/fbw/sidestick/active[" ~ (side - 1) ~ "]", 1); SidestickPriorityPressedLast = side; + if (side == 1) { + setprop("/sim/sound/priority-left", 1); + settimer(func { + setprop("/sim/sound/priority-left", 0); + }, 1.5); + } else { + setprop("/sim/sound/priority-right", 1); + settimer(func { + setprop("/sim/sound/priority-right", 0); + }, 1.5); + } } else { # Only release, if this side has pressed the button last # to avoide the first pressed side getting activated again diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml index 2178e447..9d311f1d 100644 --- a/Sounds/A320-common-sound.xml +++ b/Sounds/A320-common-sound.xml @@ -1016,8 +1016,8 @@ Aircraft/A320-family/Sounds/Cockpit/priority-left.wav - fdm/jsbsim/fbw/sidestick/active[1] - 0 + /sim/sound/priority-left + 1 @@ -1032,8 +1032,8 @@ Aircraft/A320-family/Sounds/Cockpit/priority-right.wav - fdm/jsbsim/fbw/sidestick/active[0] - 0 + /sim/sound/priority-right + 1