A3XX: Missing and on OH, SECs, FACs fail spoilers/rudders

This commit is contained in:
Joshua Davidson 2017-07-04 23:37:40 -04:00
parent 67a45e3728
commit f86825a3a2
3 changed files with 113 additions and 122 deletions

View file

@ -53,56 +53,6 @@
</hrule> </hrule>
</group> </group>
<checkbox>
<label>Aileron Left</label>
<halign>left</halign>
<property>/systems/failures/aileron-left</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Aileron Right</label>
<halign>left</halign>
<property>/systems/failures/aileron-right</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Elevator Left</label>
<halign>left</halign>
<property>/systems/failures/elevator-left</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Elevator Right</label>
<halign>left</halign>
<property>/systems/failures/elevator-right</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Rudder</label>
<halign>left</halign>
<property>/systems/failures/rudder</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox> <checkbox>
<label>ELAC1</label> <label>ELAC1</label>
<halign>left</halign> <halign>left</halign>

View file

@ -883,14 +883,16 @@
<object-name>ELAC1Btn1F</object-name> <object-name>ELAC1Btn1F</object-name>
<condition> <condition>
<or> <or>
<equals> <and>
<property>/systems/failures/elac1</property> <equals>
<value>1</value> <property>/systems/failures/elac1</property>
</equals> <value>1</value>
<equals> </equals>
<property>/controls/fctl/elac1</property> <equals>
<value>1</value> <property>/controls/fctl/elac1</property>
</equals> <value>1</value>
</equals>
</and>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
<value>1</value> <value>1</value>
@ -954,14 +956,16 @@
<object-name>SEC1Btn1F</object-name> <object-name>SEC1Btn1F</object-name>
<condition> <condition>
<or> <or>
<equals> <and>
<property>/systems/failures/sec1</property> <equals>
<value>1</value> <property>/systems/failures/sec1</property>
</equals> <value>1</value>
<equals> </equals>
<property>/controls/fctl/sec1</property> <equals>
<value>1</value> <property>/controls/fctl/sec1</property>
</equals> <value>1</value>
</equals>
</and>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
<value>1</value> <value>1</value>
@ -1025,14 +1029,16 @@
<object-name>FAC1Btn1F</object-name> <object-name>FAC1Btn1F</object-name>
<condition> <condition>
<or> <or>
<equals> <and>
<property>/systems/failures/fac1</property> <equals>
<value>1</value> <property>/systems/failures/fac1</property>
</equals> <value>1</value>
<equals> </equals>
<property>/controls/fctl/fac1</property> <equals>
<value>1</value> <property>/controls/fctl/fac1</property>
</equals> <value>1</value>
</equals>
</and>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
<value>1</value> <value>1</value>
@ -1096,14 +1102,16 @@
<object-name>ELAC2Btn1F</object-name> <object-name>ELAC2Btn1F</object-name>
<condition> <condition>
<or> <or>
<equals> <and>
<property>/systems/failures/elac2</property> <equals>
<value>1</value> <property>/systems/failures/elac2</property>
</equals> <value>1</value>
<equals> </equals>
<property>/controls/fctl/elac2</property> <equals>
<value>1</value> <property>/controls/fctl/elac2</property>
</equals> <value>1</value>
</equals>
</and>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
<value>1</value> <value>1</value>
@ -1167,14 +1175,16 @@
<object-name>SEC2Btn1F</object-name> <object-name>SEC2Btn1F</object-name>
<condition> <condition>
<or> <or>
<equals> <and>
<property>/systems/failures/sec2</property> <equals>
<value>1</value> <property>/systems/failures/sec2</property>
</equals> <value>1</value>
<equals> </equals>
<property>/controls/fctl/sec2</property> <equals>
<value>1</value> <property>/controls/fctl/sec2</property>
</equals> <value>1</value>
</equals>
</and>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
<value>1</value> <value>1</value>
@ -1238,14 +1248,16 @@
<object-name>SEC3Btn1F</object-name> <object-name>SEC3Btn1F</object-name>
<condition> <condition>
<or> <or>
<equals> <and>
<property>/systems/failures/sec3</property> <equals>
<value>1</value> <property>/systems/failures/sec3</property>
</equals> <value>1</value>
<equals> </equals>
<property>/controls/fctl/sec3</property> <equals>
<value>1</value> <property>/controls/fctl/sec3</property>
</equals> <value>1</value>
</equals>
</and>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
<value>1</value> <value>1</value>
@ -1309,14 +1321,16 @@
<object-name>FAC2Btn1F</object-name> <object-name>FAC2Btn1F</object-name>
<condition> <condition>
<or> <or>
<equals> <and>
<property>/systems/failures/fac2</property> <equals>
<value>1</value> <property>/systems/failures/fac2</property>
</equals> <value>1</value>
<equals> </equals>
<property>/controls/fctl/fac2</property> <equals>
<value>1</value> <property>/controls/fctl/fac2</property>
</equals> <value>1</value>
</equals>
</and>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
<value>1</value> <value>1</value>
@ -1381,14 +1395,16 @@
<object-name>GPWSTerrBtn1F</object-name> <object-name>GPWSTerrBtn1F</object-name>
<condition> <condition>
<or> <or>
<equals> <and>
<property>/instrumentation/mk-viii/serviceable</property> <equals>
<value>0</value> <property>/instrumentation/mk-viii/serviceable</property>
</equals> <value>0</value>
<equals> </equals>
<property>/instrumentation/mk-viii/inputs/discretes/terr-inhibit</property> <equals>
<value>0</value> <property>/instrumentation/mk-viii/inputs/discretes/terr-inhibit</property>
</equals> <value>0</value>
</equals>
</and>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
<value>1</value> <value>1</value>
@ -1452,14 +1468,16 @@
<object-name>GPWSBtn1F</object-name> <object-name>GPWSBtn1F</object-name>
<condition> <condition>
<or> <or>
<equals> <and>
<property>/instrumentation/mk-viii/serviceable</property> <equals>
<value>0</value> <property>/instrumentation/mk-viii/serviceable</property>
</equals> <value>0</value>
<equals> </equals>
<property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property> <equals>
<value>0</value> <property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property>
</equals> <value>0</value>
</equals>
</and>
<equals> <equals>
<property>/controls/switches/annun-test</property> <property>/controls/switches/annun-test</property>
<value>1</value> <value>1</value>

