IT WORKS IT WORKS I AM NOT TOUCHING IT ANY MORE!

This commit is contained in:
Jonathan Redpath 2018-12-07 16:11:29 +00:00
parent 0270372be5
commit dcc9718a30
5 changed files with 15 additions and 9 deletions

View file

@ -1071,12 +1071,12 @@
if (getprop("/it-autoflight/output/athr") == 1) { if (getprop("/it-autoflight/output/athr") == 1) {
setprop("/it-autoflight/input/athr", 0); setprop("/it-autoflight/input/athr", 0);
libraries.athrOff("soft"); libraries.athrOff("soft");
setprop("/ECAM/warnings/master-caution-light", 1);
} else { } else {
if (getprop("/it-autoflight/output/athr-warning") == 1) { if (getprop("/it-autoflight/output/athr-warning") == 1) {
setprop("/it-autoflight/output/athr-warning", 0); setprop("/it-autoflight/output/athr-warning", 0);
setprop("/ECAM/warnings/master-caution-light", 0);
} }
setprop("/ECAM/warnings/master-caution-light", 1);
} }
</script> </script>
</binding> </binding>

View file

@ -4055,7 +4055,10 @@
</binding> </binding>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script>libraries.apOff("hard","L");</script> <script>if (getprop("/it-autoflight/output/ap1") == 0) {
libraries.apOff("hard","L");
}
</script>
</binding> </binding>
</action> </action>
</animation> </animation>
@ -4092,7 +4095,10 @@
</binding> </binding>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script>libraries.apOff("hard","R");</script> <script>if (getprop("/it-autoflight/output/ap1") == 0) {
libraries.apOff("hard","R");
}
</script>
</binding> </binding>
</action> </action>
</animation> </animation>

View file

@ -170,7 +170,7 @@ setlistener("/it-autoflight/input/athr", func {
var atmas = getprop("/it-autoflight/input/athr"); var atmas = getprop("/it-autoflight/input/athr");
if (atmas == 0) { if (atmas == 0) {
setprop("/it-autoflight/output/athr", 0); setprop("/it-autoflight/output/athr", 0);
if (getprop("/it-autoflight/sound/enableathrsound") == 1 and getprop("/it-autoflight/output/athr-warning") == 1 and getprop("/it-autoflight/output/athr") == 0 and getprop("/position/gear-agl-ft") > 50) { if (getprop("/it-autoflight/sound/enableathrsound") == 1 and getprop("/it-autoflight/output/athr") == 0 and getprop("/position/gear-agl-ft") > 50) {
setprop("/it-autoflight/sound/athrsound", 1); setprop("/it-autoflight/sound/athrsound", 1);
setprop("/it-autoflight/sound/enableathrsound", 0); setprop("/it-autoflight/sound/enableathrsound", 0);
} }

View file

@ -253,7 +253,7 @@ var decreaseManVS = func {
} }
var apOff = func(type, side) { var apOff = func(type, side) {
if ((side == "L" and getprop("/it-autoflight/input/ap1") == 1) or (side == "R" and getprop("/it-autoflight/input/ap2") == 1)) { if ((side == "L" and getprop("/it-autoflight/output/ap1") == 1) or (side == "R" and getprop("/it-autoflight/output/ap2") == 1)) {
setprop("/it-autoflight/output/ap-warning", 0); setprop("/it-autoflight/output/ap-warning", 0);
return; return;
} }
@ -269,7 +269,7 @@ var apOff = func(type, side) {
} }
var athrOff = func(type) { var athrOff = func(type) {
if (getprop("it-autoflight/input/athr") == 1) { if (getprop("it-autoflight/output/athr") == 1) {
setprop("/it-autoflight/output/athr-warning", 0); setprop("/it-autoflight/output/athr-warning", 0);
return; return;
} }

View file

@ -196,10 +196,10 @@ var atoff_request = func {
state1 = getprop("/systems/thrust/state1"); state1 = getprop("/systems/thrust/state1");
state2 = getprop("/systems/thrust/state2"); state2 = getprop("/systems/thrust/state2");
if ((state1 == "IDLE") and (state2 == "IDLE") and (getprop("/systems/thrust/alpha-floor") == 0) and (getprop("/systems/thrust/toga-lk") == 0)) { if ((state1 == "IDLE") and (state2 == "IDLE") and (getprop("/systems/thrust/alpha-floor") == 0) and (getprop("/systems/thrust/toga-lk") == 0)) {
setprop("/it-autoflight/input/athr", 0); if (getprop("/it-autoflight/output/athr") == 1 and getprop("/position/gear-agl-ft") > 50) {
if (getprop("/it-autoflight/output/athr") == 0 and getprop("/position/gear-agl-ft") > 50) {
libraries.athrOff("soft"); libraries.athrOff("soft");
} }
setprop("/it-autoflight/input/athr", 0);
} }
} }