This commit is contained in:
Jonathan Redpath 2018-12-28 19:09:07 +00:00
parent c2669c6a89
commit 772e9f93c7
4 changed files with 21 additions and 14 deletions

View file

@ -1321,6 +1321,7 @@
setprop("/it-autoflight/sound/apoffsound2", 0);
}
setprop("/it-autoflight/output/ap-warning", 0);
setprop("/ECAM/warnings/master-warning-light", 0);
}
</script>
</binding>

View file

@ -708,7 +708,7 @@ var ap_various = func {
}
if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
if (getprop("/controls/flight/aileron") > 0.2 or getprop("/controls/flight/aileron") < -0.2 or getprop("/controls/flight/elevator") > 0.2 or getprop("/controls/flight/elevator") < -0.2) {
if (getprop("/controls/flight/aileron") > 0.2 or getprop("/controls/flight/aileron") < -0.2 or getprop("/controls/flight/elevator") > 0.2 or getprop("/controls/flight/elevator") < -0.2 or getprop("/controls/flight/rudder") > 0.2 or getprop("/controls/flight/rudder") < -0.2) {
setprop("/it-autoflight/input/ap1", 0);
setprop("/it-autoflight/input/ap2", 0);
libraries.apOff("hard", 0);

View file

@ -208,7 +208,9 @@ var update_loop = func {
if (getprop("/it-fbw/protections/overspeed") != 1) {
setprop("/it-fbw/protections/overspeed", 1);
}
libraries.apOff("hard", 0);
if (getprop("/it-autoflight/input/ap1") == 1 or getprop("/it-autoflight/input/ap2") == 1) {
libraries.apOff("hard", 0);
}
} else {
if (getprop("/it-fbw/protections/overspeed") != 0) {
setprop("/it-fbw/protections/overspeed", 0);

View file

@ -51,24 +51,28 @@
<legend>AP1</legend>
<pref-width>43</pref-width>
<binding>
<command>property-toggle</command>
<property>/it-autoflight/input/ap1</property>
</binding>
<binding>
<command>nasal</command>
<script>libraries.apOff("hard", 1);</script>
<command>nasal</command>
<script>
if (getprop("/it-autoflight/input/ap1") == 0) {
setprop("it-autoflight/input/ap1", 1);
} else {
libraries.apOff("hard", 1);
}
</script>
</binding>
</button>
<button>
<legend>AP2</legend>
<pref-width>43</pref-width>
<binding>
<command>property-toggle</command>
<property>/it-autoflight/input/ap2</property>
</binding>
<binding>
<command>nasal</command>
<script>libraries.apOff("hard", 2);</script>
<command>nasal</command>
<script>
if (getprop("/it-autoflight/input/ap2") == 0) {
setprop("it-autoflight/input/ap2", 1);
} else {
libraries.apOff("hard", 2);
}
</script>
</binding>
</button>
<button>