View file

@ -70,32 +70,55 @@ var update_loop = func {
if (sec1_sw and !sec1_fail) { if (sec1_sw and !sec1_fail) {
setprop("/systems/fctl/sec1", 1); setprop("/systems/fctl/sec1", 1);
setprop("/systems/failures/spoiler-l3", 0);
setprop("/systems/failures/spoiler-r3", 0);
setprop("/systems/failures/spoiler-l4", 0);
setprop("/systems/failures/spoiler-r4", 0);
} else { } else {
setprop("/systems/fctl/sec1", 0); setprop("/systems/fctl/sec1", 0);
setprop("/systems/failures/spoiler-l3", 1);
setprop("/systems/failures/spoiler-r3", 1);
setprop("/systems/failures/spoiler-l4", 1);
setprop("/systems/failures/spoiler-r4", 1);
} }
if (sec2_sw and !sec2_fail) { if (sec2_sw and !sec2_fail) {
setprop("/systems/fctl/sec2", 1); setprop("/systems/fctl/sec2", 1);
setprop("/systems/failures/spoiler-l5", 0);
setprop("/systems/failures/spoiler-r5", 0);
} else { } else {
setprop("/systems/fctl/sec2", 0); setprop("/systems/fctl/sec2", 0);
setprop("/systems/failures/spoiler-l5", 1);
setprop("/systems/failures/spoiler-r5", 1);
} }
if (sec3_sw and !sec3_fail) { if (sec3_sw and !sec3_fail) {
setprop("/systems/fctl/sec3", 1); setprop("/systems/fctl/sec3", 1);
setprop("/systems/failures/spoiler-l2", 0);
setprop("/systems/failures/spoiler-r2", 0);
} else { } else {
setprop("/systems/fctl/sec3", 0); setprop("/systems/fctl/sec3", 0);
setprop("/systems/failures/spoiler-l2", 1);
setprop("/systems/failures/spoiler-r2", 1);
} }
if (fac1_sw and !fac1_fail) { if (fac1_sw and !fac1_fail) {
setprop("/systems/fctl/fac1", 1); setprop("/systems/fctl/fac1", 1);
setprop("/systems/failures/rudder", 0);
} else { } else {
setprop("/systems/fctl/fac1", 0); setprop("/systems/fctl/fac1", 0);
if (!fac2_sw or fac2_fail) {
setprop("/systems/failures/rudder", 1);
}
} }
if (fac2_sw and !fac2_fail) { if (fac2_sw and !fac2_fail) {
setprop("/systems/fctl/fac2", 1); setprop("/systems/fctl/fac2", 1);
} else { } else {
setprop("/systems/fctl/fac2", 0); setprop("/systems/fctl/fac2", 0);
if (!fac1_sw or fac1_fail) {
setprop("/systems/failures/rudder", 1);
}
} }
var elac1 = getprop("/systems/fctl/elac1"); var elac1 = getprop("/systems/fctl/elac1");