System: Base Core for lower ECAM pages

This commit is contained in:
Joshua Davidson 2018-09-13 18:52:24 -04:00
parent f47f04ee96
commit bb9f64858c
2 changed files with 52 additions and 37 deletions

View file

@ -1073,9 +1073,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>sts</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(sts);</script>
</binding>
</action>
</animation>
@ -1093,9 +1092,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>apu</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(apu);</script>
</binding>
</action>
</animation>
@ -1113,9 +1111,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>bleed</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(bleed);</script>
</binding>
</action>
</animation>
@ -1133,9 +1130,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>press</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(press);</script>
</binding>
</action>
</animation>
@ -1153,9 +1149,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>elec</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(elec);</script>
</binding>
</action>
</animation>
@ -1173,9 +1168,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>hyd</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(hyd);</script>
</binding>
</action>
</animation>
@ -1193,9 +1187,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>fuel</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(fuel);</script>
</binding>
</action>
</animation>
@ -1213,9 +1206,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>eng</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(eng);</script>
</binding>
</action>
</animation>
@ -1233,9 +1225,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>cond</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(cond);</script>
</binding>
</action>
</animation>
@ -1253,9 +1244,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>door</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(door);</script>
</binding>
</action>
</animation>
@ -1273,9 +1263,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>wheel</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(wheel);</script>
</binding>
</action>
</animation>
@ -1293,9 +1282,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
<value>fctl</value>
<command>nasal</command>
<script>libraries.LowerECAM.button(fctl);</script>
</binding>
</action>
</animation>

View file

@ -7,7 +7,6 @@
setprop("/ECAM/left-msg", "NONE");
setprop("/position/gear-agl-ft", 0);
setprop("/ECAM/Lower/page", "fctl");
# w = White, b = Blue, g = Green, a = Amber, r = Red
var ECAM = {
@ -17,6 +16,19 @@ var ECAM = {
setprop("/ECAM/to-memo-enable", 1);
setprop("/ECAM/to-config", 0);
setprop("/ECAM/ldg-memo-enable", 0);
setprop("/ECAM/Lower/page", "");
setprop("/ECAM/Lower/light/apu", 0);
setprop("/ECAM/Lower/light/bleed", 0);
setprop("/ECAM/Lower/light/cond", 0);
setprop("/ECAM/Lower/light/door", 0);
setprop("/ECAM/Lower/light/elec", 0);
setprop("/ECAM/Lower/light/eng", 0);
setprop("/ECAM/Lower/light/fctl", 0);
setprop("/ECAM/Lower/light/fuel", 0);
setprop("/ECAM/Lower/light/hyd", 0);
setprop("/ECAM/Lower/light/press", 0);
setprop("/ECAM/Lower/light/sts", 0);
setprop("/ECAM/Lower/light/wheel", 0);
var stateL = getprop("/engines/engine[0]/state");
var stateR = getprop("/engines/engine[1]/state");
var thrustL = getprop("/systems/thrust/state1");
@ -25,6 +37,7 @@ var ECAM = {
var speed = getprop("/velocities/airspeed-kt");
var wow = getprop("/gear/gear[0]/wow");
var altitude = getprop("/position/gear-agl-ft");
LowerECAM.reset();
},
MSGclr: func() {
setprop("/ECAM/ecam-checklist-active", 0);
@ -118,6 +131,8 @@ var ECAM = {
} else {
setprop("/ECAM/to-config", 0);
}
LowerECAM.loop();
},
toConfig: func() {
stateL = getprop("/engines/engine[0]/state");
@ -137,3 +152,15 @@ var ECAM = {
};
ECAM.MSGclr();
var LowerECAM = {
button: func(b) {
},
loop: func() {
},
reset: func() {
},
};