Sim: Fix bug in FCU handler
This commit is contained in:
parent
7f0c150cb0
commit
4b8b0c27ba
1 changed files with 32 additions and 24 deletions
|
@ -235,25 +235,29 @@ var APPanel = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
APDisc: func() {
|
APDisc: func() {
|
||||||
if (ap1.getBoolValue() or ap2.getBoolValue()) {
|
if (dcEss.getValue() >= 25) {
|
||||||
libraries.apOff("soft", 0);
|
if (ap1.getBoolValue() or ap2.getBoolValue()) {
|
||||||
} else {
|
libraries.apOff("soft", 0);
|
||||||
if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) {
|
} else {
|
||||||
setprop("/it-autoflight/sound/apoffsound", 0);
|
if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) {
|
||||||
setprop("/it-autoflight/sound/apoffsound2", 0);
|
setprop("/it-autoflight/sound/apoffsound", 0);
|
||||||
|
setprop("/it-autoflight/sound/apoffsound2", 0);
|
||||||
|
}
|
||||||
|
setprop("/it-autoflight/output/ap-warning", 0);
|
||||||
|
setprop("/ECAM/warnings/master-warning-light", 0);
|
||||||
}
|
}
|
||||||
setprop("/it-autoflight/output/ap-warning", 0);
|
|
||||||
setprop("/ECAM/warnings/master-warning-light", 0);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ATDisc: func() {
|
ATDisc: func() {
|
||||||
if (athr.getBoolValue()) {
|
if (dcEss.getValue() >= 25) {
|
||||||
libraries.athrOff("soft");
|
if (athr.getBoolValue()) {
|
||||||
setprop("/ECAM/warnings/master-caution-light", 1);
|
libraries.athrOff("soft");
|
||||||
} else {
|
setprop("/ECAM/warnings/master-caution-light", 1);
|
||||||
if (getprop("/it-autoflight/output/athr-warning") == 1) {
|
} else {
|
||||||
setprop("/it-autoflight/output/athr-warning", 0);
|
if (getprop("/it-autoflight/output/athr-warning") == 1) {
|
||||||
setprop("/ECAM/warnings/master-caution-light", 0);
|
setprop("/it-autoflight/output/athr-warning", 0);
|
||||||
|
setprop("/ECAM/warnings/master-caution-light", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -343,18 +347,22 @@ var APPanel = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
HDGPush: func() {
|
HDGPush: func() {
|
||||||
if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) {
|
if (dcEss.getValue() >= 25) {
|
||||||
setprop("/it-autoflight/input/lat", 1);
|
if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) {
|
||||||
|
setprop("/it-autoflight/input/lat", 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
HDGPull: func() {
|
HDGPull: func() {
|
||||||
if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) {
|
if (dcEss.getValue() >= 25) {
|
||||||
if (latMode.getValue() == 0 or !showHDG.getBoolValue()) {
|
if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) {
|
||||||
setprop("/it-autoflight/input/lat", 3);
|
if (latMode.getValue() == 0 or !showHDG.getBoolValue()) {
|
||||||
showHDG.setBoolValue(1);
|
setprop("/it-autoflight/input/lat", 3);
|
||||||
} else {
|
showHDG.setBoolValue(1);
|
||||||
setprop("/it-autoflight/input/lat", 0);
|
} else {
|
||||||
showHDG.setBoolValue(1);
|
setprop("/it-autoflight/input/lat", 0);
|
||||||
|
showHDG.setBoolValue(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Reference in a new issue