diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas
index 09832bdd..e39d7afb 100644
--- a/Nasal/ECAM/ECAM-controller.nas
+++ b/Nasal/ECAM/ECAM-controller.nas
@@ -90,8 +90,14 @@ var warningNodes = {
navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"),
},
Flipflops: {
+ apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"),
+ apuGenFaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault-on-off"),
bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"),
bleed2LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-2-low-temp-flipflop-output"),
+ gen1Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault"),
+ gen2Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault"),
+ gen1FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault-on-off"),
+ gen2FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault-on-off"),
pack1Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-1-ovht"),
pack2Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-2-ovht"),
},
diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas
index 1993baa4..fe11ceee 100644
--- a/Nasal/ECAM/ECAM-logic.nas
+++ b/Nasal/ECAM/ECAM-logic.nas
@@ -1139,6 +1139,72 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(acBusEssShedAtc);
}
+ if (gen1fault.clearFlag == 0 and warningNodes.Flipflops.gen1Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) {
+ gen1fault.active = 1;
+ if (!warningNodes.Flipflops.gen1FaultOnOff.getValue()) {
+ gen1faultGen.active = 1;
+ } else {
+ ECAM_controller.warningReset(gen1faultGen);
+ }
+
+ if (systems.ELEC.Switch.gen1.getBoolValue()) {
+ gen1faultGen2.active = 1;
+ gen1faultGen3.active = 1;
+ } else {
+ ECAM_controller.warningReset(gen1faultGen2);
+ ECAM_controller.warningReset(gen1faultGen3);
+ }
+ } else {
+ ECAM_controller.warningReset(gen1fault);
+ ECAM_controller.warningReset(gen1faultGen);
+ ECAM_controller.warningReset(gen1faultGen2);
+ ECAM_controller.warningReset(gen1faultGen3);
+ }
+
+ if (gen2fault.clearFlag == 0 and warningNodes.Flipflops.gen2Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) {
+ gen2fault.active = 1;
+ if (!warningNodes.Flipflops.gen2FaultOnOff.getValue()) {
+ gen2faultGen.active = 1;
+ } else {
+ ECAM_controller.warningReset(gen2faultGen);
+ }
+
+ if (systems.ELEC.Switch.gen2.getBoolValue()) {
+ gen2faultGen2.active = 1;
+ gen2faultGen3.active = 1;
+ } else {
+ ECAM_controller.warningReset(gen2faultGen2);
+ ECAM_controller.warningReset(gen2faultGen3);
+ }
+ } else {
+ ECAM_controller.warningReset(gen2fault);
+ ECAM_controller.warningReset(gen2faultGen);
+ ECAM_controller.warningReset(gen2faultGen2);
+ ECAM_controller.warningReset(gen2faultGen3);
+ }
+
+ if (apuGenfault.clearFlag == 0 and warningNodes.Flipflops.apuGenFault.getValue() and (phaseVar2 <= 3 or phaseVar2 == 6 or phaseVar2 >= 9)) {
+ apuGenfault.active = 1;
+ if (!warningNodes.Flipflops.apuGenFaultOnOff.getValue()) {
+ apuGenfaultGen.active = 1;
+ } else {
+ ECAM_controller.warningReset(apuGenfaultGen);
+ }
+
+ if (systems.ELEC.Switch.genApu.getBoolValue()) {
+ apuGenfaultGen2.active = 1;
+ apuGenfaultGen3.active = 1;
+ } else {
+ ECAM_controller.warningReset(apuGenfaultGen2);
+ ECAM_controller.warningReset(apuGenfaultGen3);
+ }
+ } else {
+ ECAM_controller.warningReset(apuGenfault);
+ ECAM_controller.warningReset(apuGenfaultGen);
+ ECAM_controller.warningReset(apuGenfaultGen2);
+ ECAM_controller.warningReset(apuGenfaultGen3);
+ }
+
if ((athr_offw.clearFlag == 0) and athrWarn.getValue() == 2 and phaseVar2 != 4 and phaseVar2 != 8 and phaseVar2 != 10) {
athr_offw.active = 1;
athr_offw_1.active = 1;
diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas
index 1e0cc66b..7d6e0462 100644
--- a/Nasal/ECAM/ECAM-messages.nas
+++ b/Nasal/ECAM/ECAM-messages.nas
@@ -212,9 +212,27 @@ var warnings = std.Vector.new([
var dcBusEssShedIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"),
# AC ESS BUS SHED
- var acBusEssShed = warning.new(msg: "ELEC DC ESS BUS SHED", colour: "a", aural: 1, light: 1, isMainMsg: 1),
+ var acBusEssShed = warning.new(msg: "ELEC AC ESS BUS SHED", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var acBusEssShedAtc = warning.new(msg: " -ATC..............SYS 2", colour: "c"),
+ # GEN 1 FAULT
+ var gen1fault = warning.new(msg: "ELEC GEN 1 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
+ var gen1faultGen = warning.new(msg: "-GEN 1......OFF THEN ON", colour: "c"),
+ var gen1faultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
+ var gen1faultGen3 = warning.new(msg: "-GEN 1..............OFF", colour: "c"),
+
+ # GEN 2 FAULT
+ var gen2fault = warning.new(msg: "ELEC GEN 2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
+ var gen2faultGen = warning.new(msg: "-GEN 2......OFF THEN ON", colour: "c"),
+ var gen2faultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
+ var gen2faultGen3 = warning.new(msg: "-GEN 2..............OFF", colour: "c"),
+
+ # APU GEN FAULT
+ var apuGenfault = warning.new(msg: "ELEC APU GEN FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
+ var apuGenfaultGen = warning.new(msg: "-APU GEN....OFF THEN ON", colour: "c"),
+ var apuGenfaultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
+ var apuGenfaultGen3 = warning.new(msg: "-APU GEN............OFF", colour: "c"),
+
# Autothrust
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml
index b74add82..6820de11 100644
--- a/Systems/a320-fwc.xml
+++ b/Systems/a320-fwc.xml
@@ -341,6 +341,34 @@
100
1.0
+
+
+ Timer for the ECAM system
+ /ECAM/warnings/logic/gen-1-fault-set
+ 100
+ 0.1818
+
+
+
+ Timer for the ECAM system
+ /ECAM/warnings/logic/gen-2-fault-set
+ 100
+ 0.1818
+
+
+
+ Timer for the ECAM system
+ /ECAM/warnings/logic/apu-gen-fault-set
+ 100
+ 0.2
+
+
+
+ Timer for the ECAM system
+ /ECAM/warnings/logic/apu-gen-fault-reset
+ 100
+ 0.5
+
@@ -1458,5 +1486,179 @@
+
+
+
+
+
+
+ /engines/engine[0]/state eq 3
+ /systems/electrical/relay/gen-1-glc/contact-pos eq 0
+
+
+
+
+
+
+ /controls/electrical/switches/gen-1 eq 1
+ /controls/electrical/switches/idg-1-disc eq 1
+ /ECAM/warnings/logic/gen-1-inop eq 1
+
+
+
+
+
+
+ /ECAM/warnings/timer/gen-1-fault-set eq 1
+
+
+
+
+ /systems/electrical/relay/gen-1-glc/contact-pos
+ 100
+ 0.5
+
+
+
+
+
+ /ECAM/warning-phase eq 1
+ /ECAM/warning-phase eq 10
+ /systems/electrical/some-electric-thingie/emer-elec-config eq 1
+ /ECAM/warnings/logic/glc-1-online-2-sec eq 1
+
+
+
+
+
+
+
+ /ECAM/warnings/flipflop/gen-1-fault eq 1
+
+ /ECAM/warnings/logic/gen-1-pulse eq 1
+ /controls/electrical/switches/gen-1 eq 1
+
+
+
+
+
+
+
+ /ECAM/warnings/flipflop/gen-1-fault eq 0
+ /ECAM/warning-phase eq 1
+ /ECAM/warning-phase eq 10
+
+
+
+
+
+
+ /engines/engine[1]/state eq 3
+ /systems/electrical/relay/gen-2-glc/contact-pos eq 0
+
+
+
+
+
+
+ /controls/electrical/switches/gen-2 eq 1
+ /controls/electrical/switches/idg-2-disc eq 1
+ /ECAM/warnings/logic/gen-2-inop eq 1
+
+
+
+
+
+
+ /ECAM/warnings/timer/gen-2-fault-set eq 1
+
+
+
+
+ /systems/electrical/relay/gen-2-glc/contact-pos
+ 100
+ 0.5
+
+
+
+
+
+ /ECAM/warning-phase eq 1
+ /ECAM/warning-phase eq 10
+ /systems/electrical/some-electric-thingie/emer-elec-config eq 1
+ /ECAM/warnings/logic/glc-2-online-2-sec eq 1
+
+
+
+
+
+
+
+ /ECAM/warnings/flipflop/gen-2-fault eq 1
+
+ /ECAM/warnings/logic/gen-2-pulse eq 1
+ /controls/electrical/switches/gen-2 eq 1
+
+
+
+
+
+
+
+ /ECAM/warnings/flipflop/gen-2-fault eq 0
+ /ECAM/warning-phase eq 1
+ /ECAM/warning-phase eq 10
+
+
+
+
+
+
+ /systems/apu/available eq 1
+ /systems/electrical/sources/apu/gcu-fault eq 1
+
+
+
+
+
+
+ /controls/electrical/switches/apu eq 1
+ /ECAM/warnings/logic/apu-gen-fault eq 1
+
+
+
+
+
+
+ /ECAM/warning-phase eq 1
+
+ /systems/apu/available eq 1
+ /controls/electrical/switches/apu eq 1
+ /systems/electrical/sources/apu/gcu-fault eq 0
+
+
+
+
+
+
+
+ /ECAM/warnings/flipflop/apu-gen-fault eq 1
+
+ /ECAM/warnings/logic/apu-elec-gen-pulse eq 1
+ /controls/electrical/switches/apu eq 1
+
+
+
+
+
+
+
+ /ECAM/warnings/flipflop/apu-gen-fault eq 0
+ /ECAM/warning-phase eq 1
+ /ECAM/warning-phase eq 10
+
+
+
+
diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml
index e6545cf2..80d56c3b 100644
--- a/Systems/ecam-proprules.xml
+++ b/Systems/ecam-proprules.xml
@@ -558,6 +558,39 @@
+
+ monostable
+
+
+ /controls/electrical/switches/apu
+
+
+
+
+
+ monostable
+
+
+ /controls/electrical/switches/gen-1
+
+
+
+
+
+ monostable
+
+
+ /controls/electrical/switches/gen-2
+
+
+
+
monostable
+
+ RS
+
+ /ECAM/warnings/logic/gen-1-fault-set-output
+
+
+ /ECAM/warnings/logic/gen-1-fault-reset
+
+
+
+
+
+ RS
+
+ /ECAM/warnings/logic/gen-1-fault-on-off-set
+
+
+ /ECAM/warnings/logic/gen-1-fault-on-off-reset
+
+
+
+
+
+ RS
+
+ /ECAM/warnings/logic/gen-2-fault-set-output
+
+
+ /ECAM/warnings/logic/gen-2-fault-reset
+
+
+
+
+
+ RS
+
+ /ECAM/warnings/logic/gen-2-fault-on-off-set
+
+
+ /ECAM/warnings/logic/gen-2-fault-on-off-reset
+
+
+
+
+
+
+ RS
+
+ /ECAM/warnings/timer/apu-gen-fault-set
+
+
+ /ECAM/warnings/timer/apu-gen-fault-reset
+
+
+
+
+
+ RS
+
+ /ECAM/warnings/logic/apu-gen-fault-on-off-set
+
+
+ /ECAM/warnings/logic/apu-gen-fault-on-off-reset
+
+
+