A3XX: Brake system improved, autobrake disconnect logic fixed

This commit is contained in:
Joshua Davidson 2017-10-21 23:33:01 -04:00
parent 71d16670cb
commit 99b3e5a78c
3 changed files with 8 additions and 6 deletions

View file

@ -1210,7 +1210,7 @@
<file>Aircraft/IDG-A32X/Nasal/engines.nas</file>
<file>Aircraft/IDG-A32X/Nasal/ADIRS.nas</file>
<file>Aircraft/IDG-A32X/Nasal/fire.nas</file>
<file>Aircraft/IDG-A32X/Nasal/autobrake.nas</file>
<file>Aircraft/IDG-A32X/Nasal/brakes.nas</file>
</systems>
<thrust>
<file>Aircraft/IDG-A32X/Nasal/fadec-common.nas</file>

View file

@ -28,7 +28,7 @@ controls.applyBrakes = func(v, which = 0) {
if (getprop("/systems/acconfig/autoconfig-running") != 1) {
wow1 = getprop("/gear/gear[1]/wow");
wow2 = getprop("/gear/gear[2]/wow");
if (getprop("/controls/autobrake/mode") != 0 and (wow1 or wow2)) {
if (getprop("/controls/autobrake/mode") != 0 and (wow1 or wow2) and getprop("/controls/autobrake/active") == 1) {
arm_autobrake(0);
}
if (which <= 0) {
@ -42,6 +42,8 @@ controls.applyBrakes = func(v, which = 0) {
# Set autobrake mode
var arm_autobrake = func(mode) {
wow1 = getprop("/gear/gear[1]/wow");
wow2 = getprop("/gear/gear[2]/wow");
if (mode == 0) { # OFF
absChk.stop();
if (getprop("/controls/autobrake/active") == 1) {
@ -50,13 +52,13 @@ var arm_autobrake = func(mode) {
setprop("/controls/gear/brake-right", 0);
}
setprop("/controls/autobrake/mode", 0);
} else if (mode == 1) { # LO
} else if (mode == 1 and !wow1 and !wow2) { # LO
setprop("/controls/autobrake/mode", 1);
absChk.start();
} else if (mode == 2) { # MED
} else if (mode == 2 and !wow1 and !wow2) { # MED
setprop("/controls/autobrake/mode", 2);
absChk.start();
} else if (mode == 3) { # MAX
} else if (mode == 3 and (wow1 or wow2)) { # MAX
setprop("/controls/autobrake/mode", 3);
absChk.start();
}

View file

@ -1 +1 @@
2162
2170