Control: FADEC THR-LOCK is simulated
This commit is contained in:
parent
491c2141a3
commit
dcfecf5897
6 changed files with 104 additions and 7 deletions
|
@ -24,7 +24,7 @@ var messages_priority_2 = func {
|
|||
ap_offw.noRepeat = 0;
|
||||
}
|
||||
|
||||
if ((getprop("/ECAM/warning-phase") >= 5 and getprop("/ECAM/warning-phase") <= 7) and getprop("/systems/thrust/thr-locked") == 1) {
|
||||
if (getprop("/ECAM/warning-phase") >= 5 and getprop("/ECAM/warning-phase") <= 7 and getprop("/systems/thrust/thr-locked") == 1) {
|
||||
athr_lock.active = 1;
|
||||
athr_lock_1.active = 1;
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# A3XX FADEC/Throttle Control System
|
||||
# Joshua Davidson (it0uchpods)
|
||||
|
||||
# Copyright (c) 2018 Joshua Davidson (it0uchpods)
|
||||
|
||||
|
@ -52,6 +51,9 @@ setprop("/systems/thrust/clb-lim", 0.0);
|
|||
setprop("/systems/thrust/lim-flex", 0);
|
||||
setprop("/engines/flex-derate", 0);
|
||||
setprop("/systems/thrust/eng-out", 0);
|
||||
setprop("/systems/thrust/thr-locked", 0);
|
||||
setprop("/systems/thrust/thr-lock-cmd[0]", 0);
|
||||
setprop("/systems/thrust/thr-lock-cmd[1]", 0);
|
||||
|
||||
setlistener("/sim/signals/fdm-initialized", func {
|
||||
thrust_loop.start();
|
||||
|
@ -333,3 +335,10 @@ var thrust_flash = maketimer(0.5, func {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
setlistener("/systems/thrust/thr-locked", func {
|
||||
if (getprop("/systems/thrust/thr-locked") == 1) {
|
||||
setprop("/systems/thrust/thr-lock-cmd[0]", getprop("/controls/engines/engine[0]/throttle-output"));
|
||||
setprop("/systems/thrust/thr-lock-cmd[1]", getprop("/controls/engines/engine[1]/throttle-output"));
|
||||
}
|
||||
}, 0, 0);
|
||||
|
|
|
@ -1135,6 +1135,15 @@
|
|||
</condition>
|
||||
<property>/controls/engines/engine[0]/throttle-rev</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/systems/thrust/thr-lock-cmd[0]</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -1183,6 +1192,15 @@
|
|||
</condition>
|
||||
<property>/controls/engines/engine[1]/throttle-rev</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/systems/thrust/thr-lock-cmd[1]</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
|
|
|
@ -1656,6 +1656,15 @@
|
|||
</condition>
|
||||
<property>/controls/engines/engine[0]/throttle-rev</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/systems/thrust/thr-lock-cmd[0]</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -1704,6 +1713,15 @@
|
|||
</condition>
|
||||
<property>/controls/engines/engine[1]/throttle-rev</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/systems/thrust/thr-lock-cmd[1]</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
<property>/gear/gear[2]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<not-equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</not-equals>
|
||||
</and>
|
||||
</condition>
|
||||
<value>10</value>
|
||||
|
@ -75,6 +79,10 @@
|
|||
<property>/gear/gear[2]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<not-equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</not-equals>
|
||||
</and>
|
||||
</condition>
|
||||
<value>0.1</value>
|
||||
|
@ -111,6 +119,10 @@
|
|||
<property>/it-autoflight/input/kts-mach</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<not-equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</not-equals>
|
||||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
|
@ -230,6 +242,10 @@
|
|||
<property>/it-autoflight/input/kts-mach</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<not-equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</not-equals>
|
||||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
|
@ -353,6 +369,10 @@
|
|||
<property>/it-autoflight/output/athr</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<not-equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</not-equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
|
@ -460,6 +480,10 @@
|
|||
<property>/it-autoflight/output/athr</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<not-equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</not-equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
|
@ -567,6 +591,10 @@
|
|||
<property>/it-autoflight/output/athr</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<and>
|
||||
<not>
|
||||
<equals>
|
||||
|
@ -636,6 +664,28 @@
|
|||
</or>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/thr-locked</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<div>
|
||||
<max>
|
||||
<property>/systems/thrust/thr-lock-cmd[0]</property>
|
||||
<property>/systems/thrust/thr-lock-cmd[1]</property>
|
||||
</max>
|
||||
<table>
|
||||
<property>/environment/temperature-degc</property>
|
||||
<entry><ind> 70</ind><dep>0.797</dep></entry>
|
||||
<entry><ind> 40</ind><dep>0.822</dep></entry>
|
||||
<entry><ind>-60</ind><dep>1.000</dep></entry>
|
||||
</table>
|
||||
</div>
|
||||
</expression>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
|
|
|
@ -36,13 +36,15 @@
|
|||
<button>
|
||||
<legend>A/THR</legend>
|
||||
<pref-width>43</pref-width>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>/it-autoflight/input/athr</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>libraries.athrOff("hard");</script>
|
||||
<script>
|
||||
if (getprop("/it-autoflight/input/athr") == 0) {
|
||||
setprop("it-autoflight/input/athr", 1);
|
||||
} else {
|
||||
libraries.athrOff("hard");
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
</button>
|
||||
<button>
|
||||
|
|
Reference in a new issue