This commit is contained in:
merspieler 2018-09-14 10:31:28 +02:00
commit aea8bb1e52
4 changed files with 60 additions and 45 deletions

View file

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

View file

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

View file

@ -125,7 +125,7 @@ var HYD = {
setprop("/systems/hydraulic/ptu-active", 0); setprop("/systems/hydraulic/ptu-active", 0);
} }
if ((rat_man_sw == 1 or getprop("/controls/electrical/switches/emer-gen") == 1) and (gs > 100)) { if ((rat_man_sw == 1 or getprop("/controls/electrical/switches/emer-gen") == 1) and gs > 100) {
setprop("/controls/hydraulic/rat", 1); setprop("/controls/hydraulic/rat", 1);
setprop("/controls/hydraulic/rat-deployed", 1); setprop("/controls/hydraulic/rat-deployed", 1);
} else if (gs < 100) { } else if (gs < 100) {
@ -134,7 +134,7 @@ var HYD = {
ptu_active = getprop("/systems/hydraulic/ptu-active"); ptu_active = getprop("/systems/hydraulic/ptu-active");
if ((elec_pump_blue_sw and dc_ess >= 25 and !blue_pump_fail) and (stateL == 3 or stateR == 3 or getprop("/gear/gear[0]/wow") == 0) and !blue_leak) { if (elec_pump_blue_sw and dc_ess >= 25 and !blue_pump_fail and (stateL == 3 or stateR == 3 or getprop("/gear/gear[0]/wow") == 0) and !blue_leak) {
if (blue_psi < 2900) { if (blue_psi < 2900) {
setprop("/systems/hydraulic/blue-psi", blue_psi + 50); setprop("/systems/hydraulic/blue-psi", blue_psi + 50);
} else { } else {
@ -154,13 +154,13 @@ var HYD = {
} }
} }
if ((eng1_pump_sw and stateL == 3 and !green_pump_fail) and !green_leak) { if (eng1_pump_sw and stateL == 3 and !green_pump_fail and !green_leak) {
if (green_psi < 2900) { if (green_psi < 2900) {
setprop("/systems/hydraulic/green-psi", green_psi + 50); setprop("/systems/hydraulic/green-psi", green_psi + 50);
} else { } else {
setprop("/systems/hydraulic/green-psi", 3000); setprop("/systems/hydraulic/green-psi", 3000);
} }
} else if ((ptu_active and stateL != 3 and !ptu_fail) and !green_leak) { } else if (ptu_active and !ptu_fail and yellow_psi >= 1500 and !green_leak) {
if (green_psi < 2900) { if (green_psi < 2900) {
setprop("/systems/hydraulic/green-psi", green_psi + 50); setprop("/systems/hydraulic/green-psi", green_psi + 50);
} else { } else {
@ -174,19 +174,19 @@ var HYD = {
} }
} }
if ((eng2_pump_sw and stateR == 3 and !yellow_pump_eng_fail) and !yellow_leak) { if (eng2_pump_sw and stateR == 3 and !yellow_pump_eng_fail and !yellow_leak) {
if (yellow_psi < 2900) { if (yellow_psi < 2900) {
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50); setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
} else { } else {
setprop("/systems/hydraulic/yellow-psi", 3000); setprop("/systems/hydraulic/yellow-psi", 3000);
} }
} else if ((elec_pump_yellow_sw and dc_ess >= 25 and !yellow_pump_elec_fail) and !yellow_leak) { } else if (elec_pump_yellow_sw and dc_ess >= 25 and !yellow_pump_elec_fail and !yellow_leak) {
if (yellow_psi < 2900) { if (yellow_psi < 2900) {
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50); setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
} else { } else {
setprop("/systems/hydraulic/yellow-psi", 3000); setprop("/systems/hydraulic/yellow-psi", 3000);
} }
} else if ((ptu_active and stateR != 3 and !ptu_fail) and !yellow_leak) { } else if (ptu_active and !ptu_fail and green_psi >= 1500 and !yellow_leak) {
if (yellow_psi < 2900) { if (yellow_psi < 2900) {
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50); setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
} else { } else {

View file

@ -1 +1 @@
4634 4635