diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas
index 6461b5e7..faab2f1c 100644
--- a/Nasal/ECAM/ECAM-controller.nas
+++ b/Nasal/ECAM/ECAM-controller.nas
@@ -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,7 @@ 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"),
},
Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
@@ -389,6 +389,7 @@ var ECAM_controller = {
m.active = 0;
}
}
+ me._ready = 1;
},
clear: func() {
hasCleared = 0;
@@ -479,7 +480,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);
diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas
index 2d116e40..70296da3 100644
--- a/Nasal/ECAM/ECAM-logic.nas
+++ b/Nasal/ECAM/ECAM-logic.nas
@@ -55,7 +55,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 +95,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 +136,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 +181,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 +193,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;
@@ -815,7 +815,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 +1182,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 +1192,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;
@@ -2614,7 +2614,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;
diff --git a/Nasal/Systems/electrical.nas b/Nasal/Systems/electrical.nas
index 1ff311e2..6ccf5253 100644
--- a/Nasal/Systems/electrical.nas
+++ b/Nasal/Systems/electrical.nas
@@ -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"),
diff --git a/Systems/a320-fwc-phases.xml b/Systems/a320-fwc-phases.xml
index 23412c65..0426d80a 100644
--- a/Systems/a320-fwc-phases.xml
+++ b/Systems/a320-fwc-phases.xml
@@ -229,6 +229,14 @@
+
+
+
+
+ /ECAM/warning-phase eq 8
+
+
+
diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml
index a2d77e7d..a9be041d 100644
--- a/Systems/a320-fwc.xml
+++ b/Systems/a320-fwc.xml
@@ -1692,11 +1692,17 @@
- /ECAM/warnings/logic/stall/phase-8-output eq 0
+
+ /ECAM/warnings/logic/stall/phase-8-output eq 0
+ /ECAM/phases/monostable/phase-8 eq 0
+
/ECAM/warning-phase eq 7
- /ECAM/warnings/logic/stall/phase-4-output eq 0
+
+ /ECAM/warnings/logic/stall/phase-4-output eq 0
+ /ECAM/warnings/logic/stall/phase-4 eq 0
+
/ECAM/warning-phase eq 5
@@ -1715,18 +1721,14 @@
/ECAM/warning-phase eq 5
-
-
-
-
- /ECAM/warning-phase eq 8
-
-
- /ECAM/warnings/logic/stall/phase-5-output eq 0
+
+ /ECAM/warnings/logic/stall/phase-5-output eq 0
+ /ECAM/warnings/logic/stall/phase-5 eq 0
+
/ECAM/warning-phase eq 6
@@ -1805,11 +1807,18 @@
- /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
+
+
+ /ECAM/warning-phase eq 6
+ /ECAM/warning-phase eq 7
+
+
+ /ECAM/phases/monostable/phase-8 eq 0
+ /ECAM/phases/monostable/phase-8-output eq 0
+
+
@@ -1924,12 +1933,15 @@
/ECAM/warnings/logic/eng/eng-1-tla-abv-6-output eq 1
/engines/engine[0]/state eq 3
- /engines/engine[1]/state eq 3
-
- /ECAM/warnings/logic/eng/eng-2-reverse-output eq 1
-
- /ECAM/warnings/logic/eng/eng-2-reverse eq 1
- /ECAM/warnings/logic/eng/eng-1-retard-case-2-fall-output eq 0
+
+ /engines/engine[1]/state eq 3
+
+
+ /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
+
+ /ECAM/warnings/logic/eng/eng-2-reverse-output eq 1
@@ -1940,12 +1952,15 @@
/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
-
- /ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1
-
- /ECAM/warnings/logic/eng/eng-2-reverse-fall eq 0
- /ECAM/warnings/logic/eng/eng-2-tla-idle eq 1
+
+ /engines/engine[1]/state eq 3
+
+ /ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1
+
+ /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
+
@@ -1954,14 +1969,17 @@
- /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
-
- /ECAM/warnings/logic/eng/eng-1-reverse-output eq 1
-
- /ECAM/warnings/logic/eng/eng-1-reverse eq 1
- /ECAM/warnings/logic/eng/eng-2-retard-case-2-fall-output eq 0
+
+ /engines/engine[0]/state eq 3
+
+
+ /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
+
+ /ECAM/warnings/logic/eng/eng-1-reverse-output eq 1
@@ -1970,14 +1988,17 @@
- /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
-
- /ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1
-
- /ECAM/warnings/logic/eng/eng-1-reverse-fall eq 0
- /ECAM/warnings/logic/eng/eng-1-tla-idle eq 1
+
+ /engines/engine[0]/state eq 3
+
+ /ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1
+
+ /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
+
@@ -2302,6 +2323,20 @@
/gear/gear[2]/position-norm eq 1
+
+
+
+
+ /ECAM/warning-phase eq 6
+ /controls/flight/flaps-input ne 0
+
+ /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
+
+
+
+
diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml
index b818f2c9..db8cdd3f 100644
--- a/Systems/ecam-proprules.xml
+++ b/Systems/ecam-proprules.xml
@@ -303,7 +303,7 @@
-
+
monostable
true
@@ -311,9 +311,9 @@
4.5
- ECAM/phases/monostable/phase-8
+ /ECAM/phases/monostable/phase-8
-
+
@@ -902,7 +902,7 @@
1.0
- /ECAM/warnings/logic/stall/phase-8
+ /ECAM/phases/monostable/phase-8