Bugfix FCU, RAT MAN light, and ECAM autopilot message
This commit is contained in:
parent
2ab640348f
commit
928144a072
7 changed files with 50 additions and 44 deletions
|
@ -462,7 +462,6 @@
|
|||
<!-- Remove from this animation once you simulate -->
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>alt-text-test</object-name>
|
||||
<object-name>atc-test</object-name>
|
||||
<object-name>audio_att_sgn</object-name>
|
||||
<object-name>audio_call_hf2_led</object-name>
|
||||
|
@ -478,19 +477,27 @@
|
|||
<object-name>engine_fault_1</object-name>
|
||||
<object-name>engine_fault_2</object-name>
|
||||
<object-name>exped_led</object-name>
|
||||
<object-name>hdg-text-test</object-name>
|
||||
<object-name>qnh-test</object-name>
|
||||
<object-name>radio_opt_led</object-name>
|
||||
<object-name>rudder-trim-test</object-name>
|
||||
<object-name>spd-text-test</object-name>
|
||||
<object-name>terr_on_nd_on</object-name>
|
||||
<object-name>ver.fmgc</object-name>
|
||||
<condition>
|
||||
<property>controls/switches/annun-test</property>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>alt-text-test</object-name>
|
||||
<object-name>hdg-text-test</object-name>
|
||||
<object-name>spd-text-test</object-name>
|
||||
<object-name>vs-text-test</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<or>
|
||||
<not><property>/FMGC/FCU-working</property></not>
|
||||
<property>/controls/switches/annun-test</property>
|
||||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
|
|
@ -3701,16 +3701,7 @@
|
|||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/electrical/bus/ac-1</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>systems/electrical/bus/ac-2</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
<property>/systems/electrical/light/rat-emer-gen-fault</property>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
|
|
|
@ -51,19 +51,21 @@ var warning = {
|
|||
if (me.active == 0) { return; }
|
||||
me.wasActive = 1;
|
||||
lineIndex = 0;
|
||||
while (lineIndex < 7 and lines[lineIndex].getValue() != "") {
|
||||
while (lineIndex <= 7 and lines[lineIndex].getValue() != "") {
|
||||
lineIndex = lineIndex + 1; # go to next line until empty line
|
||||
}
|
||||
|
||||
if (lineIndex == 7) {
|
||||
if (lineIndex == 8) {
|
||||
leftOverflow.setBoolValue(1);
|
||||
} elsif (leftOverflow.getBoolValue()) {
|
||||
leftOverflow.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (lines[lineIndex].getValue() == "" and me.msg != "" and lineIndex <= 7) { # at empty line. Also checks if message is not blank to allow for some warnings with no displayed msg, eg stall
|
||||
lines[lineIndex].setValue(me.msg);
|
||||
linesCol[lineIndex].setValue(me.colour);
|
||||
if (lineIndex <= 7) {
|
||||
if (lines[lineIndex].getValue() == "" and me.msg != "") { # at empty line. Also checks if message is not blank to allow for some warnings with no displayed msg, eg stall
|
||||
lines[lineIndex].setValue(me.msg);
|
||||
linesCol[lineIndex].setValue(me.colour);
|
||||
}
|
||||
}
|
||||
},
|
||||
warnlight: func() {
|
||||
|
@ -309,7 +311,7 @@ var ECAM_controller = {
|
|||
}
|
||||
}
|
||||
|
||||
if (statusFlag == 1) {
|
||||
if (statusFlag == 1 and lines[0].getValue() == "") {
|
||||
libraries.SystemDisplay.manCall("sts");
|
||||
statusFlag = 0;
|
||||
}
|
||||
|
|
|
@ -1058,6 +1058,19 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(acBusEssShedAtc);
|
||||
}
|
||||
|
||||
if ((athr_offw.clearFlag == 0) and athrWarn.getValue() == 2 and phaseVar != 4 and phaseVar != 8 and phaseVar != 10) {
|
||||
athr_offw.active = 1;
|
||||
athr_offw_1.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(athr_offw);
|
||||
ECAM_controller.warningReset(athr_offw_1);
|
||||
if (getprop("/it-autoflight/output/athr-warning") == 2) {
|
||||
setprop("/it-autoflight/output/athr-warning", 0);
|
||||
setprop("/ECAM/Lower/light/clr", 0);
|
||||
setprop("/ECAM/warnings/master-caution-light", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if ((athr_lock.clearFlag == 0) and phaseVar >= 5 and phaseVar <= 7 and getprop("/systems/thrust/thr-locked-alert") == 1) {
|
||||
if (getprop("/systems/thrust/thr-locked-flash") == 0) {
|
||||
athr_lock.msg = " ";
|
||||
|
@ -1071,18 +1084,6 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(athr_lock_1);
|
||||
}
|
||||
|
||||
if ((athr_offw.clearFlag == 0) and athrWarn.getValue() == 2 and phaseVar != 4 and phaseVar != 8 and phaseVar != 10) {
|
||||
athr_offw.active = 1;
|
||||
athr_offw_1.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(athr_offw);
|
||||
ECAM_controller.warningReset(athr_offw_1);
|
||||
if (getprop("/it-autoflight/output/athr-warning") == 2) {
|
||||
setprop("/it-autoflight/output/athr-warning", 0);
|
||||
setprop("/ECAM/Lower/light/clr", 0);
|
||||
setprop("/ECAM/warnings/master-caution-light", 0);
|
||||
}
|
||||
}
|
||||
|
||||
if ((athr_lim.clearFlag == 0) and getprop("/it-autoflight/output/athr") == 1 and ((getprop("/systems/thrust/eng-out") != 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN")) or (getprop("/systems/thrust/eng-out") == 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN" or (getprop("/systems/thrust/state1") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83) or (getprop("/systems/thrust/state2") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83)))) and (phaseVar >= 5 and phaseVar <= 7)) {
|
||||
athr_lim.active = 1;
|
||||
|
|
|
@ -122,14 +122,8 @@ var warnings = std.Vector.new([
|
|||
var rud_trim_config_1 = warning.new(msg: " NOT IN T.O. RANGE", colour: "r", aural: 0, light: 0),
|
||||
var park_brk_config = warning.new(msg: "CONFIG PARK BRK ON", colour: "r", aural: 0, light: 0),
|
||||
|
||||
# Autopilot
|
||||
# Autopilot off involuntary
|
||||
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0),
|
||||
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
|
||||
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
|
||||
var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
|
||||
var athr_lock_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
|
||||
var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
|
||||
var athr_lim_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
|
||||
|
||||
# Cargo smoke
|
||||
var cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
|
||||
|
@ -221,6 +215,14 @@ var warnings = std.Vector.new([
|
|||
var acBusEssShed = warning.new(msg: "ELEC DC ESS BUS SHED", colour: "a", aural: 1, light: 1),
|
||||
var acBusEssShedAtc = warning.new(msg: " -ATC..............SYS 2", colour: "c"),
|
||||
|
||||
# Autothrust
|
||||
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
|
||||
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
|
||||
var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
|
||||
var athr_lock_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
|
||||
var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
|
||||
var athr_lim_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
|
||||
|
||||
# TCAS FAULT
|
||||
var tcasFault = warning.new(msg: "NAV TCAS FAULT", colour: "a", aural: 1, light: 1),
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ var vertModeInput = props.globals.getNode("/it-autoflight/input/vert", 1);
|
|||
var vsModeInput = props.globals.getNode("/it-autoflight/input/vs", 1);
|
||||
var locArm = props.globals.getNode("/it-autoflight/output/loc-armed", 1);
|
||||
var apprArm = props.globals.getNode("/it-autoflight/output/appr-armed", 1);
|
||||
var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL");
|
||||
|
||||
var FCU = {
|
||||
elecSupply: "",
|
||||
|
@ -73,10 +74,12 @@ var FCUController = {
|
|||
me.FCU1.loop();
|
||||
me.FCU2.loop();
|
||||
|
||||
if (!me.FCU1.failed and !me.FCU2.failed) {
|
||||
if (!me.FCU1.failed or !me.FCU2.failed) {
|
||||
me.FCUworking = 1;
|
||||
FCUworkingNode.setValue(1);
|
||||
} else {
|
||||
me.FCUworking = 0;
|
||||
FCUworkingNode.setValue(0);
|
||||
}
|
||||
|
||||
notification = nil;
|
||||
|
|
|
@ -1452,7 +1452,7 @@
|
|||
|
||||
<switch name="/systems/electrical/light/rat-emer-gen-fault">
|
||||
<default value="0"/>
|
||||
<test value="1">
|
||||
<test logic="AND" value="1">
|
||||
/systems/electrical/relay/dc-ess-feed-tr/output eq 0
|
||||
/systems/electrical/bus/ac-1 eq 0
|
||||
/systems/electrical/bus/ac-2 eq 0
|
||||
|
|
Loading…
Reference in a new issue