System: AP and A/THR offs coded systemwide, Sim: GUI AP Dialog added DISCs
This commit is contained in:
parent
2cc57667e2
commit
af70bf84bf
5 changed files with 63 additions and 13 deletions
|
@ -682,12 +682,23 @@ var ELEC = {
|
||||||
setprop("/systems/electrical/battery2-volts", math.clamp(battery2_percent * (24) / (10), 0, 24));
|
setprop("/systems/electrical/battery2-volts", math.clamp(battery2_percent * (24) / (10), 0, 24));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/bus/ac-ess") < 110) {
|
dc_ess = getprop("/systems/electrical/bus/dc-ess");
|
||||||
if (getprop("/it-autoflight/output/ap1") == 1) {
|
|
||||||
setprop("/it-autoflight/input/ap1", 0);
|
if (dc2 < 25) {
|
||||||
}
|
|
||||||
if (getprop("/it-autoflight/output/ap2") == 1) {
|
if (getprop("/it-autoflight/output/ap2") == 1) {
|
||||||
setprop("/it-autoflight/input/ap2", 0);
|
libraries.apOff("hard", 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dc_ess < 25 and dc2 < 25) {
|
||||||
|
if (getprop("/it-autoflight/output/athr") == 1) {
|
||||||
|
libraries.athrOff("hard");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dc_ess < 25) {
|
||||||
|
if (getprop("/it-autoflight/output/ap1") == 1) {
|
||||||
|
libraries.apOff("hard", 1);
|
||||||
}
|
}
|
||||||
setprop("systems/electrical/on", 0);
|
setprop("systems/electrical/on", 0);
|
||||||
setprop("/systems/thrust/thr-locked", 0);
|
setprop("/systems/thrust/thr-locked", 0);
|
||||||
|
|
|
@ -272,11 +272,8 @@ var fbw_loop = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/it-fbw/law") != 0) {
|
if (getprop("/it-fbw/law") != 0) {
|
||||||
if (getprop("/it-autoflight/output/ap1") == 1) {
|
if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
|
||||||
setprop("/it-autoflight/input/ap1", 0);
|
libraries.apOff("hard", 0);
|
||||||
}
|
|
||||||
if (getprop("/it-autoflight/output/ap2") == 1) {
|
|
||||||
setprop("/it-autoflight/input/ap2", 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -815,7 +815,7 @@
|
||||||
<apoff>
|
<apoff>
|
||||||
<name>apoff-looped</name>
|
<name>apoff-looped</name>
|
||||||
<mode>looped</mode>
|
<mode>looped</mode>
|
||||||
<path>/Aircraft/IDG-A32X/Sounds/apoff.wav</path>
|
<path>Aircraft/IDG-A32X/Sounds/apoff.wav</path>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
<equals>
|
<equals>
|
||||||
|
@ -844,7 +844,7 @@
|
||||||
<apoff>
|
<apoff>
|
||||||
<name>apoff-single</name>
|
<name>apoff-single</name>
|
||||||
<mode>once</mode>
|
<mode>once</mode>
|
||||||
<path>/Aircraft/IDG-A32X/Sounds/apoff.wav</path>
|
<path>Aircraft/IDG-A32X/Sounds/apoff.wav</path>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
<equals>
|
<equals>
|
||||||
|
@ -872,7 +872,7 @@
|
||||||
|
|
||||||
<apoff>
|
<apoff>
|
||||||
<name>athroff</name>
|
<name>athroff</name>
|
||||||
<path>/Aircraft/IDG-A32X/Sounds/Cockpit/chime.wav</path>
|
<path>Aircraft/IDG-A32X/Sounds/Cockpit/chime.wav</path>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
<equals>
|
<equals>
|
||||||
|
|
BIN
Sounds/apoff.wav
BIN
Sounds/apoff.wav
Binary file not shown.
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<layout>hbox</layout>
|
<layout>hbox</layout>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
<legend>A/THR</legend>
|
<legend>A/THR</legend>
|
||||||
<pref-width>43</pref-width>
|
<pref-width>43</pref-width>
|
||||||
|
@ -93,6 +94,47 @@
|
||||||
</button>
|
</button>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
<group>
|
||||||
|
<layout>hbox</layout>
|
||||||
|
|
||||||
|
<button>
|
||||||
|
<legend>A/THR DISC</legend>
|
||||||
|
<pref-width>119</pref-width>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
if (getprop("/it-autoflight/input/athr") == 1) {
|
||||||
|
libraries.athrOff("soft");
|
||||||
|
} else {
|
||||||
|
if (getprop("/it-autoflight/output/athr-warning") == 1) {
|
||||||
|
setprop("/it-autoflight/output/athr-warning", 0);
|
||||||
|
setprop("/ECAM/warnings/master-caution-light", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<legend>AP DISC</legend>
|
||||||
|
<pref-width>119</pref-width>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
if (getprop("/it-autoflight/input/ap1") == 1 or getprop("/it-autoflight/input/ap1") == 2) {
|
||||||
|
libraries.apOff("soft", 0);
|
||||||
|
} else {
|
||||||
|
if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
</group>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<layout>vbox</layout>
|
<layout>vbox</layout>
|
||||||
|
|
||||||
|
|
Reference in a new issue