1
0
Fork 0

Merge branch 'dev' into preflight

This commit is contained in:
Inuyaksa 2021-01-30 21:58:25 +01:00
commit 03a15d43c9
10 changed files with 592 additions and 184 deletions

View file

@ -397,13 +397,17 @@ var canvas_MCDU_base = {
var sign2 = degrees2 >= 0 ? "E" : "W";
return sprintf("%d %.1f%s/%03s %.1f%s",abs(degrees),minutes,sign,abs(degrees2),minutes2,sign2);
},
getIRSStatus: func(a) {
getIRSStatus: func(a,b = 0) {
var irsstatus = "INVAL";
if (systems.ADIRS.ADIRunits[a].operative) {
if (systems.ADIRS.Operating.aligned[a].getValue()) {
irsstatus = (systems.ADIRS.ADIRunits[a].mode == 2) ? "ATT" : "NAV";
} else {
irsstatus = "ALIGN TTN" ~ sprintf("% 2.0d",math.round(systems.ADIRS.ADIRunits[a]._alignTime) / 60);
if (b) {
irsstatus = "ALIGN TTN" ~ sprintf("% 2.0d",math.round(systems.ADIRS.ADIRunits[a]._alignTime) / 60);
} else {
irsstatus = "ALIGN";
}
}
}
return irsstatus;
@ -2465,7 +2469,7 @@ var canvas_MCDU_base = {
var rows = ["Simple_L2S","Simple_L3S","Simple_L4S"];
var center = ["Simple_C1","Simple_C2","Simple_C3"];
for (var a = 0; a<3; a+=1) {
me[rows[a]].setText(" " ~ me.getIRSStatus(a));
me[rows[a]].setText(" " ~ me.getIRSStatus(a,1));
if (systems.ADIRS.ADIRunits[a]._excessMotion) {
me[center[a]].show();
} else {

View file

@ -12,7 +12,6 @@ var leftOverflow = props.globals.initNode("/ECAM/warnings/overflow-left", 0, "B
var rightOverflow = props.globals.initNode("/ECAM/warnings/overflow-right", 0, "BOOL");
var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cchord", 0, "BOOL")];
@ -76,6 +75,18 @@ var warningNodes = {
greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"),
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"),
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"),
flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"),
slatsConfig: props.globals.initNode("/ECAM/warnings/fctl/slats-config-output"),
flapsConfig: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-output"),
spdBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-output"),
pitchTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-output"),
rudTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-output"),
parkBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/park-brk-config-output"),
slatsConfig2: props.globals.initNode("/ECAM/warnings/fctl/slats-config-range"),
flapsConfig2: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-range"),
spdBrkConfig2: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-range"),
pitchTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-range"),
rudTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-range"),
},
Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
@ -389,6 +400,7 @@ var ECAM_controller = {
m.active = 0;
}
}
me._ready = 1;
},
clear: func() {
hasCleared = 0;
@ -479,7 +491,7 @@ var ECAM_controller = {
};
setlistener("/systems/electrical/bus/dc-ess", func {
if (dc_ess.getValue() < 25) {
if (systems.ELEC.Bus.dcEss.getValue() < 25) {
ECAM_controller.reset();
}
}, 0, 0);

View file

@ -41,6 +41,8 @@ var bigThree = nil;
var altAlertSteady = 0;
var altAlertFlash = 0;
var ecamConfigTest = props.globals.initNode("/ECAM/to-config-test", 0, "BOOL");
var messages_priority_3 = func {
phaseVar3 = phaseNode.getValue();
@ -55,7 +57,7 @@ var messages_priority_3 = func {
}
# FCTL FLAPS NOT ZERO
if (flap_not_zero.clearFlag == 0 and phaseVar3 == 6 and pts.Controls.Flight.flapsInput.getValue() != 0 and pts.Instrumentation.Altimeter.indicatedFt.getValue() > 22000) {
if (flap_not_zero.clearFlag == 0 and warningNodes.Logic.flapNotZero.getBoolValue()) {
flap_not_zero.active = 1;
} else {
ECAM_controller.warningReset(flap_not_zero);
@ -95,7 +97,7 @@ var messages_priority_3 = func {
if (allEngFail.clearFlag == 0 and dualFailNode.getBoolValue()) {
allEngFail.active = 1;
if (allEngFailElec.clearFlag == 0 and getprop("/systems/electrical/relay/emer-glc/contact-pos") == 0) {
if (allEngFailElec.clearFlag == 0 and systems.ELEC.Source.EmerGen.relayPos.getValue() == 0) {
allEngFailElec.active = 1;
} else {
ECAM_controller.warningReset(allEngFailElec);
@ -136,7 +138,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(allEngFailAPU);
}
if (allEngFailLevers.clearFlag == 0 and (pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01 or pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01)) {
if (allEngFailLevers.clearFlag == 0 and (pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01 or pts.Controls.Engines.Engine.throttleLever[1].getValue() > 0.01)) {
allEngFailLevers.active = 1;
} else {
ECAM_controller.warningReset(allEngFailLevers);
@ -181,7 +183,7 @@ var messages_priority_3 = func {
}
# ENG ABV IDLE
if (eng1ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 1 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng1ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT
if (eng1ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 2 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng1ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT
eng1ThrLvrAbvIdle.active = 1;
if (eng1ThrLvrAbvIdle2.clearFlag == 0) {
eng1ThrLvrAbvIdle2.active = 1;
@ -193,7 +195,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1ThrLvrAbvIdle2);
}
if (eng2ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 1 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng2ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT
if (eng2ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 2 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng2ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT
eng2ThrLvrAbvIdle.active = 1;
if (eng2ThrLvrAbvIdle2.clearFlag == 0) {
eng2ThrLvrAbvIdle2.active = 1;
@ -206,19 +208,19 @@ var messages_priority_3 = func {
}
# ENG FIRE
if ((eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng1FireGnEvac.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
if ((eng1FireFlAgent2.clearFlag == 0 and systems.eng1FireWarn.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng1FireGnEvac.clearFlag == 0 and systems.eng1FireWarn.getValue() == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
eng1Fire.active = 1;
} else {
ECAM_controller.warningReset(eng1Fire);
}
if ((eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng2FireGnEvac.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
if ((eng2FireFlAgent2.clearFlag == 0 and systems.eng2FireWarn.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng2FireGnEvac.clearFlag == 0 and systems.eng2FireWarn.getValue() == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
eng2Fire.active = 1;
} else {
ECAM_controller.warningReset(eng2Fire);
}
if (apuFireMaster.clearFlag == 0 and getprop("/systems/fire/apu/warning-active")) {
if (apuFireMaster.clearFlag == 0 and systems.apuFireWarn.getValue() == 1) {
apuFire.active = 1;
} else {
ECAM_controller.warningReset(apuFire);
@ -238,23 +240,23 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1FireFlmaster);
}
if (eng1FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) {
if (eng1FireFlPB.clearFlag == 0 and systems.fireButtons[0].getValue() == 0) {
eng1FireFlPB.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlPB);
}
if (getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) {
eng1FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine1/agent1-timer") ~ " S...DISCH";
if (systems.eng1AgentTimer.getValue() != 0 and systems.eng1AgentTimer.getValue() != 99) {
eng1FireFlAgent1Timer.msg = " -AGENT AFT " ~ systems.eng1AgentTimer.getValue() ~ " S...DISCH";
}
if (eng1FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 1 and !getprop("/systems/fire/engine1/disch1") and getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) {
if (eng1FireFlAgent1.clearFlag == 0 and systems.fireButtons[0].getValue() == 1 and !systems.extinguisherBottles.vector[0].lightProp.getValue() and systems.eng1AgentTimer.getValue() != 0 and systems.eng1AgentTimer.getValue() != 99) {
eng1FireFlAgent1Timer.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent1Timer);
}
if (eng1FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1") and (getprop("/systems/fire/engine1/agent1-timer") == 0 or getprop("/systems/fire/engine1/agent1-timer") == 99)) {
if (eng1FireFlAgent1.clearFlag == 0 and !systems.extinguisherBottles.vector[0].lightProp.getValue() and (systems.eng1AgentTimer.getValue() == 0 or systems.eng1AgentTimer.getValue() == 99)) {
eng1FireFlAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent1);
@ -266,17 +268,17 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1FireFlATC);
}
if (getprop("/systems/fire/engine1/agent2-timer") != 0 and getprop("/systems/fire/engine1/agent2-timer") != 99) {
eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine1/agent2-timer") ~ " S:";
if (systems.eng1Agent2Timer.getValue() != 0 and systems.eng1Agent2Timer.getValue() != 99) {
eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ systems.eng1Agent2Timer.getValue() ~ " S:";
}
if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2") and getprop("/systems/fire/engine1/agent2-timer") > 0) {
if (eng1FireFlAgent2.clearFlag == 0 and systems.extinguisherBottles.vector[0].lightProp.getValue() and !systems.extinguisherBottles.vector[1].lightProp.getValue() and systems.eng1Agent2Timer.getValue() > 0) {
eng1FireFl30Sec.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFl30Sec);
}
if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2")) {
if (eng1FireFlAgent2.clearFlag == 0 and systems.extinguisherBottles.vector[0].lightProp.getValue() and !systems.extinguisherBottles.vector[1].lightProp.getValue()) {
eng1FireFlAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent2);
@ -324,19 +326,19 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1FireGnmaster);
}
if (eng1FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) {
if (eng1FireGnPB.clearFlag == 0 and systems.fireButtons[0].getValue() == 0) {
eng1FireGnPB.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnPB);
}
if (eng1FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1")) {
if (eng1FireGnAgent1.clearFlag == 0 and !systems.extinguisherBottles.vector[0].lightProp.getValue()) {
eng1FireGnAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnAgent1);
}
if (eng1FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine1/disch2")) {
if (eng1FireGnAgent2.clearFlag == 0 and !systems.extinguisherBottles.vector[1].lightProp.getValue()) {
eng1FireGnAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnAgent2);
@ -393,23 +395,23 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng2FireFlmaster);
}
if (eng2FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) {
if (eng2FireFlPB.clearFlag == 0 and systems.fireButtons[1].getValue() == 0) {
eng2FireFlPB.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlPB);
}
if (getprop("/systems/fire/engine2/agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) {
eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine2/agent1-timer") ~ " S...DISCH";
if (systems.eng2AgentTimer.getValue() != 0 and systems.eng2AgentTimer.getValue() != 99) {
eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ systems.eng2AgentTimer.getValue() ~ " S...DISCH";
}
if (eng2FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 1 and !getprop("/systems/fire/engine2/disch1") and getprop("/systems/fire/engine2agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) {
if (eng2FireFlAgent1.clearFlag == 0 and systems.fireButtons[1].getValue() == 1 and !systems.extinguisherBottles.vector[2].lightProp.getValue() and getprop("/systems/fire/engine2agent1-timer") != 0 and systems.eng2AgentTimer.getValue() != 99) {
eng2FireFlAgent1Timer.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent1Timer);
}
if (eng2FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1") and (getprop("/systems/fire/engine2/agent1-timer") == 0 or getprop("/systems/fire/engine2/agent1-timer") == 99)) {
if (eng2FireFlAgent1.clearFlag == 0 and !systems.extinguisherBottles.vector[2].lightProp.getValue() and (systems.eng2AgentTimer.getValue() == 0 or systems.eng2AgentTimer.getValue() == 99)) {
eng2FireFlAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent1);
@ -421,17 +423,17 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng2FireFlATC);
}
if (getprop("/systems/fire/engine2/agent2-timer") != 0 and getprop("/systems/fire/engine2/agent2-timer") != 99) {
eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine2/agent2-timer") ~ " S:";
if (systems.eng2Agent2Timer.getValue() != 0 and systems.eng2Agent2Timer.getValue() != 99) {
eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ systems.eng2Agent2Timer.getValue() ~ " S:";
}
if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2") and getprop("/systems/fire/engine2/agent2-timer") > 0) {
if (eng2FireFlAgent2.clearFlag == 0 and systems.extinguisherBottles.vector[2].lightProp.getValue() and !systems.extinguisherBottles.vector[4].lightProp.getValue() and systems.eng2Agent2Timer.getValue() > 0) {
eng2FireFl30Sec.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFl30Sec);
}
if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2")) {
if (eng2FireFlAgent2.clearFlag == 0 and systems.extinguisherBottles.vector[2].lightProp.getValue() and !systems.extinguisherBottles.vector[4].lightProp.getValue()) {
eng2FireFlAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent2);
@ -479,19 +481,19 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng2FireGnmaster);
}
if (eng2FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) {
if (eng2FireGnPB.clearFlag == 0 and systems.fireButtons[1].getValue() == 0) {
eng2FireGnPB.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnPB);
}
if (eng2FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1")) {
if (eng2FireGnAgent1.clearFlag == 0 and !systems.extinguisherBottles.vector[2].lightProp.getValue()) {
eng2FireGnAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnAgent1);
}
if (eng2FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine2/disch2")) {
if (eng2FireGnAgent2.clearFlag == 0 and !systems.extinguisherBottles.vector[4].lightProp.getValue()) {
eng2FireGnAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnAgent2);
@ -542,17 +544,17 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(apuFirePB);
}
if (getprop("/systems/fire/apu/agent-timer") != 0 and getprop("/systems/fire/apu/agent-timer") != 99) {
apuFireAgentTimer.msg = " -AGENT AFT " ~ getprop("/systems/fire/apu/agent-timer") ~ " S...DISCH";
if (systems.apuAgentTimer.getValue() != 0 and systems.apuAgentTimer.getValue() != 99) {
apuFireAgentTimer.msg = " -AGENT AFT " ~ systems.apuAgentTimer.getValue() ~ " S...DISCH";
}
if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") != 0) {
if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !systems.extinguisherBottles.vector[5].lightProp.getValue() and systems.apuAgentTimer.getValue() != 0) {
apuFireAgentTimer.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgentTimer);
}
if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") == 0) {
if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !systems.extinguisherBottles.vector[5].lightProp.getValue() and systems.apuAgentTimer.getValue() == 0) {
apuFireAgent.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgent);
@ -570,35 +572,29 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(apuFireMaster);
}
if ((getprop("/ECAM/to-config-test") and (phaseVar3 == 1 or phaseVar3 == 2 or phaseVar3 == 9)) or phaseVar3 == 3 or phaseVar3 == 4) {
if ((ecamConfigTest.getValue() and (phaseVar3 == 1 or phaseVar3 == 2 or phaseVar3 == 9)) or phaseVar3 == 3 or phaseVar3 == 4) {
takeoffConfig = 1;
} else {
takeoffConfig = 0;
}
if ((pts.Controls.Flight.flapsInput.getValue() == 0 or pts.Controls.Flight.flapsInput.getValue() == 4) and takeoffConfig) {
if (slats_config.clearFlag == 0) {
slats_config.active = 1;
slats_config_1.active = 1;
} else {
ECAM_controller.warningReset(slats_config);
ECAM_controller.warningReset(slats_config_1);
}
if (flaps_config.clearFlag == 0) {
flaps_config.active = 1;
flaps_config_1.active = 1;
} else {
ECAM_controller.warningReset(flaps_config);
ECAM_controller.warningReset(flaps_config_1);
}
if (slats_config.clearFlag == 0 and (warningNodes.Logic.slatsConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.slatsConfig2.getBoolValue()))) {
slats_config.active = 1;
slats_config_1.active = 1;
} else {
ECAM_controller.warningReset(slats_config);
ECAM_controller.warningReset(slats_config_1);
}
if (flaps_config.clearFlag == 0 and (warningNodes.Logic.flapsConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.flapsConfig2.getBoolValue()))) {
flaps_config.active = 1;
flaps_config_1.active = 1;
} else {
ECAM_controller.warningReset(flaps_config);
ECAM_controller.warningReset(flaps_config_1);
}
if ((spd_brk_config.clearFlag == 0) and pts.Controls.Flight.speedbrake.getValue() != 0 and takeoffConfig) {
if (spd_brk_config.clearFlag == 0 and (warningNodes.Logic.spdBrkConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.spdBrkConfig2.getBoolValue()))) {
spd_brk_config.active = 1;
spd_brk_config_1.active = 1;
} else {
@ -606,7 +602,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(spd_brk_config_1);
}
if ((pitch_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 2.6 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -2.6) and takeoffConfig) {
if (pitch_trim_config.clearFlag == 0 and (warningNodes.Logic.pitchTrimConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.pitchTrimConfig2.getBoolValue()))) {
pitch_trim_config.active = 1;
pitch_trim_config_1.active = 1;
} else {
@ -614,7 +610,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(pitch_trim_config_1);
}
if ((rud_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.6 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.6) and takeoffConfig) {
if (rud_trim_config.clearFlag == 0 and (warningNodes.Logic.rudTrimConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.rudTrimConfig2.getBoolValue()))) {
rud_trim_config.active = 1;
rud_trim_config_1.active = 1;
} else {
@ -622,7 +618,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(rud_trim_config_1);
}
if ((park_brk_config.clearFlag == 0) and warningNodes.Flipflops.parkBrk.getValue() and phaseVar3 >= 2 and phaseVar3 <= 3) {
if (park_brk_config.clearFlag == 0 and warningNodes.Logic.parkBrkConfig.getValue() and phaseVar3 >= 2 and phaseVar3 <= 3) {
park_brk_config.active = 1;
} else {
ECAM_controller.warningReset(park_brk_config);
@ -815,7 +811,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigGen3);
}
if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 0 and emerconfigManOn.clearFlag == 0) {
if (systems.ELEC.Source.EmerGen.relayPos.getValue() == 0 and emerconfigManOn.clearFlag == 0) {
emerconfigManOn.active = 1;
} else {
ECAM_controller.warningReset(emerconfigManOn);
@ -1182,7 +1178,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBusBatFault);
}
if (!(systems.ELEC.EmerElec.getValue() and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) {
if (!(systems.ELEC.EmerElec.getValue() and !systems.ELEC.Source.EmerGen.relayPos.getValue()) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) {
dcBusEssShed.active = 1;
dcBusEssShedExtract.active = 1;
dcBusEssShedIcing.active = 1;
@ -1192,7 +1188,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBusEssShedIcing);
}
if (!(systems.ELEC.EmerElec.getValue() and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) {
if (!(systems.ELEC.EmerElec.getValue() and !systems.ELEC.Source.EmerGen.relayPos.getValue()) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) {
acBusEssShed.active = 1;
if (!systems.ELEC.EmerElec.getValue()) {
acBusEssShedAtc.active = 1;
@ -1657,32 +1653,29 @@ var messages_priority_2 = func {
# Crossbleed
if (xBleedFault.clearFlag == 0 and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6) and warningNodes.Logic.crossbleedFault.getValue()) {
xBleedFault.active = 1;
} else {
ECAM_controller.warningReset(xBleedFault);
}
if (xBleedFault.active) {
if (systems.PNEU.Switch.xbleed.getValue() == 1) {
if (xBleedFaultMan.clearFlag == 0 and systems.PNEU.Switch.xbleed.getValue() == 1) {
xBleedFaultMan.active = 1;
} else {
ECAM_controller.warningReset(xBleedFaultMan);
}
if (warningNodes.Logic.crossbleedWai.getValue()) {
if (getprop("/controls/ice-protection/wing")) {
xBleedOff.active = 1;
} else {
ECAM_controller.warningReset(xBleedOff);
}
xBleedIcing.active = 1;
if (xBleedFaultWAI.clearFlag == 0 and wing_pb.getValue() and warningNodes.Logic.crossbleedWai.getValue()) {
xBleedFaultWAI.active = 1;
} else {
ECAM_controller.warningReset(xBleedOff);
ECAM_controller.warningReset(xBleedIcing);
ECAM_controller.warningReset(xBleedFaultWAI);
}
if (xBleedFaultICE.clearFlag == 0 and warningNodes.Logic.crossbleedWai.getValue()) {
xBleedFaultICE.active = 1;
} else {
ECAM_controller.warningReset(xBleedFaultICE);
}
} else {
ECAM_controller.warningReset(xBleedFault);
ECAM_controller.warningReset(xBleedFaultMan);
ECAM_controller.warningReset(xBleedOff);
ECAM_controller.warningReset(xBleedIcing);
ECAM_controller.warningReset(xBleedFaultWAI);
ECAM_controller.warningReset(xBleedFaultICE);
}
if (bleed1Off.clearFlag == 0 and (warningNodes.Timers.bleed1Off60Output.getValue() == 1 or warningNodes.Timers.bleed1Off5Output.getValue() == 1) and FWC.Timer.eng1idleOutput.getBoolValue() and (phaseVar2 == 2 or phaseVar2 == 6)) {
@ -2276,7 +2269,7 @@ var messages_config_memo = func {
setprop("/ECAM/to-config-normal", 1);
}
if (getprop("/ECAM/to-config-test") and (phaseVarMemo == 1 or phaseVarMemo == 2 or phaseVarMemo == 9)) {
if (ecamConfigTest.getValue() and (phaseVarMemo == 1 or phaseVarMemo == 2 or phaseVarMemo == 9)) {
setprop("/ECAM/to-config-set", 1);
} else {
setprop("/ECAM/to-config-set", 0);
@ -2328,7 +2321,7 @@ var messages_config_memo = func {
toMemoLine5.colour = "c";
}
if (getprop("/ECAM/to-config-test") and (phaseVarMemo == 2 or phaseVarMemo == 9)) {
if (ecamConfigTest.getValue() and (phaseVarMemo == 2 or phaseVarMemo == 9)) {
setprop("/ECAM/to-memo-set", 1);
} else {
setprop("/ECAM/to-memo-set", 0);
@ -2617,7 +2610,7 @@ var messages_right_memo = func {
rat.colour = "g";
}
if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 1 and getprop("/systems/hydraulic/sources/rat/position") != 0 and !pts.Gear.wow[1].getValue()) {
if (systems.ELEC.Source.EmerGen.relayPos.getValue() == 1 and getprop("/systems/hydraulic/sources/rat/position") != 0 and !pts.Gear.wow[1].getValue()) {
emer_gen.active = 1;
} else {
emer_gen.active = 0;

View file

@ -85,6 +85,20 @@ var warnings = std.Vector.new([
var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
var eng2FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"),
# ADR 1 + 2 + 3 FAULT
var ADR123Fault = warning.new(msg: "NAV ADR1+2+3 FAULT ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var ADR123FaultAP = warning.new(msg: " -AP+FD..............OFF", colour: "c"),
var ADR123FaultATHR = warning.new(msg: " -ATHR...............OFF", colour: "c"),
var ADR123FaultPRBW = warning.new(msg: " -PROBE/WINDOW HEAT...ON", colour: "c"),
var ADR123FaultBUSSC = warning.new(msg: " -CAPT BKUP SPD/ALT...ON", colour: "c"),
var ADR123FaultBUSSF = warning.new(msg: " -FO BKUP SPD/ALT.....ON", colour: "c"),
var ADR123FaultADRPB = warning.new(msg: " -ADR 1+2+3 P/B......OFF", colour: "c"),
var ADR123FaultSPD = warning.new(msg: " -SPD......FLY THE GREEN", colour: "c"),
var ADR123FaultAOADISAG = warning.new(msg: " •IF AOA DISAGREE: ", colour: "w", isMainMsg: 1),
var ADR123FaultBUSSINOP = warning.new(msg: " BKUP SPD/ALT.DO NOT USE", colour: "c"),
var ADR123FaultSTBY = warning.new(msg: " -STBY INST.MAY BE UNREL", colour: "c"),
var ADR123FaultPROC = warning.new(msg: " -ALL ADR OFF PROC.APPLY", colour: "c"),
# APU FIRE
var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apu"),
var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"),
@ -105,6 +119,37 @@ 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),
# EXCESS CAB ALT
var excessCabAlt = warning.new(msg: "CAB PR EXCESS CAB ALT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var excessCabAltMask = warning.new(msg: " -CREW OXY MASKS.....USE", colour: "c"),
var excessCabAltSigns = warning.new(msg: " -SIGNS...............ON", colour: "c"),
var excessCabAltEmerD = warning.new(msg: " •EMER DESCENT:", colour: "w", isMainMsg: 1),
var excessCabAltDES = warning.new(msg: " -DESCENT.......INITIATE", colour: "c"),
var excessCabAltTHRLVR = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var excessCabAltSPDBRK = warning.new(msg: " -SPD BRK...........FULL", colour: "c"),
var excessCabAltSPD = warning.new(msg: " SPD.....MAX/APPROPRIATE", colour: "c"),
var excessCabAltENG = warning.new(msg: " -ENG MODE...........IGN", colour: "c"),
var excessCabAltCAB = warning.new(msg: " -CABIN CREW......ADVISE", colour: "c"),
var excessCabAltPA = warning.new(msg: " -EMER DES (PA).ANNOUNCE", colour: "c"),
var excessCabAltXPDR = warning.new(msg: " -XPDR 7700.....CONSIDER", colour: "c"),
var excessCabAltMEA = warning.new(msg: " MAX FL.....100/MEA-MORA", colour: "c"),
var excessCabAltCabAlt = warning.new(msg: " •IF CAB ALT>14000 FT:", colour: "w", isMainMsg: 1),
var excessCabAltMasks = warning.new(msg: " -PAX OXY MASKS...MAN ON", colour: "c"),
# ENG 1 OIL LO PR
var eng1OilLoPr = warning.new(msg: "ENG 1 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var eng1OilLoPrIf = warning.new(msg: " •IF OIL PR < 13 PSI :", colour: "w", isMainMsg: 1),
var eng1OilLoPrIf2 = warning.new(msg: " •IF OIL PR < 60 PSI :", colour: "w", isMainMsg: 1),
var eng1OilLoPrThrot = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"),
var eng1OilLoPrMaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
# ENG 2 OIL LO PR
var eng2OilLoPr = warning.new(msg: "ENG 2 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var eng2OilLoPrIf = warning.new(msg: " •IF OIL PR < 13 PSI :", colour: "w", isMainMsg: 1),
var eng2OilLoPrIf2 = warning.new(msg: " •IF OIL PR < 60 PSI :", colour: "w", isMainMsg: 1),
var eng2OilLoPrThrot = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"),
var eng2OilLoPrMaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
# FCTL L+R ELEV FAULT
var lrElevFault = warning.new(msg: "F/CTL L+R ELEV FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var lrElevFaultSpeed = warning.new(msg: " MAX SPEED.......320/.77", colour: "c"),
@ -362,8 +407,8 @@ var warnings = std.Vector.new([
var hpValve2Fault = warning.new(msg: "AIR ENG 2 HP VALVE FAULT", colour: "a"),
var xBleedFault = warning.new(msg: "AIR X BLEED FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var xBleedFaultMan = warning.new(msg: " -X BLEED........MAN CTL", colour: "c"),
var xBleedOff = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"),
var xBleedIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"),
var xBleedFaultWAI = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"),
var xBleedFaultICE = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"),
var bleed1Off = warning.new(msg: "AIR BLEED 1 OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var bleed2Off = warning.new(msg: "AIR BLEED 2 OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var engBleedLowTemp = warning.new(msg: "AIR ENG 1+2 BLEED LO TEMP", colour: "a", aural: 1, light: 1, isMainMsg: 1),

View file

@ -121,6 +121,7 @@ var ELEC = {
volts: props.globals.getNode("/systems/electrical/sources/emer-gen/output-volt"),
hertz: props.globals.getNode("/systems/electrical/sources/emer-gen/output-hertz"),
voltsRelay: props.globals.getNode("/systems/electrical/relay/emer-glc/output"),
relayPos: props.globals.getNode("/systems/electrical/relay/emer-glc/contact-pos"),
},
Ext: {
volts: props.globals.getNode("/systems/electrical/sources/ext/output-volt"),

View file

@ -33,6 +33,8 @@ var eng1Agent2TimerTime = props.globals.initNode("/systems/fire/engine1/agent2-t
var eng2Agent2TimerTime = props.globals.initNode("/systems/fire/engine2/agent2-timer-time", 0, "INT");
var apuAgentTimerTime = props.globals.initNode("/systems/fire/apu/agent-timer-time", 0, "INT");
var fireButtons = [props.globals.getNode("/controls/engines/engine[0]/fire-btn"),props.globals.getNode("/controls/engines/engine[1]/fire-btn"),props.globals.getNode("/controls/apu/fire-btn")];
var fire_init = func {
setprop("/controls/OH/protectors/fwddisch", 0);
setprop("/controls/OH/protectors/aftdisch", 0);
@ -544,7 +546,7 @@ var createCargoFireBottleListener = func(prop, index) {
# Listeners
setlistener("/controls/engines/engine[0]/fire-btn", func() {
if (getprop("/controls/engines/engine[0]/fire-btn") == 1) {
if (systems.fireButtons[0].getValue() == 1) {
ecam.shutUpYou();
eng1AgentTimerMakeTimer.stop();
eng1AgentTimer.setValue(10);
@ -587,7 +589,7 @@ eng1Agent2TimerMakeTimerFunc = func() {
}
setlistener("/controls/engines/engine[1]/fire-btn", func() {
if (getprop("/controls/engines/engine[1]/fire-btn") == 1) {
if (systems.fireButtons[1].getValue() == 1) {
ecam.shutUpYou();
eng2AgentTimerMakeTimer.stop();
eng2AgentTimer.setValue(10);

View file

@ -229,6 +229,14 @@
</test>
</test>
</switch>
<switch name="/ECAM/phases/monostable/phase-8">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 8
</test>
</switch>
</channel>
</system>

View file

@ -62,6 +62,19 @@
<rate_limit sense="incr">0.1</rate_limit> <!-- 10 seconds -->
</actuator>
<actuator name="/ECAM/warnings/timer/xbleed-fault-output-10"> <!-- 10 second delay on fall -->
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/crossbleed-fault-timer-was-one</input>
<rate_limit sense="decr">0.1</rate_limit> <!-- 10 seconds -->
<rate_limit sense="incr">120</rate_limit> <!-- Instant -->
</actuator>
<actuator name="/ECAM/warnings/timer/xbleed-fault-eng-fire">
<description>Timer for the ECAM system</description>
<input>/controls/engines/engine[0]/fire-btn</input>
<rate_limit>0.06666666666</rate_limit>
</actuator>
<actuator name="/ECAM/warnings/timer/prv-1-not-shut-apu-output">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/prv-1-not-shut-apu</input>
@ -474,13 +487,27 @@
</test>
</switch>
<switch name="/ECAM/warnings/logic/crossbleed-fault-timer-was-one">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/timer/xbleed-fault-output eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/crossbleed-fault">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/timer/xbleed-fault-output eq 1
<test logic="AND">
/ECAM/warnings/timer/xbleed-fault-output-10 eq 1
/ECAM/warnings/timer/xbleed-fault-output-15 eq 0
<test logic="AND">
/ECAM/warnings/timer/xbleed-fault-output eq 0
/ECAM/warnings/timer/xbleed-fault-output-10 ne 0
</test>
<test logic="OR">
/ECAM/warnings/timer/xbleed-fault-eng-fire eq 0
/ECAM/warnings/timer/xbleed-fault-eng-fire eq 1
</test>
</test>
</test>
</switch>
@ -1660,27 +1687,33 @@
</channel>
<channel name="STALL" execrate="16">
<switch name="/ECAM/warnings/logic/stall/phase-4">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 4
</test>
</switch>
<switch name="/ECAM/warnings/logic/stall/phase-flipflop-set">
<default value="0"/>
<test logic="OR" value="1">
<test logic="AND">
/ECAM/warnings/logic/stall/phase-8-output eq 0
<test logic="AND">
/ECAM/warnings/logic/stall/phase-8-output eq 0
/ECAM/phases/monostable/phase-8 eq 0
</test>
/ECAM/warning-phase eq 7
</test>
<test logic="AND">
/ECAM/warnings/logic/stall/phase-4-output eq 0
<test logic="AND">
/ECAM/warnings/logic/stall/phase-4-output eq 0
/ECAM/warnings/logic/stall/phase-4 eq 0
</test>
/ECAM/warning-phase eq 5
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/stall/phase-4">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 4
</test>
</switch>
<switch name="/ECAM/warnings/logic/stall/phase-5">
<default value="0"/>
@ -1688,18 +1721,14 @@
/ECAM/warning-phase eq 5
</test>
</switch>
<switch name="/ECAM/warnings/logic/stall/phase-8">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 8
</test>
</switch>
<switch name="/ECAM/warnings/logic/stall/phase-flipflop-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/logic/stall/phase-5-output eq 0
<test logic="AND">
/ECAM/warnings/logic/stall/phase-5-output eq 0
/ECAM/warnings/logic/stall/phase-5 eq 0
</test>
/ECAM/warning-phase eq 6
</test>
</switch>
@ -1709,37 +1738,90 @@
<test logic="AND" value="1">
/instrumentation/radar-altimeter[0]/radar-altitude-ft lt 1500
/instrumentation/radar-altimeter[1]/radar-altitude-ft lt 1500
/it-fbw/law ne 0
/it-fbw/law eq 0
/ECAM/warnings/logic/stall/phase-flipflop eq 1
</test>
</switch>
<actuator name="/ECAM/phases/timer/eng1idle-output">
<description>Timer for the ECAM system</description>
<input>/ECAM/phases/timer/eng1idle</input>
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.033</rate_limit> <!-- 30 seconds -->
</actuator>
<switch name="/ECAM/warnings/logic/stall/stall-warn">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
<test logic="AND">
/it-fbw/law eq 0
/fdm/jsbsim/fcs/slat-pos-deg lt 15
<test logic="OR">
/systems/navigation/adr/output/aoa-1 ge 15
/systems/navigation/adr/output/aoa-2 ge 15
/systems/navigation/adr/output/aoa-3 ge 15
<test logic="AND">
/systems/navigation/adr/output/aoa-1 ge 13.5
/systems/navigation/adr/operating-1 eq 1
</test>
<test logic="AND">
/systems/navigation/adr/output/aoa-2 ge 13.5
/systems/navigation/adr/operating-2 eq 1
</test>
<test logic="AND">
/systems/navigation/adr/output/aoa-3 ge 13.5
/systems/navigation/adr/operating-3 eq 1
</test>
</test>
</test>
<test logic="AND">
/it-fbw/law eq 0
/fdm/jsbsim/fcs/slat-pos-deg ge 15
<test logic="OR">
/systems/navigation/adr/output/aoa-1 ge 23
/systems/navigation/adr/output/aoa-2 ge 23
/systems/navigation/adr/output/aoa-3 ge 23
<test logic="AND">
/systems/navigation/adr/output/aoa-1 ge 22
/systems/navigation/adr/operating-1 eq 1
</test>
<test logic="AND">
/systems/navigation/adr/output/aoa-2 ge 22
/systems/navigation/adr/operating-2 eq 1
</test>
<test logic="AND">
/systems/navigation/adr/output/aoa-3 ge 22
/systems/navigation/adr/operating-3 eq 1
</test>
</test>
<test logic="AND">
/it-fbw/law ne 0
/fdm/jsbsim/fcs/slat-pos-deg lt 15
<test logic="OR">
<test logic="AND">
/systems/navigation/adr/output/aoa-1 ge 8
/systems/navigation/adr/operating-1 eq 1
</test>
<test logic="AND">
/systems/navigation/adr/output/aoa-2 ge 8
/systems/navigation/adr/operating-2 eq 1
</test>
<test logic="AND">
/systems/navigation/adr/output/aoa-3 ge 8
/systems/navigation/adr/operating-3 eq 1
</test>
</test>
</test>
<test logic="AND">
/it-fbw/law ne 0
/fdm/jsbsim/fcs/slat-pos-deg ge 15
<test logic="AND">
/systems/navigation/adr/output/aoa-1 ge 14
/systems/navigation/adr/operating-1 eq 1
</test>
<test logic="AND">
/systems/navigation/adr/output/aoa-2 ge 14
/systems/navigation/adr/operating-2 eq 1
</test>
<test logic="AND">
/systems/navigation/adr/output/aoa-3 ge 14
/systems/navigation/adr/operating-3 eq 1
</test>
</test>
</test>
/it-fbw/law ne 0
<test logic="OR">
/systems/navigation/adr/operating-1 eq 1
/systems/navigation/adr/operating-2 eq 1
/systems/navigation/adr/operating-3 eq 1
</test>
</test>
</switch>
@ -1778,11 +1860,18 @@
<switch name="/ECAM/warnings/logic/eng/ground-retard">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/timer/ground-calc eq 0
/ECAM/warning-phase eq 6
/ECAM/warning-phase eq 7
/ECAM/timer/ground-calc eq 1
/ECAM/warnings/logic/eng/ground-spoilers-output eq 1
/ECAM/phases/monostable/phase-8-output eq 1
<test logic="AND">
<test logic="OR">
/ECAM/warning-phase eq 6
/ECAM/warning-phase eq 7
</test>
<test logic="AND">
/ECAM/phases/monostable/phase-8 eq 0
/ECAM/phases/monostable/phase-8-output eq 0
</test>
</test>
</test>
</switch>
@ -1897,12 +1986,15 @@
<test logic="AND" value="1">
/ECAM/warnings/logic/eng/eng-1-tla-abv-6-output eq 1
/engines/engine[0]/state eq 3
/engines/engine[1]/state eq 3
<test logic="OR">
/ECAM/warnings/logic/eng/eng-2-reverse-output eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/eng-2-reverse eq 1
/ECAM/warnings/logic/eng/eng-1-retard-case-2-fall-output eq 0
<test logic="AND">
/engines/engine[1]/state eq 3
<test logic="OR">
<test logic="AND">
/ECAM/warnings/logic/eng/eng-2-reverse eq 1
/ECAM/warnings/logic/eng/eng-1-retard-case-2 eq 0
/ECAM/warnings/logic/eng/eng-1-retard-case-2-fall-output eq 0
</test>
/ECAM/warnings/logic/eng/eng-2-reverse-output eq 1
</test>
</test>
</test>
@ -1913,12 +2005,15 @@
<test logic="AND" value="1">
/ECAM/warnings/logic/eng/eng-1-tla-abv-6-2-output eq 1
/engines/engine[0]/state eq 3
/engines/engine[1]/state eq 3
<test logic="OR">
/ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/eng-2-reverse-fall eq 0
/ECAM/warnings/logic/eng/eng-2-tla-idle eq 1
<test logic="AND">
/engines/engine[1]/state eq 3
<test logic="OR">
/ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/eng-2-reverse-fall eq 0
/ECAM/warnings/logic/eng/eng-2-reverse eq 0
/ECAM/warnings/logic/eng/eng-2-tla-idle eq 1
</test>
</test>
</test>
</test>
@ -1927,14 +2022,17 @@
<switch name="/ECAM/warnings/logic/eng/eng-2-retard-case-1">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1
/engines/engine[0]/state eq 3
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1
/engines/engine[1]/state eq 3
<test logic="OR">
/ECAM/warnings/logic/eng/eng-1-reverse-output eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/eng-1-reverse eq 1
/ECAM/warnings/logic/eng/eng-2-retard-case-2-fall-output eq 0
<test logic="AND">
/engines/engine[0]/state eq 3
<test logic="OR">
<test logic="AND">
/ECAM/warnings/logic/eng/eng-1-reverse eq 1
/ECAM/warnings/logic/eng/eng-2-retard-case-2 eq 0
/ECAM/warnings/logic/eng/eng-2-retard-case-2-fall-output eq 0
</test>
/ECAM/warnings/logic/eng/eng-1-reverse-output eq 1
</test>
</test>
</test>
@ -1943,14 +2041,17 @@
<switch name="/ECAM/warnings/logic/eng/eng-2-retard-case-2">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1
/engines/engine[0]/state eq 3
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1
/engines/engine[1]/state eq 3
<test logic="OR">
/ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/eng-1-reverse-fall eq 0
/ECAM/warnings/logic/eng/eng-1-tla-idle eq 1
<test logic="AND">
/engines/engine[0]/state eq 3
<test logic="OR">
/ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/eng-1-reverse-fall eq 0
/ECAM/warnings/logic/eng/eng-1-reverse eq 0
/ECAM/warnings/logic/eng/eng-1-tla-idle eq 1
</test>
</test>
</test>
</test>
@ -2275,6 +2376,170 @@
/gear/gear[2]/position-norm eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/flaps-not-zero">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warning-phase eq 6
/controls/flight/flaps-input ne 0
<test logic="OR">
/systems/navigation/adr/computation/baro-alt-corrected-1-capt ge 22000
/systems/navigation/adr/computation/baro-alt-corrected-2-capt ge 22000
/systems/navigation/adr/computation/baro-alt-corrected-3-capt ge 22000
</test>
</test>
</switch>
<switch name="/ECAM/warnings/fctl/flaps-config-range">
<default value="0"/>
<test logic="OR" value="1">
fcs/flap-pos-deg lt 2
fcs/flap-pos-deg ge 24
</test>
</switch>
<switch name="/ECAM/warnings/fctl/flaps-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/flaps-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/flaps-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/flaps-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/slats-config-range">
<default value="0"/>
<test logic="OR" value="1">
fcs/slat-pos-deg lt 17
fcs/slat-pos-deg ge 25
</test>
</switch>
<switch name="/ECAM/warnings/fctl/slats-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/slats-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/slats-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/slats-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/spd-brk-config-range">
<default value="0"/>
<test logic="OR" value="1">
/controls/flight/speedbrake gt 0.0
</test>
</switch>
<switch name="/ECAM/warnings/fctl/spd-brk-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/spd-brk-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/spd-brk-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/spd-brk-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/pitch-trim-config-range">
<default value="0"/>
<test logic="OR" value="1">
hydraulics/elevator-trim/final-deg gt 2.9
hydraulics/elevator-trim/final-deg lt -2.9
</test>
</switch>
<switch name="/ECAM/warnings/fctl/pitch-trim-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/pitch-trim-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/pitch-trim-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/pitch-trim-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/rudder-trim-config-range">
<default value="0"/>
<test logic="OR" value="1">
hydraulics/rudder/trim-deg gt 3.6
hydraulics/rudder/trim-deg lt -3.6
</test>
</switch>
<switch name="/ECAM/warnings/fctl/rudder-trim-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/rudder-trim-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/rudder-trim-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/rudder-trim-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/park-brk-config-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warning-phase eq 3
/controls/gear/brake-parking eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/park-brk-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/controls/gear/brake-parking eq 0
</test>
</switch>
</channel>
<channel name="Hydraulic" execrate="16">
@ -2666,4 +2931,21 @@
</channel>
<!--<channel name="NAV" execrate="16">
<switch name="/ECAM/warnings/navigation/ADR123-fault">
<default value="0"/>
<test logic="AND" value="1">
/systems/electrical/bus/ac-1 ge 110
/systems/electrical/bus/ac-2 ge 110
/systems/electrical/bus/ac-ess ge 110
/ECAM/warning-phase ne 1
/ECAM/warning-phase ne 4
/ECAM/warning-phase ne 8
/ECAM/warning-phase ne 10
</test>
</switch>
</channel>-->
</system>

View file

@ -1183,28 +1183,47 @@
<rate_limit sense="decr">120</rate_limit>
</actuator>
<switch name="/systems/pneumatics/warnings/crossbleed-disag-open">
<switch name="/systems/pneumatics/warnings/crossbleed-disag-open-man">
<default value="0"/>
<test logic="AND" value="1">
/systems/pneumatics/valves/crossbleed-valve-cmd eq 1
/systems/pneumatics/valves/crossbleed-valve ne 1
/controls/pneumatics/switches/x-bleed eq 2
</test>
</switch>
<switch name="/systems/pneumatics/warnings/crossbleed-disag-open-auto">
<default value="0"/>
<test logic="AND" value="1">
/systems/pneumatics/valves/crossbleed-valve-cmd eq 1
/systems/pneumatics/valves/crossbleed-valve ne 1
/controls/pneumatics/switches/x-bleed eq 1
/systems/electrical/bus/dc-2 ge 25
</test>
</switch>
<switch name="/systems/pneumatics/warnings/crossbleed-disag">
<switch name="/systems/pneumatics/warnings/crossbleed-disag-open">
<default value="0"/>
<test logic="OR" value="1">
/systems/pneumatics/warnings/crossbleed-disag-open-man eq 1
<test logic="AND">
/systems/pneumatics/warnings/crossbleed-disag-open-auto eq 1
/systems/electrical/bus/dc-2 ge 25
</test>
</test>
</switch>
<switch name="/systems/pneumatics/warnings/crossbleed-disag-closed">
<default value="0"/>
<test logic="AND" value="1">
/systems/pneumatics/valves/crossbleed-valve-cmd eq 0
/systems/pneumatics/valves/crossbleed-valve ne 0
</test>
<test logic="AND" value="1">
</switch>
<switch name="/systems/pneumatics/warnings/crossbleed-disag">
<default value="0"/>
<test logic="OR" value="1">
/systems/pneumatics/warnings/crossbleed-disag-closed eq 1
/systems/pneumatics/warnings/crossbleed-disag-open eq 1
</test>
</switch>

View file

@ -303,7 +303,7 @@
<output>ECAM/warnings/altitude-alert/gear-downlocked-output</output>
</flipflop>
<!-- falling edge detector - take inverse of following -->
<!-- falling edge detector - switch and output both false -->
<flipflop>
<type>monostable</type>
<inverted type="bool">true</inverted>
@ -311,9 +311,9 @@
<value>4.5</value>
</time>
<S>
<property>ECAM/phases/monostable/phase-8</property>
<property>/ECAM/phases/monostable/phase-8</property>
</S>
<output>ECAM/phases/monostable/phase-8-output</output>
<output>/ECAM/phases/monostable/phase-8-output</output>
</flipflop>
<flipflop>
@ -412,30 +412,6 @@
</flipflop>
<!-- falling edge detectors -->
<flipflop>
<type>monostable</type>
<inverted type="bool">true</inverted>
<time>
<value>10.0</value>
</time>
<S>
<property>/ECAM/warnings/timer/xbleed-fault-output</property>
</S>
<output>/ECAM/warnings/timer/xbleed-fault-output-10</output>
</flipflop>
<flipflop>
<type>monostable</type>
<inverted type="bool">true</inverted>
<time>
<value>15.0</value>
</time>
<S>
<property>/controls/engines/engine[0]/fire-btn</property>
</S>
<output>/ECAM/warnings/timer/xbleed-fault-output-15</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
@ -926,7 +902,7 @@
<value>1.0</value>
</time>
<S>
<property>/ECAM/warnings/logic/stall/phase-8</property>
<property>/ECAM/phases/monostable/phase-8</property>
</S>
<output>/ECAM/warnings/logic/stall/phase-8-output</output>
</flipflop>
@ -1029,4 +1005,70 @@
</R>
<output>/ECAM/phases/phase-calculation/altitude-ge-800</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/flaps-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/flaps-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/flaps-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/slats-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/slats-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/slats-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/spd-brk-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/spd-brk-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/spd-brk-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/pitch-trim-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/pitch-trim-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/pitch-trim-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/rudder-trim-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/rudder-trim-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/rudder-trim-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/park-brk-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/park-brk-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/park-brk-config-output</output>
</flipflop>
</PropertyList>