Sim: Fix bug in FCU handler

This commit is contained in:
Joshua Davidson 2019-02-25 16:48:45 -05:00
parent 7f0c150cb0
commit 4b8b0c27ba

View file

@ -235,6 +235,7 @@ var APPanel = {
} }
}, },
APDisc: func() { APDisc: func() {
if (dcEss.getValue() >= 25) {
if (ap1.getBoolValue() or ap2.getBoolValue()) { if (ap1.getBoolValue() or ap2.getBoolValue()) {
libraries.apOff("soft", 0); libraries.apOff("soft", 0);
} else { } else {
@ -245,8 +246,10 @@ var APPanel = {
setprop("/it-autoflight/output/ap-warning", 0); setprop("/it-autoflight/output/ap-warning", 0);
setprop("/ECAM/warnings/master-warning-light", 0); setprop("/ECAM/warnings/master-warning-light", 0);
} }
}
}, },
ATDisc: func() { ATDisc: func() {
if (dcEss.getValue() >= 25) {
if (athr.getBoolValue()) { if (athr.getBoolValue()) {
libraries.athrOff("soft"); libraries.athrOff("soft");
setprop("/ECAM/warnings/master-caution-light", 1); setprop("/ECAM/warnings/master-caution-light", 1);
@ -256,6 +259,7 @@ var APPanel = {
setprop("/ECAM/warnings/master-caution-light", 0); setprop("/ECAM/warnings/master-caution-light", 0);
} }
} }
}
}, },
IASMach: func() { IASMach: func() {
if (dcEss.getValue() >= 25) { if (dcEss.getValue() >= 25) {
@ -343,11 +347,14 @@ var APPanel = {
} }
}, },
HDGPush: func() { HDGPush: func() {
if (dcEss.getValue() >= 25) {
if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) { if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) {
setprop("/it-autoflight/input/lat", 1); setprop("/it-autoflight/input/lat", 1);
} }
}
}, },
HDGPull: func() { HDGPull: func() {
if (dcEss.getValue() >= 25) {
if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) { if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) {
if (latMode.getValue() == 0 or !showHDG.getBoolValue()) { if (latMode.getValue() == 0 or !showHDG.getBoolValue()) {
setprop("/it-autoflight/input/lat", 3); setprop("/it-autoflight/input/lat", 3);
@ -357,6 +364,7 @@ var APPanel = {
showHDG.setBoolValue(1); showHDG.setBoolValue(1);
} }
} }
}
}, },
HDGAdjust: func(d) { HDGAdjust: func(d) {
if (dcEss.getValue() >= 25) { if (dcEss.getValue() >= 25) {