Fix priority left/right being cut off in some cases
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
ac599a2319
commit
2443d3a4d0
2 changed files with 15 additions and 4 deletions
|
@ -174,6 +174,17 @@ var FCUController = {
|
||||||
setprop("/fdm/jsbsim/fbw/sidestick/active[" ~ (2 - side) ~ "]", 0);
|
setprop("/fdm/jsbsim/fbw/sidestick/active[" ~ (2 - side) ~ "]", 0);
|
||||||
setprop("/fdm/jsbsim/fbw/sidestick/active[" ~ (side - 1) ~ "]", 1);
|
setprop("/fdm/jsbsim/fbw/sidestick/active[" ~ (side - 1) ~ "]", 1);
|
||||||
SidestickPriorityPressedLast = side;
|
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 {
|
} else {
|
||||||
# Only release, if this side has pressed the button last
|
# Only release, if this side has pressed the button last
|
||||||
# to avoide the first pressed side getting activated again
|
# to avoide the first pressed side getting activated again
|
||||||
|
|
|
@ -1016,8 +1016,8 @@
|
||||||
<path>Aircraft/A320-family/Sounds/Cockpit/priority-left.wav</path>
|
<path>Aircraft/A320-family/Sounds/Cockpit/priority-left.wav</path>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>fdm/jsbsim/fbw/sidestick/active[1]</property>
|
<property>/sim/sound/priority-left</property>
|
||||||
<value>0</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
<volume>
|
<volume>
|
||||||
|
@ -1032,8 +1032,8 @@
|
||||||
<path>Aircraft/A320-family/Sounds/Cockpit/priority-right.wav</path>
|
<path>Aircraft/A320-family/Sounds/Cockpit/priority-right.wav</path>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>fdm/jsbsim/fbw/sidestick/active[0]</property>
|
<property>/sim/sound/priority-right</property>
|
||||||
<value>0</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
<volume>
|
<volume>
|
||||||
|
|
Loading…
Reference in a new issue