A3XX: Simulate TO-CONFIG button
This commit is contained in:
parent
ed7a903a79
commit
03f016117b
4 changed files with 35 additions and 3 deletions
|
@ -1350,6 +1350,25 @@
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>ecam_to_config</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<repeatable type="bool">false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<condition>
|
||||||
|
<greater-than-equals>
|
||||||
|
<property>systems/electrical/bus/dc-ess</property>
|
||||||
|
<value>25</value>
|
||||||
|
</greater-than-equals>
|
||||||
|
</condition>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>libraries.ECAM.toConfig();</script>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<!-- Engine Cutoff/Mode Selector -->
|
<!-- Engine Cutoff/Mode Selector -->
|
||||||
<animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
|
|
|
@ -274,8 +274,7 @@ var canvas_upperECAM_base = {
|
||||||
me["TO_Flaps_B"].show();
|
me["TO_Flaps_B"].show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/controls/autobrake/mode") == 3 and getprop("/controls/switches/no-smoking-sign") == 1 and getprop("/controls/switches/seatbelt-sign") == 1 and getprop("/controls/flight/speedbrake-arm") == 1 and getprop("/controls/flight/flap-pos") > 0
|
if (getprop("/ECAM/to-config") == 1) {
|
||||||
and getprop("/controls/flight/flap-pos") < 5) {
|
|
||||||
me["TO_Config"].setText("T.O CONFIG NORMAL");
|
me["TO_Config"].setText("T.O CONFIG NORMAL");
|
||||||
me["TO_Config_B"].hide();
|
me["TO_Config_B"].hide();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -15,6 +15,7 @@ var ECAM = {
|
||||||
setprop("/ECAM/engine-start-time", 0);
|
setprop("/ECAM/engine-start-time", 0);
|
||||||
setprop("/ECAM/engine-start-time-switch", 0);
|
setprop("/ECAM/engine-start-time-switch", 0);
|
||||||
setprop("/ECAM/to-memo-enable", 1);
|
setprop("/ECAM/to-memo-enable", 1);
|
||||||
|
setprop("/ECAM/to-config", 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");
|
||||||
|
@ -75,6 +76,19 @@ var ECAM = {
|
||||||
} else {
|
} else {
|
||||||
setprop("/ECAM/left-msg", "NONE");
|
setprop("/ECAM/left-msg", "NONE");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getprop("/controls/autobrake/mode") == 3 and getprop("/controls/switches/no-smoking-sign") == 1 and getprop("/controls/switches/seatbelt-sign") == 1 and getprop("/controls/flight/speedbrake-arm") == 1 and getprop("/controls/flight/flap-pos") > 0
|
||||||
|
and getprop("/controls/flight/flap-pos") < 5) {
|
||||||
|
# Do nothing
|
||||||
|
} else {
|
||||||
|
setprop("/ECAM/to-config", 0);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toConfig: func() {
|
||||||
|
if (getprop("/controls/autobrake/mode") == 3 and getprop("/controls/switches/no-smoking-sign") == 1 and getprop("/controls/switches/seatbelt-sign") == 1 and getprop("/controls/flight/speedbrake-arm") == 1 and getprop("/controls/flight/flap-pos") > 0
|
||||||
|
and getprop("/controls/flight/flap-pos") < 5) {
|
||||||
|
setprop("/ECAM/to-config", 1);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
4208
|
4209
|
Reference in a new issue