Merge master

This commit is contained in:
Joshua Davidson 2018-01-01 10:32:28 -05:00
commit 7a8a51fc02
3 changed files with 36 additions and 24 deletions

View file

@ -105,7 +105,7 @@ setlistener("/it-autoflight/input/ap1", func {
var law = getprop("/it-fbw/law"); var law = getprop("/it-fbw/law");
if (apmas == 0) { if (apmas == 0) {
setprop("/it-autoflight/output/ap1", 0); setprop("/it-autoflight/output/ap1", 0);
if (getprop("/it-autoflight/sound/enableapoffsound") == 1) { if (getprop("/it-autoflight/sound/enableapoffsound") == 1 and getprop("/it-autoflight/output/ap2") == 0) {
setprop("/it-autoflight/sound/apoffsound", 1); setprop("/it-autoflight/sound/apoffsound", 1);
setprop("/it-autoflight/sound/enableapoffsound", 0); setprop("/it-autoflight/sound/enableapoffsound", 0);
} }
@ -124,6 +124,9 @@ setlistener("/it-autoflight/input/ap1", func {
} }
} }
setprop("/it-autoflight/output/ap1", 1); setprop("/it-autoflight/output/ap1", 1);
if (getprop("/it-autoflight/output/ap2") == 1 and (getprop("/it-autoflight/output/appr-armed") != 1 and getprop("/it-autoflight/output/lat") != 2 and getprop("/it-autoflight/output/lat") != 6)) {
setprop("/it-autoflight/input/ap2", 0);
}
setprop("/it-autoflight/sound/enableapoffsound", 1); setprop("/it-autoflight/sound/enableapoffsound", 1);
setprop("/it-autoflight/sound/apoffsound", 0); setprop("/it-autoflight/sound/apoffsound", 0);
fmabox(); fmabox();
@ -138,7 +141,7 @@ setlistener("/it-autoflight/input/ap2", func {
var law = getprop("/it-fbw/law"); var law = getprop("/it-fbw/law");
if (apmas == 0) { if (apmas == 0) {
setprop("/it-autoflight/output/ap2", 0); setprop("/it-autoflight/output/ap2", 0);
if (getprop("/it-autoflight/sound/enableapoffsound2") == 1) { if (getprop("/it-autoflight/sound/enableapoffsound2") == 1 and getprop("/it-autoflight/output/ap1") == 0) {
setprop("/it-autoflight/sound/apoffsound2", 1); setprop("/it-autoflight/sound/apoffsound2", 1);
setprop("/it-autoflight/sound/enableapoffsound2", 0); setprop("/it-autoflight/sound/enableapoffsound2", 0);
} }
@ -157,6 +160,9 @@ setlistener("/it-autoflight/input/ap2", func {
} }
} }
setprop("/it-autoflight/output/ap2", 1); setprop("/it-autoflight/output/ap2", 1);
if (getprop("/it-autoflight/output/ap1") == 1 and (getprop("/it-autoflight/output/appr-armed") != 1 and getprop("/it-autoflight/output/lat") != 2 and getprop("/it-autoflight/output/lat") != 6)) {
setprop("/it-autoflight/input/ap1", 0);
}
setprop("/it-autoflight/sound/enableapoffsound2", 1); setprop("/it-autoflight/sound/enableapoffsound2", 1);
setprop("/it-autoflight/sound/apoffsound2", 0); setprop("/it-autoflight/sound/apoffsound2", 0);
fmabox(); fmabox();
@ -213,7 +219,10 @@ var fmabox = func {
setprop("/it-autoflight/output/fma-pwr", 0); setprop("/it-autoflight/output/fma-pwr", 0);
} else { } else {
setprop("/it-autoflight/output/fma-pwr", 1); setprop("/it-autoflight/output/fma-pwr", 1);
if (getprop("/it-autoflight/output/lat") == 9) {
setprop("/it-autoflight/input/lat", 3); setprop("/it-autoflight/input/lat", 3);
}
if (getprop("/it-autoflight/output/vert") == 9) {
if (getprop("/it-autoflight/custom/trk-fpa") == 0) { if (getprop("/it-autoflight/custom/trk-fpa") == 0) {
setprop("/it-autoflight/input/vert", 1); setprop("/it-autoflight/input/vert", 1);
} else if (getprop("/it-autoflight/custom/trk-fpa") == 1) { } else if (getprop("/it-autoflight/custom/trk-fpa") == 1) {
@ -222,6 +231,7 @@ var fmabox = func {
setprop("/it-autoflight/input/vs", math.round(getprop("/it-autoflight/internal/vert-speed-fpm"), 100)); setprop("/it-autoflight/input/vs", math.round(getprop("/it-autoflight/internal/vert-speed-fpm"), 100));
setprop("/it-autoflight/input/fpa", math.round(getprop("/it-autoflight/internal/fpa"), 0.1)); setprop("/it-autoflight/input/fpa", math.round(getprop("/it-autoflight/internal/fpa"), 0.1));
} }
}
} }
# Master Lateral # Master Lateral

View file

@ -802,18 +802,20 @@
<name>apoff</name> <name>apoff</name>
<path>/Aircraft/IDG-A32X/Sounds/apoff.wav</path> <path>/Aircraft/IDG-A32X/Sounds/apoff.wav</path>
<condition> <condition>
<and>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
<or>
<property>/it-autoflight/sound/apoffsound</property> <property>/it-autoflight/sound/apoffsound</property>
</condition>
<volume>
<factor>40.0</factor>
</volume>
</apoff>
<apoff>
<name>apoff2</name>
<path>/Aircraft/IDG-A32X/Sounds/apoff.wav</path>
<condition>
<property>/it-autoflight/sound/apoffsound2</property> <property>/it-autoflight/sound/apoffsound2</property>
</or>
</and>
</condition> </condition>
<volume> <volume>
<factor>40.0</factor> <factor>40.0</factor>

View file

@ -1 +1 @@
4216 4217