diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas
index 03e15e97..9da6fd0f 100644
--- a/Nasal/ECAM/ECAM-controller.nas
+++ b/Nasal/ECAM/ECAM-controller.nas
@@ -58,6 +58,10 @@ var warningNodes = {
bleed1Off5Output: props.globals.initNode("/ECAM/warnings/logic/bleed-1-off-5-output"),
bleed2Off60Output: props.globals.initNode("/ECAM/warnings/logic/bleed-2-off-60-output"),
bleed2Off5Output: props.globals.initNode("/ECAM/warnings/logic/bleed-2-off-5-output"),
+ eng1AiceNotClsd: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-open-output"),
+ eng2AiceNotClsd: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-open-output"),
+ eng1AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-closed-output"),
+ eng2AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-closed-output"),
},
Flipflops: {
bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"),
diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas
index 55695cc7..f7951850 100644
--- a/Nasal/ECAM/ECAM-logic.nas
+++ b/Nasal/ECAM/ECAM-logic.nas
@@ -1230,7 +1230,7 @@ var messages_priority_2 = func {
# Bleed
# BLEED 1 FAULT
- if ((FWC.Timer.eng1idleOutput.getBoolValue() and !pts.Controls.Engines.Engine.cutoffSw[0].getValue()) and (systems.PNEU.Warnings.overpress1.getValue() or systems.PNEU.Warnings.ovht1.getValue())) {
+ if ((FWC.Timer.eng1idleOutput.getBoolValue() == 1 and !pts.Controls.Engines.Engine.cutoffSw[0].getValue()) and (systems.PNEU.Warnings.overpress1.getValue() or systems.PNEU.Warnings.ovht1.getValue())) {
warningNodes.Timers.bleed1Fault.setValue(1);
} else {
warningNodes.Timers.bleed1Fault.setValue(0);
@@ -1267,7 +1267,7 @@ var messages_priority_2 = func {
}
# BLEED 2 FAULT
- if ((FWC.Timer.eng2idleOutput.getBoolValue() and !pts.Controls.Engines.Engine.cutoffSw[1].getValue()) and (systems.PNEU.Warnings.overpress2.getValue() or systems.PNEU.Warnings.ovht2.getValue())) {
+ if ((FWC.Timer.eng2idleOutput.getBoolValue() == 1 and !pts.Controls.Engines.Engine.cutoffSw[1].getValue()) and (systems.PNEU.Warnings.overpress2.getValue() or systems.PNEU.Warnings.ovht2.getValue())) {
warningNodes.Timers.bleed2Fault.setValue(1);
} else {
warningNodes.Timers.bleed2Fault.setValue(0);
@@ -1571,6 +1571,39 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(bleedMon2Fault);
}
+ # ENG AICE
+ if (eng1IceClosed.clearFlag == 0 and (phaseVar <= 2 or phaseVar >= 9 or phaseVar == 6) and warningNodes.Timers.eng1AiceNotOpen.getValue() == 1) {
+ eng1IceClosed.active = 1;
+ eng1IceClosedIcing.active = 1;
+ } else {
+ ECAM_controller.warningReset(eng1IceClosed);
+ ECAM_controller.warningReset(eng1IceClosedIcing);
+ }
+
+ if (eng2IceClosed.clearFlag == 0 and (phaseVar <= 2 or phaseVar >= 9 or phaseVar == 6) and warningNodes.Timers.eng2AiceNotOpen.getValue() == 1) {
+ eng2IceClosed.active = 1;
+ eng2IceClosedIcing.active = 1;
+ } else {
+ ECAM_controller.warningReset(eng2IceClosed);
+ ECAM_controller.warningReset(eng2IceClosedIcing);
+ }
+
+ if (eng1IceOpen.clearFlag == 0 and (phaseVar <= 2 or phaseVar >= 9 or phaseVar == 6) and warningNodes.Timers.eng1AiceNotClsd.getValue() == 1) {
+ eng1IceOpen.active = 1;
+ eng1IceOpenThrust.active = 1;
+ } else {
+ ECAM_controller.warningReset(eng1IceOpen);
+ ECAM_controller.warningReset(eng1IceOpenThrust);
+ }
+
+ if (eng2IceOpen.clearFlag == 0 and (phaseVar <= 2 or phaseVar >= 9 or phaseVar == 6) and warningNodes.Timers.eng2AiceNotClsd.getValue() == 1) {
+ eng2IceOpen.active = 1;
+ eng2IceOpenThrust.active = 1;
+ } else {
+ ECAM_controller.warningReset(eng2IceOpen);
+ ECAM_controller.warningReset(eng2IceOpenThrust);
+ }
+
# Eng fire
if (eng1FireDetFault.clearFlag == 0 and (systems.engFireDetectorUnits.vector[0].condition == 0 or (systems.engFireDetectorUnits.vector[0].loopOne == 9 and systems.engFireDetectorUnits.vector[0].loopTwo == 9 and systems.eng1Inop.getBoolValue())) and (phaseVar == 6 or phaseVar >= 9 or phaseVar <= 2)) {
eng1FireDetFault.active = 1;
diff --git a/Nasal/ECAM/ECAM-phases.nas b/Nasal/ECAM/ECAM-phases.nas
index 4c4711ae..8d3bef2c 100644
--- a/Nasal/ECAM/ECAM-phases.nas
+++ b/Nasal/ECAM/ECAM-phases.nas
@@ -110,13 +110,13 @@ var phaseLoop = func() {
gnd = 0;
}
- if (eng1n2 >= 59.4) {
+ if (eng1n2 >= 59.4 and !master1) {
FWC.Timer.eng1idle.setValue(1);
} else {
FWC.Timer.eng1idle.setValue(0);
}
- if (eng2n2 >= 59.4) {
+ if (eng2n2 >= 59.4 and !master2) {
FWC.Timer.eng2idle.setValue(1);
} else {
FWC.Timer.eng2idle.setValue(0);
@@ -128,7 +128,7 @@ var phaseLoop = func() {
FWC.Timer.eng1or2.setValue(0);
}
- if ((!FWC.Timer.eng1idleOutput.getBoolValue() or master1) and (!FWC.Timer.eng2idleOutput.getBoolValue() or master2)) {
+ if ((FWC.Timer.eng1idleOutput.getBoolValue() == 0 or master1) and (FWC.Timer.eng2idleOutput.getBoolValue() == 0 or master2)) {
twoEngOff = 1;
} else {
twoEngOff = 0;
diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml
index b5ad2664..2d518afc 100644
--- a/Systems/a320-fwc.xml
+++ b/Systems/a320-fwc.xml
@@ -139,12 +139,40 @@
0.2
-
+
Timer for the ECAM system
/ECAM/warnings/logic/bleed-2-off-5
100
0.2
+
+
+ Timer for the ECAM system
+ /ECAM/warnings/logic/eng-aice-1-open
+ 100
+ 0.2
+
+
+
+ Timer for the ECAM system
+ /ECAM/warnings/logic/eng-aice-2-open
+ 100
+ 0.2
+
+
+
+ Timer for the ECAM system
+ /ECAM/warnings/logic/eng-aice-1-closed
+ 100
+ 0.1
+
+
+
+ Timer for the ECAM system
+ /ECAM/warnings/logic/eng-aice-2-closed
+ 100
+ 0.1
+
@@ -503,6 +531,44 @@
/ECAM/warning-phase eq 7
+
+
+
+
+ /ECAM/phases/timer/eng1idle-output ne 0
+ /systems/electrical/bus/dc-1 ge 25
+ /controls/ice-protection/lengfault eq 1
+ /controls/ice-protection/leng eq 0
+
+
+
+
+
+
+ /ECAM/phases/timer/eng2idle-output ne 0
+ /systems/electrical/bus/dc-2 ge 25
+ /controls/ice-protection/rengfault eq 1
+ /controls/ice-protection/reng eq 0
+
+
+
+
+
+
+ /ECAM/phases/timer/eng1idle-output ne 0
+ /controls/ice-protection/lengfault eq 1
+ /controls/ice-protection/leng eq 1
+
+
+
+
+
+
+ /ECAM/phases/timer/eng2idle-output ne 0
+ /controls/ice-protection/rengfault eq 1
+ /controls/ice-protection/reng eq 1
+
+
diff --git a/Systems/a320-pneumatic.xml b/Systems/a320-pneumatic.xml
index 96669002..7b5494b9 100644
--- a/Systems/a320-pneumatic.xml
+++ b/Systems/a320-pneumatic.xml
@@ -415,8 +415,9 @@
-
+
/systems/electrical/bus/dc-ess-shed lt 25
+ /systems/pneumatics/psi/engine-1-psi lt 7
/controls/ice-protection/wing eq 1
@@ -427,10 +428,12 @@
/systems/failures/icing/wing-left-valve eq 1
- /systems/pneumatics/psi/engine-1-psi lt 7
- /systems/electrical/bus/dc-ess-shed lt 25
+
+ /systems/electrical/bus/dc-ess-shed lt 25
+ /systems/pneumatics/psi/engine-1-psi lt 7
+
/systems/pneumatics/valves/wing-ice-1-cmd eq 0
/systems/pneumatics/valves/wing-ice-1 ne 0
@@ -446,8 +449,9 @@
-
+
/systems/electrical/bus/dc-ess-shed lt 25
+ /systems/pneumatics/psi/engine-2-psi lt 7
/controls/ice-protection/wing eq 1
@@ -458,10 +462,12 @@
/systems/failures/icing/wing-right-valve eq 1
- /systems/pneumatics/psi/engine-2-psi lt 7
- /systems/electrical/bus/dc-ess-shed lt 25
+
+ /systems/electrical/bus/dc-ess-shed lt 25
+ /systems/pneumatics/psi/engine-2-psi lt 7
+
/systems/pneumatics/valves/wing-ice-2-cmd eq 0
/systems/pneumatics/valves/wing-ice-2 ne 0
@@ -477,6 +483,9 @@
+
+ /systems/pneumatics/source/engine-1-hp-psi lt 7
+
/systems/electrical/bus/dc-1 lt 25
@@ -487,16 +496,18 @@
-
+
/systems/failures/icing/engine-left-valve eq 1
- /systems/pneumatics/source/engine-1-hp-psi lt 7
-
- /systems/electrical/bus/dc-1 lt 25
+
+
+ /systems/electrical/bus/dc-1 lt 25
+ /systems/pneumatics/source/engine-1-hp-psi lt 7
+
/systems/pneumatics/valves/engine-ice-1-cmd eq 1
/systems/pneumatics/valves/engine-ice-1 ne 1
-
+
/systems/electrical/bus/dc-1 ge 25
@@ -508,6 +519,9 @@
+
+ /systems/pneumatics/source/engine-2-hp-psi lt 7
+
/systems/electrical/bus/dc-2 lt 25
@@ -518,16 +532,18 @@
-
+
/systems/failures/icing/engine-right-valve eq 1
- /systems/pneumatics/source/engine-1-hp-psi lt 7
-
- /systems/electrical/bus/dc-2 lt 25
+
+
+ /systems/electrical/bus/dc-2 lt 25
+ /systems/pneumatics/source/engine-2-hp-psi lt 7
+
/systems/pneumatics/valves/engine-ice-2-cmd eq 1
/systems/pneumatics/valves/engine-ice-2 ne 1
-
+
/systems/electrical/bus/dc-2 ge 25
@@ -1259,8 +1275,8 @@
- /systems/pneumatics/valves/wing-ice-1 ne /systems/pneumatics/valves/wing-ice-1-cmd
- /systems/pneumatics/valves/wing-ice-2 ne /systems/pneumatics/valves/wing-ice-2-cmd
+ /systems/pneumatics/valves/wing-ice-1 ne /controls/ice-protection/wing
+ /systems/pneumatics/valves/wing-ice-2 ne /controls/ice-protection/wing
/systems/electrical/bus/dc-ess-shed lt 25
@@ -1268,14 +1284,14 @@
- /systems/pneumatics/valves/engine-ice-1 ne /systems/pneumatics/valves/engine-ice-1-cmd
+ /systems/pneumatics/valves/engine-ice-1 ne /controls/ice-protection/leng
- /systems/pneumatics/valves/engine-ice-2 ne /systems/pneumatics/valves/engine-ice-2-cmd
+ /systems/pneumatics/valves/engine-ice-2 ne /controls/ice-protection/reng