A3XX: Fix autobrake not working when reversers engage #105

This commit is contained in:
Joshua Davidson 2017-12-03 09:03:10 -05:00
parent 36bbf9111d
commit 574c1f78f5
2 changed files with 2 additions and 6 deletions

View file

@ -9,8 +9,6 @@ setprop("/controls/autobrake/active", 0);
setprop("/controls/autobrake/mode", 0); setprop("/controls/autobrake/mode", 0);
setlistener("/sim/signals/fdm-initialized", func { setlistener("/sim/signals/fdm-initialized", func {
var rev1 = 0;
var rev2 = 0;
var thr1 = 0; var thr1 = 0;
var thr2 = 0; var thr2 = 0;
var wow0 = getprop("/gear/gear[0]/wow"); var wow0 = getprop("/gear/gear[0]/wow");
@ -63,13 +61,11 @@ var arm_autobrake = func(mode) {
# Autobrake enable if armed # Autobrake enable if armed
var absChk = maketimer(0.2, func { var absChk = maketimer(0.2, func {
rev1 = getprop("/engines/engine[0]/reverser-pos-norm");
rev2 = getprop("/engines/engine[1]/reverser-pos-norm");
thr1 = getprop("/controls/engines/engine[0]/throttle"); thr1 = getprop("/controls/engines/engine[0]/throttle");
thr2 = getprop("/controls/engines/engine[1]/throttle"); thr2 = getprop("/controls/engines/engine[1]/throttle");
wow0 = getprop("/gear/gear[0]/wow"); wow0 = getprop("/gear/gear[0]/wow");
gnd_speed = getprop("/velocities/groundspeed-kt"); gnd_speed = getprop("/velocities/groundspeed-kt");
if (gnd_speed > 60 and rev1 < 0.01 and rev2 < 0.01) { if (gnd_speed > 60) {
if (getprop("/controls/autobrake/mode") != 0 and thr1 < 0.15 and thr2 < 0.15 and wow0 == 1) { if (getprop("/controls/autobrake/mode") != 0 and thr1 < 0.15 and thr2 < 0.15 and wow0 == 1) {
setprop("/controls/autobrake/active", 1); setprop("/controls/autobrake/active", 1);
if (getprop("/controls/autobrake/mode") == 1) { # LO if (getprop("/controls/autobrake/mode") == 1) { # LO

View file

@ -1 +1 @@
4057 4058