Add support for calling SD page from failure, currently not implemented for any failure
This commit is contained in:
parent
a766213546
commit
709d128ea2
2 changed files with 74 additions and 9 deletions
|
@ -460,8 +460,6 @@
|
||||||
<object-name>audio_call_vhf3_led</object-name>
|
<object-name>audio_call_vhf3_led</object-name>
|
||||||
<object-name>audio_mech_sgn</object-name>
|
<object-name>audio_mech_sgn</object-name>
|
||||||
<object-name>autoland_light_on</object-name>
|
<object-name>autoland_light_on</object-name>
|
||||||
<object-name>ecam_clr_l_led</object-name>
|
|
||||||
<object-name>ecam_clr_r_led</object-name>
|
|
||||||
<object-name>ecam_c_b_led</object-name>
|
<object-name>ecam_c_b_led</object-name>
|
||||||
<object-name>ecam_el_dc_led</object-name>
|
<object-name>ecam_el_dc_led</object-name>
|
||||||
<object-name>ecam_sts_led</object-name>
|
<object-name>ecam_sts_led</object-name>
|
||||||
|
@ -1572,6 +1570,24 @@
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>select</type>
|
||||||
|
<object-name>ecam_clr_l_led</object-name>
|
||||||
|
<object-name>ecam_clr_r_led</object-name>
|
||||||
|
<condition>
|
||||||
|
<or>
|
||||||
|
<equals>
|
||||||
|
<property>ECAM/Lower/light/clr</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
<equals>
|
||||||
|
<property>controls/switches/annun-test</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</or>
|
||||||
|
</condition>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<!--<animation>
|
<!--<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>ecam_rcl</object-name>
|
<object-name>ecam_rcl</object-name>
|
||||||
|
@ -1589,7 +1605,7 @@
|
||||||
<script>ecam.rclBTN();</script>
|
<script>ecam.rclBTN();</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>-->
|
||||||
|
|
||||||
<animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
|
@ -1606,10 +1622,10 @@
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>ecam.clrBTN();</script>
|
<script>libraries.LowerECAM.button("clr");</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>-->
|
</animation>
|
||||||
|
|
||||||
<!-- Engine Cutoff/Mode Selector -->
|
<!-- Engine Cutoff/Mode Selector -->
|
||||||
<animation>
|
<animation>
|
||||||
|
|
|
@ -22,6 +22,7 @@ var mode = "XX";
|
||||||
var modeI = "XX";
|
var modeI = "XX";
|
||||||
var man_sel = 0;
|
var man_sel = 0;
|
||||||
var fault_sel = 0;
|
var fault_sel = 0;
|
||||||
|
var fault_page = "";
|
||||||
var warnPhase = 1;
|
var warnPhase = 1;
|
||||||
var page = "door";
|
var page = "door";
|
||||||
var aileron = 0;
|
var aileron = 0;
|
||||||
|
@ -59,6 +60,7 @@ var ECAM = {
|
||||||
setprop("/ECAM/Lower/page", "door");
|
setprop("/ECAM/Lower/page", "door");
|
||||||
setprop("/ECAM/Lower/man-select", 0);
|
setprop("/ECAM/Lower/man-select", 0);
|
||||||
setprop("/ECAM/Lower/fault-select", 0);
|
setprop("/ECAM/Lower/fault-select", 0);
|
||||||
|
setprop("/ECAM/Lower/fault-page", "");
|
||||||
setprop("/ECAM/Lower/apu-timer", 0);
|
setprop("/ECAM/Lower/apu-timer", 0);
|
||||||
setprop("/ECAM/Lower/eng-timer", 0);
|
setprop("/ECAM/Lower/eng-timer", 0);
|
||||||
setprop("/ECAM/Lower/fctl-timer", 0);
|
setprop("/ECAM/Lower/fctl-timer", 0);
|
||||||
|
@ -74,6 +76,7 @@ var ECAM = {
|
||||||
setprop("/ECAM/Lower/light/press", 0);
|
setprop("/ECAM/Lower/light/press", 0);
|
||||||
setprop("/ECAM/Lower/light/sts", 0);
|
setprop("/ECAM/Lower/light/sts", 0);
|
||||||
setprop("/ECAM/Lower/light/wheel", 0);
|
setprop("/ECAM/Lower/light/wheel", 0);
|
||||||
|
setprop("/ECAM/Lower/light/clr", 0);
|
||||||
setprop("/ECAM/warning-phase", 1);
|
setprop("/ECAM/warning-phase", 1);
|
||||||
setprop("/ECAM/warning-phase-10-time", 0);
|
setprop("/ECAM/warning-phase-10-time", 0);
|
||||||
setprop("/ECAM/ap1-off-time", 0);
|
setprop("/ECAM/ap1-off-time", 0);
|
||||||
|
@ -267,7 +270,8 @@ var LowerECAM = {
|
||||||
button: func(b) {
|
button: func(b) {
|
||||||
man_sel = getprop("/ECAM/Lower/man-select");
|
man_sel = getprop("/ECAM/Lower/man-select");
|
||||||
|
|
||||||
if (!getprop("/ECAM/lower/fault-select")) {
|
if (getprop("/ECAM/Lower/fault-select") == 0) {
|
||||||
|
if (b != "clr") {
|
||||||
if (!man_sel) {
|
if (!man_sel) {
|
||||||
setprop("/ECAM/Lower/man-select", 1);
|
setprop("/ECAM/Lower/man-select", 1);
|
||||||
setprop("/ECAM/Lower/page", b);
|
setprop("/ECAM/Lower/page", b);
|
||||||
|
@ -284,10 +288,35 @@ var LowerECAM = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (b == "clr") {
|
||||||
|
setprop("/ECAM/Lower/light/clr", 0);
|
||||||
|
setprop("/ECAM/Lower/fault-select", 0);
|
||||||
|
setprop("/ECAM/Lower/fault-page", "");
|
||||||
|
LowerECAM.loop();
|
||||||
|
} elsif (!man_sel) {
|
||||||
|
setprop("/ECAM/Lower/man-select", 1);
|
||||||
|
setprop("/ECAM/Lower/page", b);
|
||||||
|
setprop("/ECAM/Lower/light/" ~ b, 1);
|
||||||
|
print("calling SD page manually");
|
||||||
|
} else {
|
||||||
|
if (b == getprop("/ECAM/Lower/page")) {
|
||||||
|
setprop("/ECAM/Lower/man-select", 0);
|
||||||
|
setprop("/ECAM/Lower/light/" ~ b, 0);
|
||||||
|
setprop("/ECAM/Lower/fault-select", 1);
|
||||||
|
setprop("/ECAM/Lower/page", getprop("/ECAM/Lower/fault-page"));
|
||||||
|
} else {
|
||||||
|
setprop("/ECAM/Lower/light/" ~ getprop("/ECAM/Lower/page"), 0);
|
||||||
|
setprop("/ECAM/Lower/page", b);
|
||||||
|
setprop("/ECAM/Lower/light/" ~ b, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
loop: func() {
|
loop: func() {
|
||||||
man_sel = getprop("/ECAM/Lower/man-select");
|
man_sel = getprop("/ECAM/Lower/man-select");
|
||||||
fault_sel = getprop("/ECAM/Lower/fault-select");
|
fault_sel = getprop("/ECAM/Lower/fault-select");
|
||||||
|
fault_page = getprop("/ECAM/Lower/fault-page");
|
||||||
page = getprop("/ECAM/Lower/page");
|
page = getprop("/ECAM/Lower/page");
|
||||||
aileron = getprop("/fdm/jsbsim/fbw/aileron-sidestick");
|
aileron = getprop("/fdm/jsbsim/fbw/aileron-sidestick");
|
||||||
elevator = getprop("/fdm/jsbsim/fbw/elevator-sidestick");
|
elevator = getprop("/fdm/jsbsim/fbw/elevator-sidestick");
|
||||||
|
@ -296,6 +325,7 @@ var LowerECAM = {
|
||||||
stateL = getprop("/engines/engine[0]/state");
|
stateL = getprop("/engines/engine[0]/state");
|
||||||
stateR = getprop("/engines/engine[1]/state");
|
stateR = getprop("/engines/engine[1]/state");
|
||||||
engModeSel = getprop("/controls/engines/engine-start-switch");
|
engModeSel = getprop("/controls/engines/engine-start-switch");
|
||||||
|
elapsedSec = getprop("/sim/time/elapsed-sec");
|
||||||
|
|
||||||
if (warnPhase == 2) {
|
if (warnPhase == 2) {
|
||||||
if (abs(aileron) > 0.3 or abs(elevator) > 0.3) {
|
if (abs(aileron) > 0.3 or abs(elevator) > 0.3) {
|
||||||
|
@ -363,7 +393,6 @@ var LowerECAM = {
|
||||||
setprop("/ECAM/Lower/page", "door");
|
setprop("/ECAM/Lower/page", "door");
|
||||||
}
|
}
|
||||||
} else if (warnPhase == 2) {
|
} else if (warnPhase == 2) {
|
||||||
elapsedSec = getprop("/sim/time/elapsed-sec");
|
|
||||||
|
|
||||||
if (showENGPage) {
|
if (showENGPage) {
|
||||||
if (page != "eng") {
|
if (page != "eng") {
|
||||||
|
@ -412,6 +441,19 @@ var LowerECAM = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -432,6 +474,13 @@ var LowerECAM = {
|
||||||
setprop("/ECAM/Lower/light/sts", 0);
|
setprop("/ECAM/Lower/light/sts", 0);
|
||||||
setprop("/ECAM/Lower/light/wheel", 0);
|
setprop("/ECAM/Lower/light/wheel", 0);
|
||||||
},
|
},
|
||||||
|
failCall: func(page) {
|
||||||
|
setprop("/ECAM/Lower/man-select", 0);
|
||||||
|
setprop("/ECAM/Lower/fault-select", 1);
|
||||||
|
setprop("/ECAM/Lower/fault-page", page);
|
||||||
|
setprop("/ECAM/Lower/page", page);
|
||||||
|
setprop("/ECAM/Lower/light/clr", 1);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
# Logic for autopilot disconnect warning
|
# Logic for autopilot disconnect warning
|
||||||
|
|
Reference in a new issue