diff --git a/A320-main.xml b/A320-main.xml
index b04a5a41..615cdfbd 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -1207,6 +1207,7 @@
0
0
+ 0
0
0
diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas
index eecf6db9..18f4f89b 100644
--- a/Models/Instruments/MCDU/MCDU.nas
+++ b/Models/Instruments/MCDU/MCDU.nas
@@ -881,7 +881,7 @@ var canvas_MCDU_base = {
}
} else if (page == "ATCMENU2") {
if (!pageSwitch[i].getBoolValue()) {
- me.defaultHide();
+ me.defaultHideWithCenter();
me["Simple_Title"].setText("ATC MENU");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("2/2");
@@ -893,6 +893,8 @@ var canvas_MCDU_base = {
me["Simple_L0S"].hide();
me.showLeftS(-1, -1, -1, -1, -1, 1);
me.showLeftArrow(1, 1, -1, -1, -1, 1);
+ me.showCenter(-1, -1, -1, -1, -1, -1);
+ me.showCenterS(1, -1, -1, -1, -1, -1);
me.showRight(1, -1, -1, -1, -1, -1);
me.showRightS(-1, -1, -1, -1, -1, -1);
me.showRightArrow(1, -1, -1, -1, -1, -1);
@@ -900,10 +902,13 @@ var canvas_MCDU_base = {
me["Simple_C4B"].hide();
me.standardFontSize();
+ me.fontSizeCenter(normal, normal, normal, normal, normal, normal);
me.standardFontColour();
+ me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht");
me["Simple_L1"].setText(" DEPART REQ");
me["Simple_L2"].setText(" OCEANIC REQ");
+ me["Simple_C1S"].setText(" -------- ATS623 PAGE -------- ");
me["Simple_L6S"].setText(" ATSU DLK");
me["Simple_L6"].setText(" RETURN");
@@ -1186,41 +1191,35 @@ var canvas_MCDU_base = {
me["Simple_Title"].setText("VHF3 DATA MODE");
me.defaultPageNumbers();
- me.showLeft(-1, 1, 1, 1, -1, 1);
+ me.showLeft(1, 1, 1, -1, -1, 1);
me["Simple_L0S"].hide();
- me.showLeftS(1, 1, 1, 1, -1, -1);
- me.showLeftArrow(-1, 1, 1, 1, -1, 1);
+ me.showLeftS(1, -1, -1, -1, -1, -1);
+ me.showLeftArrow(-1, 1, 1, -1, -1, 1);
me.showCenter(-1, -1, -1, -1, -1, -1);
me.showCenterS(1, -1, -1, -1, -1, -1);
- me.showRight(-1, 1, 1, -1, -1, 1);
- me.showRightS(1, 1, 1, -1, -1, 1);
+ me.showRight(1, 1, 1, -1, -1, 1);
+ me.showRightS(1, -1, -1, -1, -1, 1);
me.showRightArrow(-1, 1, 1, -1, -1, -1);
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
me.standardFontSize();
- me.colorLeft("wht", "blu", "blu", "blu", "wht", "wht");
- me.colorLeftS("grn", "blu", "blu", "blu", "wht", "wht");
+ me.colorLeft("grn", "blu", "blu", "blu", "wht", "wht");
+ me.colorLeftS("wht", "blu", "blu", "blu", "wht", "wht");
me.colorLeftArrow("wht", "blu", "blu", "blu", "wht", "wht");
me.colorCenterS("grn", "wht", "wht", "wht", "wht", "wht");
- me.colorRight("wht", "blu", "blu", "wht", "wht", "blu");
- me.colorRightS("grn", "blu", "blu", "wht", "wht", "blu");
+ me.colorRight("grn", "blu", "blu", "wht", "wht", "blu");
+ me.colorRightS("wht", "blu", "blu", "wht", "wht", "blu");
me.colorRightArrow("wht", "blu", "blu", "wht", "wht", "wht");
- me["Simple_L1S"].setText(" AUTO");
- me["Simple_C1S"].setText("SITA725 ");
- me["Simple_L2S"].setText(" SITA725");
- me["Simple_L2"].setText(" EUROPE");
- me["Simple_L3S"].setText(" SITA550");
- me["Simple_L3"].setText(" ASIA/AUST");
- me["Simple_L4S"].setText(" AVICOM");
- me["Simple_L4"].setText(" JAPAN");
- me["Simple_R1S"].setText(" 131.725");
- me["Simple_R2S"].setText("ARINC ");
- me["Simple_R2"].setText("USA ");
- me["Simple_R3S"].setText("AIRCANADA ");
- me["Simple_R3"].setText("CANADA ");
+ me["Simple_L1S"].setText(" ATIS");
+ me["Simple_C1S"].setText("ACTIVE SERVERS");
+ me["Simple_L2"].setText(" FAA");
+ me["Simple_L3"].setText(" VATSIM");
+ me["Simple_R1S"].setText("METAR ");
+ me["Simple_R2"].setText("NOAA ");
+ me["Simple_R3"].setText("VATSIM ");
me["Simple_L6S"].setText(" RETURN TO");
me["Simple_L6"].setText(" COMM MENU");
me["Simple_R6S"].setText("PAGE ");
@@ -1228,6 +1227,25 @@ var canvas_MCDU_base = {
pageSwitch[i].setBoolValue(1);
}
+ if (atsu.AOC.server == 1) {
+ me["Simple_R1"].setText("VATSIM ");
+ me["Simple_R2_Arrow"].show();
+ me["Simple_R3_Arrow"].hide();
+ } elsif (atsu.AOC.server == 0) {
+ me["Simple_R1"].setText("NOAA ");
+ me["Simple_R2_Arrow"].hide();
+ me["Simple_R3_Arrow"].show();
+ }
+
+ if (atsu.ATIS.server == 1) {
+ me["Simple_L1"].setText(" VATSIM");
+ me["Simple_L2_Arrow"].show();
+ me["Simple_L3_Arrow"].hide();
+ } elsif (atsu.ATIS.server == 0) {
+ me["Simple_L1"].setText(" FAA");
+ me["Simple_L2_Arrow"].hide();
+ me["Simple_L3_Arrow"].show();
+ }
} else if (page == "COMMINIT") {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHide();
diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas
index e39d7afb..263030fa 100644
--- a/Nasal/ECAM/ECAM-controller.nas
+++ b/Nasal/ECAM/ECAM-controller.nas
@@ -15,7 +15,7 @@ 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")];
+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")];
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
var lineIndex = 0;
@@ -58,7 +58,18 @@ var warningNodes = {
fac12Fault: props.globals.initNode("/ECAM/warnings/logic/fac-12-fault"),
fac1Fault: props.globals.initNode("/ECAM/warnings/logic/fac-1-fault"),
fac2Fault: props.globals.initNode("/ECAM/warnings/logic/fac-2-fault"),
+ stallWarn: props.globals.initNode("/ECAM/warnings/logic/stall/stall-warn-on"),
yawDamper12Fault: props.globals.initNode("/ECAM/warnings/logic/yaw-damper-12-fault"),
+ gearNotDown1: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-not-cancellable"),
+ gearNotDown2: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-cancellable"),
+ gearNotDownLocked: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-locked"),
+ gearNotDownLockedFlipflop: props.globals.initNode("/ECAM/warnings/fctl/gear-not-downlocked-output"),
+ blueGreen: props.globals.initNode("/ECAM/warnings/hyd/blue-green-failure"),
+ blueGreenFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-green-fuel-consumpt"),
+ blueYellow: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-failure"),
+ blueYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-fuel-consumpt"),
+ greenYellow: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-failure"),
+ greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"),
},
Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
@@ -78,6 +89,7 @@ var warningNodes = {
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"),
+ LRElevFault: props.globals.initNode("/ECAM/warnings/fctl/lrElevFault-output"),
waiLhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-left"),
waiRhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-right"),
pack1Fault: props.globals.initNode("/ECAM/warnings/timer/pack-1-fault-2"),
@@ -100,6 +112,9 @@ var warningNodes = {
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"),
+ parkBrk: props.globals.initNode("/ECAM/warnings/config/park-brk/park-brk-output"),
+ eng1ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-thr-lvr-abv-idle"),
+ eng2ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-thr-lvr-abv-idle"),
},
};
@@ -158,7 +173,7 @@ var warning = {
me.noRepeat = 1;
},
sound: func() {
- if (me.aural > 2) { return; }
+ if (me.aural > 3) { return; }
if (me.active == 0 and me.wasActive == 1) {
aural[me.aural].setBoolValue(0);
me.wasActive = 0;
@@ -172,7 +187,7 @@ var warning = {
aural[me.aural].setBoolValue(1);
}, 0.15);
} else {
- aural[me.aural].setBoolValue(1);
+ aural[me.aural].setBoolValue(1);
}
me.noRepeat2 = 1;
},
diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas
index fe11ceee..2aa703d6 100644
--- a/Nasal/ECAM/ECAM-logic.nas
+++ b/Nasal/ECAM/ECAM-logic.nas
@@ -15,8 +15,6 @@ var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
var wing_pb = props.globals.getNode("/controls/ice-protection/wing", 1);
var apu_bleedSw = props.globals.getNode("/controls/pneumatics/switches/apu", 1);
var gear = props.globals.getNode("/gear/gear-pos-norm", 1);
-var cutoff1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
-var cutoff2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
var stallVoice = props.globals.initNode("/sim/sound/warnings/stall-voice", 0, "BOOL");
var engOpt = props.globals.getNode("/options/eng", 1);
@@ -48,18 +46,21 @@ var messages_priority_3 = func {
# Stall
# todo - altn law and emer cancel flipflops page 2440
- if (phaseVar3 >= 5 and phaseVar3 <= 7 and (getprop("/fdm/jsbsim/fcs/slat-pos-deg") <= 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 15 or getprop("/systems/navigation/adr/output/aoa-2") > 15 or getprop("/systems/navigation/adr/output/aoa-3") > 15)) or (getprop("/fdm/jsbsim/fcs/slat-pos-deg") > 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 23 or getprop("/systems/navigation/adr/output/aoa-2") > 23 or getprop("/systems/navigation/adr/output/aoa-3") > 23))) {
+ if (warningNodes.Logic.stallWarn.getValue()) {
stall.active = 1;
- } else {
- ECAM_controller.warningReset(stall);
- }
-
- if (stall.active) {
stallVoice.setValue(1);
} else {
+ ECAM_controller.warningReset(stall);
stallVoice.setValue(0);
}
+ # 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) {
+ flap_not_zero.active = 1;
+ } else {
+ ECAM_controller.warningReset(flap_not_zero);
+ }
+
if ((phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) {
overspeed.active = 1;
if (getprop("/systems/navigation/adr/computation/overspeed-vmo") or getprop("/systems/navigation/adr/computation/overspeed-mmo")) {
@@ -89,202 +90,129 @@ var messages_priority_3 = func {
overspeedFlap.msg = "-VFE................XXX";
}
- # FCTL FLAPS NOT ZERO
- if ((flap_not_zero.clearFlag == 0) and phaseVar3 == 6 and getprop("/controls/flight/flaps-input") != 0 and getprop("instrumentation/altimeter/indicated-altitude-ft") > 22000) {
- flap_not_zero.active = 1;
+ # ENG ALL ENGINE FAILURE
+
+ if (allEngFail.clearFlag == 0 and dualFailNode.getBoolValue()) {
+ allEngFail.active = 1;
+
+ if (allEngFailElec.clearFlag == 0 and getprop("/systems/electrical/relay/emer-glc/contact-pos") == 0) {
+ allEngFailElec.active = 1;
+ } else {
+ ECAM_controller.warningReset(allEngFailElec);
+ }
+
+ if (allEngFailSPD1.clearFlag == 0 and allEngFailSPD2.clearFlag == 0 and allEngFailSPD3.clearFlag == 0 and allEngFailSPD4.clearFlag == 0) {
+ if (find("LEAP", getprop("/MCDUC/eng"))) {
+ allEngFailSPD2.active = 1;
+ ECAM_controller.warningReset(allEngFailSPD1);
+ ECAM_controller.warningReset(allEngFailSPD3);
+ ECAM_controller.warningReset(allEngFailSPD4);
+ } elsif (find("V2527", getprop("/MCDUC/eng"))) {
+ allEngFailSPD3.active = 1;
+ ECAM_controller.warningReset(allEngFailSPD1);
+ ECAM_controller.warningReset(allEngFailSPD2);
+ ECAM_controller.warningReset(allEngFailSPD4);
+ } elsif (find("PW11", getprop("/MCDUC/eng"))) {
+ allEngFailSPD1.active = 1;
+ ECAM_controller.warningReset(allEngFailSPD2);
+ ECAM_controller.warningReset(allEngFailSPD3);
+ ECAM_controller.warningReset(allEngFailSPD4);
+ } else {
+ allEngFailSPD4.active = 1;
+ ECAM_controller.warningReset(allEngFailSPD1);
+ ECAM_controller.warningReset(allEngFailSPD2);
+ ECAM_controller.warningReset(allEngFailSPD3);
+ }
+ } else {
+ ECAM_controller.warningReset(allEngFailSPD1);
+ ECAM_controller.warningReset(allEngFailSPD2);
+ ECAM_controller.warningReset(allEngFailSPD3);
+ ECAM_controller.warningReset(allEngFailSPD4);
+ }
+
+ if (allEngFailAPU.clearFlag == 0 and !systems.APUNodes.Controls.master.getBoolValue() and systems.ELEC.Switch.genApu.getValue() and !systems.APUNodes.Controls.fire.getValue() and !systems.APU.signals.autoshutdown and !systems.APU.signals.emer and pts.Instrumentation.Altimeter.indicatedFt.getValue() < 22500) {
+ allEngFailAPU.active = 1;
+ } else {
+ 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)) {
+ allEngFailLevers.active = 1;
+ } else {
+ ECAM_controller.warningReset(allEngFailLevers);
+ }
+
+ if (allEngFailFAC.clearFlag == 0 and fbw.FBW.Computers.fac1.getBoolValue() == 0) {
+ allEngFailFAC.active = 1;
+ } else {
+ ECAM_controller.warningReset(allEngFailFAC);
+ }
+
+ if (allEngFailGlide.clearFlag == 0) {
+ allEngFailGlide.active = 1;
+ } else {
+ ECAM_controller.warningReset(allEngFailGlide);
+ }
+
+ if (allEngFailDiversion.clearFlag == 0) {
+ allEngFailDiversion.active = 1;
+ } else {
+ ECAM_controller.warningReset(allEngFailDiversion);
+ }
+
+ if (allEngFailProc.clearFlag == 0) {
+ allEngFailProc.active = 1;
+ } else {
+ ECAM_controller.warningReset(allEngFailProc);
+ }
} else {
- ECAM_controller.warningReset(flap_not_zero);
+ ECAM_controller.warningReset(allEngFail);
+ ECAM_controller.warningReset(allEngFailElec);
+ ECAM_controller.warningReset(allEngFailSPD1);
+ ECAM_controller.warningReset(allEngFailSPD2);
+ ECAM_controller.warningReset(allEngFailSPD3);
+ ECAM_controller.warningReset(allEngFailSPD4);
+ ECAM_controller.warningReset(allEngFailAPU);
+ ECAM_controller.warningReset(allEngFailLevers);
+ ECAM_controller.warningReset(allEngFailFAC);
+ ECAM_controller.warningReset(allEngFailGlide);
+ ECAM_controller.warningReset(allEngFailDiversion);
+ ECAM_controller.warningReset(allEngFailProc);
}
- # ENG DUAL FAIL
-
- if (phaseVar3 >= 5 and phaseVar3 <= 7 and dualFailNode.getBoolValue() and dualFail.clearFlag == 0) {
- dualFail.active = 1;
+ # 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
+ eng1ThrLvrAbvIdle.active = 1;
+ if (eng1ThrLvrAbvIdle2.clearFlag == 0) {
+ eng1ThrLvrAbvIdle2.active = 1;
+ } else {
+ ECAM_controller.warningReset(eng1ThrLvrAbvIdle2);
+ }
} else {
- ECAM_controller.warningReset(dualFail);
+ ECAM_controller.warningReset(eng1ThrLvrAbvIdle);
+ ECAM_controller.warningReset(eng1ThrLvrAbvIdle2);
}
- if (dualFail.active == 1) {
- if (getprop("/controls/engines/engine-start-switch") != 2 and dualFailModeSel.clearFlag == 0) {
- dualFailModeSel.active = 1;
+ 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
+ eng2ThrLvrAbvIdle.active = 1;
+ if (eng2ThrLvrAbvIdle2.clearFlag == 0) {
+ eng2ThrLvrAbvIdle2.active = 1;
} else {
- ECAM_controller.warningReset(dualFailModeSel);
- }
-
- if (getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01 and dualFailLevers.clearFlag == 0) {
- dualFailLevers.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailLevers);
- }
-
- if (engOpt.getValue() == "IAE" and dualFailRelightSPD.clearFlag == 0) {
- dualFailRelightSPD.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailRelightSPD);
- }
-
- if (engOpt.getValue() != "IAE" and dualFailRelightSPDCFM.clearFlag == 0) {
- dualFailRelightSPDCFM.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailRelightSPDCFM);
- }
-
- if (emerGen.getValue() == 0 and dualFailElec.clearFlag == 0) {
- dualFailElec.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailElec);
- }
-
- if (dualFailRadio.clearFlag == 0) {
- dualFailRadio.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailRadio);
- }
-
- if (getprop("/systems/fctl/fac1-healthy-signal") == 0 and dualFailFAC.clearFlag == 0) {
- dualFailFAC.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailFAC);
- }
-
-
- if (dualFailMasters.clearFlag == 0) {
- dualFailRelight.active = 1; # assumption
- dualFailMasters.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailRelight);
- ECAM_controller.warningReset(dualFailMasters);
- }
-
- if (dualFailSPDGD.clearFlag == 0) {
- dualFailSuccess.active = 1; # assumption
- dualFailSPDGD.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailSuccess);
- ECAM_controller.warningReset(dualFailSPDGD);
- }
-
- if (dualFailAPU.clearFlag == 0) {
- dualFailAPU.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailAPU);
- }
-
- if (dualFailAPUwing.clearFlag == 0 and pts.APU.rpm.getValue() > 94.9 and wing_pb.getBoolValue()) {
- dualFailAPUwing.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailAPUwing);
- }
-
- if (dualFailAPUbleed.clearFlag == 0 and pts.APU.rpm.getValue() > 94.9 and !apu_bleedSw.getBoolValue()) {
- dualFailAPUbleed.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailAPUbleed);
- }
-
- if (dualFailMastersAPU.clearFlag == 0) {
- dualFailMastersAPU.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailMastersAPU);
- }
-
- if (dualFailflap.clearFlag == 0) {
- dualFailAPPR.active = 1; # assumption
- dualFailflap.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailAPPR);
- ECAM_controller.warningReset(dualFailflap);
- }
-
- if (dualFailcabin.clearFlag == 0) {
- dualFailcabin.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailcabin);
- }
-
- if (dualFailrudd.clearFlag == 0) {
- dualFailrudd.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailrudd);
- }
-
- if (dualFailgear.clearFlag == 0 and gear.getValue() != 1) {
- dualFail5000.active = 1; # according to doc
- dualFailgear.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailgear);
- ECAM_controller.warningReset(dualFail5000);
- }
-
- if (dualFailfinalspeed.clearFlag == 0) {
- dualFailfinalspeed.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailfinalspeed);
- }
-
- if (dualFailmasteroff.clearFlag == 0 and (!cutoff1.getBoolValue() or !cutoff2.getBoolValue())) {
- dualFailmasteroff.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailmasteroff);
- }
-
- if (dualFailapuoff.clearFlag == 0 and systems.APUNodes.Controls.master.getBoolValue()) {
- dualFailapuoff.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailapuoff);
- }
-
- if (dualFailevac.clearFlag == 0) {
- dualFailevac.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailevac);
- }
-
- if (dualFailbatt.clearFlag == 0) { # elec power lost when batt goes off anyway I guess
- dualFailbatt.active = 1;
- dualFailtouch.active = 1;
- } else {
- ECAM_controller.warningReset(dualFailbatt);
- ECAM_controller.warningReset(dualFailtouch);
+ ECAM_controller.warningReset(eng2ThrLvrAbvIdle2);
}
} else {
- ECAM_controller.warningReset(dualFailModeSel);
- ECAM_controller.warningReset(dualFailLevers);
- ECAM_controller.warningReset(dualFailRelightSPD);
- ECAM_controller.warningReset(dualFailRelightSPDCFM);
- ECAM_controller.warningReset(dualFailElec);
- ECAM_controller.warningReset(dualFailRadio);
- ECAM_controller.warningReset(dualFailFAC);
- ECAM_controller.warningReset(dualFailRelight);
- ECAM_controller.warningReset(dualFailMasters);
- ECAM_controller.warningReset(dualFailSuccess);
- ECAM_controller.warningReset(dualFailSPDGD);
- ECAM_controller.warningReset(dualFailAPU);
- ECAM_controller.warningReset(dualFailAPUwing);
- ECAM_controller.warningReset(dualFailAPUbleed);
- ECAM_controller.warningReset(dualFailMastersAPU);
- ECAM_controller.warningReset(dualFailAPPR);
- ECAM_controller.warningReset(dualFailflap);
- ECAM_controller.warningReset(dualFailcabin);
- ECAM_controller.warningReset(dualFailrudd);
- ECAM_controller.warningReset(dualFailgear);
- ECAM_controller.warningReset(dualFail5000);
- ECAM_controller.warningReset(dualFailfinalspeed);
- ECAM_controller.warningReset(dualFailmasteroff);
- ECAM_controller.warningReset(dualFailapuoff);
- ECAM_controller.warningReset(dualFailevac);
- ECAM_controller.warningReset(dualFailbatt);
- ECAM_controller.warningReset(dualFailtouch);
+ ECAM_controller.warningReset(eng2ThrLvrAbvIdle);
+ ECAM_controller.warningReset(eng2ThrLvrAbvIdle2);
}
# ENG FIRE
- if ((eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng1FireGnevacBat.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
+ 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))) {
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 (eng2FireGnevacBat.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
+ 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))) {
eng2Fire.active = 1;
} else {
ECAM_controller.warningReset(eng2Fire);
@@ -298,13 +226,13 @@ var messages_priority_3 = func {
if (eng1Fire.active == 1) {
if (phaseVar3 >= 5 and phaseVar3 <= 7) {
- if (eng1FireFllever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01) {
+ if (eng1FireFllever.clearFlag == 0 and pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01) {
eng1FireFllever.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFllever);
}
- if (eng1FireFlmaster.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (eng1FireFlmaster.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
eng1FireFlmaster.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlmaster);
@@ -364,7 +292,7 @@ var messages_priority_3 = func {
}
if (phaseVar3 < 5 or phaseVar3 > 7) {
- if (eng1FireGnlever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
+ if (eng1FireGnlever.clearFlag == 0 and pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01 and pts.Controls.Engines.Engine.throttleLever[1].getValue() > 0.01) {
eng1FireGnlever.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnlever);
@@ -378,7 +306,19 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1FireGnparkbrk);
}
- if (eng1FireGnmaster.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (eng1FireGnATC.clearFlag == 0) {
+ eng1FireGnATC.active = 1;
+ } else {
+ ECAM_controller.warningReset(eng1FireGnATC);
+ }
+
+ if (eng1FireGncrew.clearFlag == 0) {
+ eng1FireGncrew.active = 1;
+ } else {
+ ECAM_controller.warningReset(eng1FireGncrew);
+ }
+
+ if (eng1FireGnmaster.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
eng1FireGnmaster.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnmaster);
@@ -402,58 +342,22 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1FireGnAgent2);
}
- if (eng1FireGnmaster2.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
- eng1FireGnmaster2.active = 1;
+ if (eng1FireGnEvac.clearFlag == 0) {
+ eng1FireGnEvac.active = 1;
} else {
- ECAM_controller.warningReset(eng1FireGnmaster2);
- }
-
- if (eng1FireGnATC.clearFlag == 0) {
- eng1FireGnATC.active = 1;
- } else {
- ECAM_controller.warningReset(eng1FireGnATC);
- }
-
- if (eng1FireGncrew.clearFlag == 0) {
- eng1FireGncrew.active = 1;
- } else {
- ECAM_controller.warningReset(eng1FireGncrew);
- }
-
- if (eng1FireGnevacSw.clearFlag == 0) {
- eng1FireGnevac.active = 1;
- eng1FireGnevacSw.active = 1;
- } else {
- ECAM_controller.warningReset(eng1FireGnevac);
- ECAM_controller.warningReset(eng1FireGnevacSw);
- }
-
- if (eng1FireGnevacApu.clearFlag == 0 and systems.APUNodes.Controls.master.getBoolValue() and pts.APU.rpm.getValue() > 99) {
- eng1FireGnevacApu.active = 1;
- } else {
- ECAM_controller.warningReset(eng1FireGnevacApu);
- }
-
- if (eng1FireGnevacBat.clearFlag == 0 and (systems.ELEC.Switch.bat1.getValue() or systems.ELEC.Switch.bat2.getValue())) {
- eng1FireGnevacBat.active = 1;
- } else {
- ECAM_controller.warningReset(eng1FireGnevacBat);
+ ECAM_controller.warningReset(eng1FireGnEvac);
}
} else {
ECAM_controller.warningReset(eng1FireGnlever);
ECAM_controller.warningReset(eng1FireGnstopped);
ECAM_controller.warningReset(eng1FireGnparkbrk);
+ ECAM_controller.warningReset(eng1FireGnATC);
+ ECAM_controller.warningReset(eng1FireGncrew);
ECAM_controller.warningReset(eng1FireGnmaster);
ECAM_controller.warningReset(eng1FireGnPB);
ECAM_controller.warningReset(eng1FireGnAgent1);
ECAM_controller.warningReset(eng1FireGnAgent2);
- ECAM_controller.warningReset(eng1FireGnmaster2);
- ECAM_controller.warningReset(eng1FireGnATC);
- ECAM_controller.warningReset(eng1FireGncrew);
- ECAM_controller.warningReset(eng1FireGnevac);
- ECAM_controller.warningReset(eng1FireGnevacSw);
- ECAM_controller.warningReset(eng1FireGnevacApu);
- ECAM_controller.warningReset(eng1FireGnevacBat);
+ ECAM_controller.warningReset(eng1FireGnEvac);
}
} else {
ECAM_controller.warningReset(eng1FireFllever);
@@ -466,28 +370,24 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1FireGnlever);
ECAM_controller.warningReset(eng1FireGnstopped);
ECAM_controller.warningReset(eng1FireGnparkbrk);
+ ECAM_controller.warningReset(eng1FireGnATC);
+ ECAM_controller.warningReset(eng1FireGncrew);
ECAM_controller.warningReset(eng1FireGnmaster);
ECAM_controller.warningReset(eng1FireGnPB);
ECAM_controller.warningReset(eng1FireGnAgent1);
ECAM_controller.warningReset(eng1FireGnAgent2);
- ECAM_controller.warningReset(eng1FireGnmaster2);
- ECAM_controller.warningReset(eng1FireGnATC);
- ECAM_controller.warningReset(eng1FireGncrew);
- ECAM_controller.warningReset(eng1FireGnevac);
- ECAM_controller.warningReset(eng1FireGnevacSw);
- ECAM_controller.warningReset(eng1FireGnevacApu);
- ECAM_controller.warningReset(eng1FireGnevacBat);
+ ECAM_controller.warningReset(eng1FireGnEvac);
}
if (eng2Fire.active == 1) {
if (phaseVar3 >= 5 and phaseVar3 <= 7) {
- if (eng2FireFllever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
+ if (eng2FireFllever.clearFlag == 0 and pts.Controls.Engines.Engine.throttleLever[1].getValue() > 0.01) {
eng2FireFllever.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFllever);
}
- if (eng2FireFlmaster.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (eng2FireFlmaster.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
eng2FireFlmaster.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlmaster);
@@ -547,7 +447,7 @@ var messages_priority_3 = func {
}
if (phaseVar3 < 5 or phaseVar3 > 7) {
- if (eng2FireGnlever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
+ if (eng2FireGnlever.clearFlag == 0 and pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01 and pts.Controls.Engines.Engine.throttleLever[1].getValue() > 0.01) {
eng2FireGnlever.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnlever);
@@ -561,7 +461,19 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng2FireGnparkbrk);
}
- if (eng2FireGnmaster.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (eng2FireGnATC.clearFlag == 0) {
+ eng2FireGnATC.active = 1;
+ } else {
+ ECAM_controller.warningReset(eng2FireGnATC);
+ }
+
+ if (eng2FireGncrew.clearFlag == 0) {
+ eng2FireGncrew.active = 1;
+ } else {
+ ECAM_controller.warningReset(eng2FireGncrew);
+ }
+
+ if (eng2FireGnmaster.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
eng2FireGnmaster.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnmaster);
@@ -585,58 +497,22 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng2FireGnAgent2);
}
- if (eng2FireGnmaster2.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
- eng2FireGnmaster2.active = 1;
+ if (eng2FireGnEvac.clearFlag == 0) {
+ eng2FireGnEvac.active = 1;
} else {
- ECAM_controller.warningReset(eng2FireGnmaster2);
- }
-
- if (eng2FireGnATC.clearFlag == 0) {
- eng2FireGnATC.active = 1;
- } else {
- ECAM_controller.warningReset(eng2FireGnATC);
- }
-
- if (eng2FireGncrew.clearFlag == 0) {
- eng2FireGncrew.active = 1;
- } else {
- ECAM_controller.warningReset(eng2FireGncrew);
- }
-
- if (eng2FireGnevacSw.clearFlag == 0) {
- eng2FireGnevac.active = 1;
- eng2FireGnevacSw.active = 1;
- } else {
- ECAM_controller.warningReset(eng2FireGnevac);
- ECAM_controller.warningReset(eng2FireGnevacSw);
- }
-
- if (eng2FireGnevacApu.clearFlag == 0 and systems.APUNodes.Controls.master.getBoolValue() and pts.APU.rpm.getValue() > 99) {
- eng2FireGnevacApu.active = 1;
- } else {
- ECAM_controller.warningReset(eng2FireGnevacApu);
- }
-
- if (eng2FireGnevacBat.clearFlag == 0 and (systems.ELEC.Switch.bat1.getValue() or systems.ELEC.Switch.bat2.getValue())) {
- eng2FireGnevacBat.active = 1;
- } else {
- ECAM_controller.warningReset(eng2FireGnevacBat);
+ ECAM_controller.warningReset(eng2FireGnEvac);
}
} else {
ECAM_controller.warningReset(eng2FireGnlever);
ECAM_controller.warningReset(eng2FireGnstopped);
ECAM_controller.warningReset(eng2FireGnparkbrk);
+ ECAM_controller.warningReset(eng2FireGnATC);
+ ECAM_controller.warningReset(eng2FireGncrew);
ECAM_controller.warningReset(eng2FireGnmaster);
ECAM_controller.warningReset(eng2FireGnPB);
ECAM_controller.warningReset(eng2FireGnAgent1);
ECAM_controller.warningReset(eng2FireGnAgent2);
- ECAM_controller.warningReset(eng2FireGnmaster2);
- ECAM_controller.warningReset(eng2FireGnATC);
- ECAM_controller.warningReset(eng2FireGncrew);
- ECAM_controller.warningReset(eng2FireGnevac);
- ECAM_controller.warningReset(eng2FireGnevacSw);
- ECAM_controller.warningReset(eng2FireGnevacApu);
- ECAM_controller.warningReset(eng2FireGnevacBat);
+ ECAM_controller.warningReset(eng2FireGnEvac);
}
} else {
ECAM_controller.warningReset(eng2FireFllever);
@@ -649,22 +525,18 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng2FireGnlever);
ECAM_controller.warningReset(eng2FireGnstopped);
ECAM_controller.warningReset(eng2FireGnparkbrk);
+ ECAM_controller.warningReset(eng2FireGnATC);
+ ECAM_controller.warningReset(eng2FireGncrew);
ECAM_controller.warningReset(eng2FireGnmaster);
ECAM_controller.warningReset(eng2FireGnPB);
ECAM_controller.warningReset(eng2FireGnAgent1);
ECAM_controller.warningReset(eng2FireGnAgent2);
- ECAM_controller.warningReset(eng2FireGnmaster2);
- ECAM_controller.warningReset(eng2FireGnATC);
- ECAM_controller.warningReset(eng2FireGncrew);
- ECAM_controller.warningReset(eng2FireGnevac);
- ECAM_controller.warningReset(eng2FireGnevacSw);
- ECAM_controller.warningReset(eng2FireGnevacApu);
- ECAM_controller.warningReset(eng2FireGnevacBat);
+ ECAM_controller.warningReset(eng2FireGnEvac);
}
# APU Fire
if (apuFire.active == 1) {
- if (apuFirePB.clearFlag == 0 and !getprop("/controls/apu/fire-btn")) {
+ if (apuFirePB.clearFlag == 0 and !systems.APUNodes.Controls.fire.getValue()) {
apuFirePB.active = 1;
} else {
ECAM_controller.warningReset(apuFirePB);
@@ -674,13 +546,13 @@ var messages_priority_3 = func {
apuFireAgentTimer.msg = " -AGENT AFT " ~ getprop("/systems/fire/apu/agent-timer") ~ " S...DISCH";
}
- if (apuFireAgent.clearFlag == 0 and getprop("/controls/apu/fire-btn") 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 !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") != 0) {
apuFireAgentTimer.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgentTimer);
}
- if (apuFireAgent.clearFlag == 0 and getprop("/controls/apu/fire-btn") 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 !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") == 0) {
apuFireAgent.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgent);
@@ -698,24 +570,35 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(apuFireMaster);
}
- # CONFIG
- if ((slats_config.clearFlag == 0) and (getprop("/controls/flight/flaps-input") == 0 or getprop("/controls/flight/flaps-input")) == 4 and phaseVar3 >= 3 and phaseVar3 <= 4) {
- slats_config.active = 1;
- slats_config_1.active = 1;
+ if ((getprop("/ECAM/to-config-test") 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);
+ }
} else {
ECAM_controller.warningReset(slats_config);
ECAM_controller.warningReset(slats_config_1);
- }
-
- if ((flaps_config.clearFlag == 0) and (getprop("/controls/flight/flaps-input") == 0 or getprop("/controls/flight/flaps-input") == 4) and phaseVar3 >= 3 and phaseVar3 <= 4) {
- 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 phaseVar3 >= 3 and phaseVar3 <= 4) {
+ if ((spd_brk_config.clearFlag == 0) and pts.Controls.Flight.speedbrake.getValue() != 0 and takeoffConfig) {
spd_brk_config.active = 1;
spd_brk_config_1.active = 1;
} else {
@@ -723,7 +606,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") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65) and phaseVar3 >= 3 and phaseVar3 <= 4) {
+ 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) {
pitch_trim_config.active = 1;
pitch_trim_config_1.active = 1;
} else {
@@ -731,7 +614,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.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) and phaseVar3 >= 3 and phaseVar3 <= 4) {
+ 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) {
rud_trim_config.active = 1;
rud_trim_config_1.active = 1;
} else {
@@ -739,12 +622,72 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(rud_trim_config_1);
}
- if ((park_brk_config.clearFlag == 0) and pts.Controls.Gear.parkingBrake.getValue() == 1 and phaseVar3 >= 3 and phaseVar3 <= 4) {
+ if ((park_brk_config.clearFlag == 0) and warningNodes.Flipflops.parkBrk.getValue() and phaseVar3 >= 2 and phaseVar3 <= 3) {
park_brk_config.active = 1;
} else {
ECAM_controller.warningReset(park_brk_config);
}
+ if (lrElevFault.clearFlag == 0 and warningNodes.Timers.LRElevFault.getValue()) {
+ lrElevFault.active = 1;
+ if (lrElevFaultSpeed.clearFlag == 0) {
+ lrElevFaultSpeed.active = 1;
+ } else {
+ ECAM_controller.warningReset(lrElevFaultSpeed);
+ }
+ if (lrElevFaultTrim.clearFlag == 0) {
+ lrElevFaultTrim.active = 1;
+ } else {
+ ECAM_controller.warningReset(lrElevFaultTrim);
+ }
+ if (lrElevFaultSpdBrk.clearFlag == 0) {
+ lrElevFaultSpdBrk.active = 1;
+ } else {
+ ECAM_controller.warningReset(lrElevFaultSpdBrk);
+ }
+ } else {
+ ECAM_controller.warningReset(lrElevFault);
+ ECAM_controller.warningReset(lrElevFaultSpeed);
+ ECAM_controller.warningReset(lrElevFaultTrim);
+ ECAM_controller.warningReset(lrElevFaultSpdBrk);
+ }
+
+ if (gearNotDown.clearFlag == 0 and (warningNodes.Logic.gearNotDown1.getBoolValue() or warningNodes.Logic.gearNotDown2.getBoolValue()) and phaseVar3 != 3 and phaseVar3 != 4 and phaseVar3 != 5) {
+ gearNotDown.active = 1;
+ } else {
+ ECAM_controller.warningReset(gearNotDown);
+ }
+
+ if (gearNotDownLocked.clearFlag == 0 and warningNodes.Logic.gearNotDownLocked.getBoolValue() and phaseVar3 != 3 and phaseVar3 != 4 and phaseVar3 != 5 and phaseVar3 != 8) {
+ gearNotDownLocked.active = 1;
+
+ if (gearNotDownLockedRec.clearFlag == 0 and warningNodes.Logic.gearNotDownLockedFlipflop.getBoolValue()) {
+ gearNotDownLockedRec.active = 1;
+ gearNotDownLockedWork.active = 1;
+ } else {
+ ECAM_controller.warningReset(gearNotDownLockedRec);
+ ECAM_controller.warningReset(gearNotDownLockedWork);
+ }
+
+ if (gearNotDownLocked120.clearFlag == 0) {
+ gearNotDownLocked120.active = 1;
+ } else {
+ ECAM_controller.warningReset(gearNotDownLocked120);
+ }
+
+ if (gearNotDownLockedGrav.clearFlag == 0) {
+ gearNotDownLockedGrav.active = 1;
+ } else {
+ ECAM_controller.warningReset(gearNotDownLockedGrav);
+ }
+ } else {
+ ECAM_controller.warningReset(gearNotDownLocked);
+ ECAM_controller.warningReset(gearNotDownLockedRec);
+ ECAM_controller.warningReset(gearNotDownLockedWork);
+ ECAM_controller.warningReset(gearNotDownLocked120);
+ ECAM_controller.warningReset(gearNotDownLockedGrav);
+ }
+
# AUTOFLT
if ((ap_offw.clearFlag == 0) and apWarn.getValue() == 2) {
ap_offw.active = 1;
@@ -956,7 +899,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigFuelG2);
}
- if (getprop("/systems/fctl/fac1-healthy-signal") == 0 and emerconfigFAC.clearFlag == 0) {
+ if (fbw.FBW.Computers.fac1.getBoolValue() == 0 and emerconfigFAC.clearFlag == 0) {
emerconfigFAC.active = 1;
} else {
ECAM_controller.warningReset(emerconfigFAC);
@@ -1018,6 +961,196 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigProt);
ECAM_controller.warningReset(emerconfigMaxSpeed);
}
+
+ if (hydBYloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.blueYellow.getValue()) {
+ hydBYloPr.active = 1;
+ if (hydBYloPrRat.clearFlag == 0 and systems.HYD.Rat.position.getValue() != 0) {
+ hydBYloPrRat.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrRat);
+ }
+
+ if (hydBYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and systems.HYD.Qty.yellow.getValue() >= 3.5) {
+ hydBYloPrYElec.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrYElec);
+ }
+
+ if (hydBYloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 2.4) {
+ hydBYloPrRatOn.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrRatOn);
+ }
+
+ if (hydBYloPrBElec.clearFlag == 0 and systems.HYD.Switch.blueElec.getValue()) {
+ hydBYloPrBElec.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrBElec);
+ }
+
+ if (hydBYloPrYEng.clearFlag == 0 and systems.HYD.Switch.yellowEDP.getValue()) {
+ hydBYloPrYEng.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrYEng);
+ }
+
+ if (hydBYloPrMaxSpd.clearFlag == 0) {
+ hydBYloPrMaxSpd.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrMaxSpd);
+ }
+
+ if (hydBYloPrMnvrCare.clearFlag == 0) {
+ hydBYloPrMnvrCare.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrMnvrCare);
+ }
+
+ if (hydBYloPrGaPitch.clearFlag == 0) {
+ hydBYloPrGaPitch.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrGaPitch);
+ }
+
+ if (hydBYloPrFuelCnsmpt.clearFlag == 0 and warningNodes.Logic.blueYellowFuel.getValue()) {
+ hydBYloPrFuelCnsmpt.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrFuelCnsmpt);
+ }
+
+ if (hydBYloPrFmsPredict.clearFlag == 0 and warningNodes.Logic.blueYellowFuel.getValue()) {
+ hydBYloPrFmsPredict.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydBYloPrFmsPredict);
+ }
+ } else {
+ ECAM_controller.warningReset(hydBYloPr);
+ ECAM_controller.warningReset(hydBYloPrRat);
+ ECAM_controller.warningReset(hydBYloPrYElec);
+ ECAM_controller.warningReset(hydBYloPrRatOn);
+ ECAM_controller.warningReset(hydBYloPrBElec);
+ ECAM_controller.warningReset(hydBYloPrYEng);
+ ECAM_controller.warningReset(hydBYloPrMaxSpd);
+ ECAM_controller.warningReset(hydBYloPrMnvrCare);
+ ECAM_controller.warningReset(hydBYloPrGaPitch);
+ ECAM_controller.warningReset(hydBYloPrFuelCnsmpt);
+ ECAM_controller.warningReset(hydBYloPrFmsPredict);
+ }
+
+ if (hydGBloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.blueGreen.getValue()) {
+ hydGBloPr.active = 1;
+ if (hydGBloPrRat.clearFlag == 0 and systems.HYD.Rat.position.getValue() != 0) {
+ hydGBloPrRat.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGBloPrRat);
+ }
+
+ if (hydGBloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 2.4) {
+ hydGBloPrRatOn.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGBloPrRatOn);
+ }
+
+ if (hydGBloPrBElec.clearFlag == 0 and systems.HYD.Switch.blueElec.getValue()) {
+ hydGBloPrBElec.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGBloPrBElec);
+ }
+
+ if (hydGBloPrGEng.clearFlag == 0 and systems.HYD.Switch.greenEDP.getValue()) {
+ hydGBloPrGEng.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGBloPrGEng);
+ }
+
+ if (hydGBloPrMnvrCare.clearFlag == 0) {
+ hydGBloPrMnvrCare.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGBloPrMnvrCare);
+ }
+
+ if (hydGBloPrGaPitch.clearFlag == 0) {
+ hydGBloPrGaPitch.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGBloPrGaPitch);
+ }
+
+ if (hydGBloPrFuelCnsmpt.clearFlag == 0 and warningNodes.Logic.blueGreenFuel.getValue()) {
+ hydGBloPrFuelCnsmpt.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGBloPrFuelCnsmpt);
+ }
+
+ if (hydGBloPrFmsPredict.clearFlag == 0 and warningNodes.Logic.blueGreenFuel.getValue()) {
+ hydGBloPrFmsPredict.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGBloPrFmsPredict);
+ }
+ } else {
+ ECAM_controller.warningReset(hydGBloPr);
+ ECAM_controller.warningReset(hydGBloPrRat);
+ ECAM_controller.warningReset(hydGBloPrRatOn);
+ ECAM_controller.warningReset(hydGBloPrBElec);
+ ECAM_controller.warningReset(hydGBloPrGEng);
+ ECAM_controller.warningReset(hydGBloPrMnvrCare);
+ ECAM_controller.warningReset(hydGBloPrGaPitch);
+ ECAM_controller.warningReset(hydGBloPrFuelCnsmpt);
+ ECAM_controller.warningReset(hydGBloPrFmsPredict);
+ }
+
+ if (hydGYloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.greenYellow.getValue()) {
+ hydGYloPr.active = 1;
+ if (hydGYloPrPtu.clearFlag == 0 and systems.HYD.Switch.ptu.getValue() != 0) {
+ hydGYloPrPtu.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGYloPrPtu);
+ }
+
+ if (hydGYloPrGEng.clearFlag == 0 and systems.HYD.Switch.greenEDP.getValue()) {
+ hydGYloPrGEng.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGYloPrGEng);
+ }
+
+ if (hydGYloPrYEng.clearFlag == 0 and systems.HYD.Switch.yellowEDP.getValue()) {
+ hydGYloPrYEng.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGYloPrYEng);
+ }
+
+ if (hydGYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and systems.HYD.Qty.yellow.getValue() >= 3.5) {
+ hydGYloPrYElec.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGYloPrYElec);
+ }
+
+ if (hydGYloPrMnvrCare.clearFlag == 0) {
+ hydGYloPrMnvrCare.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGYloPrMnvrCare);
+ }
+
+ if (hydGYloPrFuelCnsmpt.clearFlag == 0 and warningNodes.Logic.greenYellowFuel.getValue()) {
+ hydGYloPrFuelCnsmpt.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGYloPrFuelCnsmpt);
+ }
+
+ if (hydGYloPrFmsPredict.clearFlag == 0 and warningNodes.Logic.greenYellowFuel.getValue()) {
+ hydGYloPrFmsPredict.active = 1;
+ } else {
+ ECAM_controller.warningReset(hydGYloPrFmsPredict);
+ }
+ } else {
+ ECAM_controller.warningReset(hydGYloPr);
+ ECAM_controller.warningReset(hydGYloPrPtu);
+ ECAM_controller.warningReset(hydGYloPrGEng);
+ ECAM_controller.warningReset(hydGYloPrYEng);
+ ECAM_controller.warningReset(hydGYloPrYElec);
+ ECAM_controller.warningReset(hydGYloPrMnvrCare);
+ ECAM_controller.warningReset(hydGYloPrFuelCnsmpt);
+ ECAM_controller.warningReset(hydGYloPrFmsPredict);
+ }
}
var messages_priority_2 = func {
@@ -2094,13 +2227,13 @@ var messages_priority_0 = func {
var messages_config_memo = func {
phaseVarMemo = phaseNode.getValue();
- if (getprop("/controls/flight/flaps-input") == 0 or getprop("/controls/flight/flaps-input") == 4 or pts.Controls.Flight.speedbrake.getValue() != 0 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) {
+ if (pts.Controls.Flight.flapsInput.getValue() == 0 or pts.Controls.Flight.flapsInput.getValue() == 4 or pts.Controls.Flight.speedbrake.getValue() != 0 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) {
setprop("/ECAM/to-config-normal", 0);
} else {
setprop("/ECAM/to-config-normal", 1);
}
- if (getprop("/ECAM/to-config-test") and (phaseVarMemo == 2 or phaseVarMemo == 9)) {
+ if (getprop("/ECAM/to-config-test") and (phaseVarMemo == 1 or phaseVarMemo == 2 or phaseVarMemo == 9)) {
setprop("/ECAM/to-config-set", 1);
} else {
setprop("/ECAM/to-config-set", 0);
@@ -2202,7 +2335,7 @@ var messages_config_memo = func {
ldgMemoLine3.colour = "c";
}
- if (getprop("it-fbw/law") == 1 or getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override")) {
+ if (getprop("/it-fbw/law") == 1 or getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override")) {
if (pts.Controls.Flight.flapsPos.getValue() == 4) {
ldgMemoLine4.msg = " FLAPS CONF 3";
ldgMemoLine4.colour = "g";
diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas
index 7d6e0462..a62d76a9 100644
--- a/Nasal/ECAM/ECAM-messages.nas
+++ b/Nasal/ECAM/ECAM-messages.nas
@@ -11,42 +11,33 @@
var warnings = std.Vector.new([
var stall = warning.new(msg: "", aural: 2),
- var flap_not_zero = warning.new(msg: "F/CTL FLAP LVR NOT ZERO", colour: "r", aural: 0, light: 0),
+ var flap_not_zero = warning.new(msg: "F/CTL FLAP LVR NOT ZERO", colour: "r", aural: 0, light: 0, isMainMsg: 1),
- var overspeed = warning.new(msg: "OVER SPEED", colour: "r", aural: 0, light: 0, isMainMsg: 1),
- var overspeedVMO = warning.new(msg: "-VMO/MMO.......350 /.82", colour: "r"),
- var overspeedGear = warning.new(msg: "-VLE...........280 /.67", colour: "r"),
- var overspeedFlap = warning.new(msg: "-VFE................XXX", colour: "r"),
+ var overspeed = warning.new(msg: "OVER SPEED", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var overspeedVMO = warning.new(msg: "-VMO/MMO.......350 /.82", colour: "r"),
+ var overspeedGear = warning.new(msg: "-VLE...........280 /.67", colour: "r"),
+ var overspeedFlap = warning.new(msg: "-VFE................XXX", colour: "r"),
- # DUAL ENG FAIL
- var dualFail = warning.new(msg: "ENG DUAL FAILURE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
- var dualFailModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"),
- var dualFailLevers = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
- var dualFailRelightSPD = warning.new(msg: " OPTIMUM RELIGHT SPD.280", colour: "c"),
- var dualFailRelightSPDCFM = warning.new(msg: " OPTIMUM RELIGHT SPD.300", colour: "c"),
- var dualFailElec = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
- var dualFailRadio = warning.new(msg: " -VHF1/ATC1..........USE", colour: "c"),
- var dualFailFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"),
- var dualFailRelight = warning.new(msg: "•IF NO RELIGHT AFTER 30S", colour: "w", isMainMsg: 1),
- var dualFailMasters = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c"),
- var dualFailSuccess = warning.new(msg: " •IF UNSUCCESSFUL : ", colour: "w", isMainMsg: 1),
- var dualFailAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c"),
- var dualFailAPUwing = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"),
- var dualFailAPUbleed = warning.new(msg: " -APU BLEED...........ON", colour: "c"),
- var dualFailMastersAPU = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c"),
- var dualFailSPDGD = warning.new(msg: " OPTIMUM SPEED.....G DOT", colour: "c"),
- var dualFailAPPR = warning.new(msg: " •EARLY IN APPR : ", colour: "w", isMainMsg: 1),
- var dualFailcabin = warning.new(msg: " -CAB SECURE.......ORDER", colour: "c"),
- var dualFailrudd = warning.new(msg: " -USE RUDDER WITH CARE ", colour: "c"),
- var dualFailflap = warning.new(msg: " -FOR LDG.....USE FLAP 3", colour: "c"),
- var dualFail5000 = warning.new(msg: " •AT 5000 FT AGL : ", colour: "w", isMainMsg: 1),
- var dualFailgear = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"),
- var dualFailfinalspeed = warning.new(msg: " TARGET SPEED.....150 KT", colour: "c"),
- var dualFailtouch = warning.new(msg: " •AT TOUCH DOWN : ", colour: "w", isMainMsg: 1),
- var dualFailmasteroff = warning.new(msg: " -ENG MASTERS........OFF", colour: "c"),
- var dualFailapuoff = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
- var dualFailevac = warning.new(msg: " -EVAC..........INITIATE", colour: "c"),
- var dualFailbatt = warning.new(msg: " -BAT 1+2............OFF", colour: "c"),
+ var allEngFail = warning.new(msg: "ENG ALL ENGINES FAILURE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var allEngFailElec = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
+ var allEngFailSPD1 = warning.new(msg: " OPT RELIGHT SPD.260/.77", colour: "c"),
+ var allEngFailSPD2 = warning.new(msg: " OPT RELIGHT SPD.270/.77", colour: "c"),
+ var allEngFailSPD3 = warning.new(msg: " OPT RELIGHT SPD.280/.77", colour: "c"),
+ var allEngFailSPD4 = warning.new(msg: " OPT RELIGHT SPD.300/.77", colour: "c"),
+ var allEngFailAPU = warning.new(msg: " -APU..............START", colour: "c"),
+ var allEngFailLevers = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
+ var allEngFailFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"),
+ var allEngFailGlide = warning.new(msg: " GLDG DIST: 2NM/1000FT", colour: "c"),
+ var allEngFailDiversion = warning.new(msg: " -DIVERSION.....INITIATE", colour: "c"),
+ var allEngFailProc = warning.new(msg: " -ALL ENG FAIL PROC.APPLY", colour: "c"),
+
+ # ENG 1 THR LEVER ABV IDLE
+ var eng1ThrLvrAbvIdle = warning.new(msg: "ENG 1 THR LEVER ABV IDLE", colour: "r", aural: 3, light: 0, isMainMsg: 1),
+ var eng1ThrLvrAbvIdle2 = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"),
+
+ # ENG 2 THR LEVER ABV IDLE
+ var eng2ThrLvrAbvIdle = warning.new(msg: "ENG 2 THR LEVER ABV IDLE", colour: "r", aural: 3, light: 0, isMainMsg: 1),
+ var eng2ThrLvrAbvIdle2 = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"),
# ENG 1 FIRE (flight)
var eng1Fire = warning.new(msg: "ENG 1 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
@@ -63,17 +54,13 @@ var warnings = std.Vector.new([
var eng1FireGnlever = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var eng1FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w", isMainMsg: 1),
var eng1FireGnparkbrk = warning.new(msg: " -PARKING BRK.........ON", colour: "c"),
+ var eng1FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
+ var eng1FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
var eng1FireGnmaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
var eng1FireGnPB = warning.new(msg: " -ENG 1 FIRE P/B....PUSH", colour: "c"),
var eng1FireGnAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"),
var eng1FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
- var eng1FireGnmaster2 = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
- var eng1FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
- var eng1FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
- var eng1FireGnevac = warning.new(msg: " •IF EVAC RQRD:", colour: "w", isMainMsg: 1),
- var eng1FireGnevacSw = warning.new(msg: " -EVAC COMMAND........ON", colour: "c"),
- var eng1FireGnevacApu = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
- var eng1FireGnevacBat = warning.new(msg: " -BAT 1+2............OFF", colour: "c"),
+ var eng1FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"),
# ENG 2 FIRE (flight)
var eng2Fire = warning.new(msg: "ENG 2 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
@@ -90,17 +77,13 @@ var warnings = std.Vector.new([
var eng2FireGnlever = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var eng2FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w", isMainMsg: 1),
var eng2FireGnparkbrk = warning.new(msg: " -PARKING BRK.........ON", colour: "c"),
+ var eng2FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
+ var eng2FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
var eng2FireGnmaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
var eng2FireGnPB = warning.new(msg: " -ENG 2 FIRE P/B....PUSH", colour: "c"),
var eng2FireGnAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"),
var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
- var eng2FireGnmaster2 = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
- var eng2FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
- var eng2FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
- var eng2FireGnevac = warning.new(msg: " •IF EVAC RQRD:", colour: "w", isMainMsg: 1),
- var eng2FireGnevacSw = warning.new(msg: " -EVAC COMMAND........ON", colour: "c"),
- var eng2FireGnevacApu = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
- var eng2FireGnevacBat = warning.new(msg: " -BAT 1+2............OFF", colour: "c"),
+ var eng2FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"),
# APU FIRE
var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apu"),
@@ -122,45 +105,94 @@ 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),
+ # 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"),
+ var lrElevFaultTrim = warning.new(msg: " -MAN PITCH TRIM.....USE", colour: "c"),
+ var lrElevFaultSpdBrk = warning.new(msg: " SPD BRK......DO NOT USE", colour: "c"),
+
+ # Gear not down
+ var gearNotDown = warning.new(msg: "L/G GEAR NOT DOWN", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+
+ var gearNotDownLocked = warning.new(msg: "L/G GEAR NOT DOWNLOCKED", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var gearNotDownLockedRec = warning.new(msg: " -L/G LEVER......RECYCLE", colour: "c"),
+ var gearNotDownLockedWork = warning.new(msg: " •IF UNSUCCESSFUL:", colour: "c"),
+ var gearNotDownLocked120 = warning.new(msg: " AFTER 120S:", colour: "c"),
+ var gearNotDownLockedGrav = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"),
+
# Autopilot off involuntary
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0, isMainMsg: 1),
# Cargo smoke
var cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
- var cargoSmokeFwdAgent = warning.new(msg: "-AGENT............DISCH", colour: "c"),
+ var cargoSmokeFwdAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),
var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
- var cargoSmokeAftAgent = warning.new(msg: "-AGENT............DISCH", colour: "c"),
+ var cargoSmokeAftAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),
# ESS Bus on Bat
var essBusOnBat = warning.new(msg: "ELEC ESS BUSES ON BAT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
- var essBusOnBatLGUplock = warning.new(msg: " •WHEN L/G UPLOCKED :", colour: "w"),
- var essBusOnBatManOn = warning.new(msg: "-EMER ELEC PWR...MAN ON", colour: "c"),
- var essBusOnBatRetract = warning.new(msg: " •IF L/G RETRACT FAULT:", colour: "w"),
- var essBusOnBatMinSpeed = warning.new(msg: "MIN RAT SPD......180 KT", colour: "c"),
- var essBusOnBatLGCB = warning.new(msg: "-LGCIU1 C/B (C09)..PULL", colour: "c"),
- var essBusOnBatManOn2 = warning.new(msg: "-EMER ELEC PWR...MAN ON", colour: "c"),
+ var essBusOnBatLGUplock = warning.new(msg: " •WHEN L/G UPLOCKED :", colour: "w"),
+ var essBusOnBatManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
+ var essBusOnBatRetract = warning.new(msg: " •IF L/G RETRACT FAULT:", colour: "w"),
+ var essBusOnBatMinSpeed = warning.new(msg: " MIN RAT SPD......180 KT", colour: "c"),
+ var essBusOnBatLGCB = warning.new(msg: " -LGCIU1 C/B (C09)..PULL", colour: "c"),
+ var essBusOnBatManOn2 = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
# Emer Config
var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, isMainMsg: 1),
- var emerconfigMinRat = warning.new(msg: "MIN RAT SPD......140 KT", colour: "c"),
- var emerconfigGen = warning.new(msg: "-GEN 1+2....OFF THEN ON", colour: "c"),
- var emerconfigGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
- var emerconfigBusTie = warning.new(msg: "-BUS TIE............OFF", colour: "c"),
- var emerconfigGen3 = warning.new(msg: "-GEN 1+2....OFF THEN ON", colour: "c"),
- var emerconfigManOn = warning.new(msg: "-EMER ELEC PWR...MAN ON", colour: "c"),
- var emerconfigEngMode = warning.new(msg: "-ENG MODE SEL.......IGN", colour: "c"),
- var emerconfigRadio = warning.new(msg: "-VHF1/ATC1..........USE", colour: "c"),
- var emerconfigIcing = warning.new(msg: "AVOID ICING CONDITIONS", colour: "c"),
- var emerconfigFuelG = warning.new(msg: "FUEL GRVTY FEED", colour: "c"),
- var emerconfigFuelG2 = warning.new(msg: "PROC:GRVTY FUEL FEEDING", colour: "c"),
- var emerconfigFAC = warning.new(msg: "-FAC 1......OFF THEN ON", colour: "c"),
- var emerconfigBusTie2 = warning.new(msg: "-BUS TIE...........AUTO", colour: "c"),
- var emerconfigAPU = warning.new(msg: "-APU (IF AVAIL)...START", colour: "c"),
- var emerconfigVent = warning.new(msg: "-BLOWER + EXTRACT..OVRD", colour: "c"),
+ var emerconfigMinRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"),
+ var emerconfigGen = warning.new(msg: " -GEN 1+2....OFF THEN ON", colour: "c"),
+ var emerconfigGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
+ var emerconfigBusTie = warning.new(msg: " -BUS TIE............OFF", colour: "c"),
+ var emerconfigGen3 = warning.new(msg: " -GEN 1+2....OFF THEN ON", colour: "c"),
+ var emerconfigManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
+ var emerconfigEngMode = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"),
+ var emerconfigRadio = warning.new(msg: " -VHF1/ATC1..........USE", colour: "c"),
+ var emerconfigIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"),
+ var emerconfigFuelG = warning.new(msg: " FUEL GRVTY FEED", colour: "c"),
+ var emerconfigFuelG2 = warning.new(msg: " PROC:GRVTY FUEL FEEDING", colour: "c"),
+ var emerconfigFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"),
+ var emerconfigBusTie2 = warning.new(msg: " -BUS TIE...........AUTO", colour: "c"),
+ var emerconfigAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c"),
+ var emerconfigVent = warning.new(msg: " -BLOWER + EXTRACT..OVRD", colour: "c"),
var emerconfigAltn = warning.new(msg: "F/CTL ALTN LAW", colour: "a"),
var emerconfigProt = warning.new(msg: " (PROT LOST)", colour: "a"),
var emerconfigMaxSpeed = warning.new(msg: " MAX SPEED........320 KT", colour: "c"),
+ # B + Y LO PR
+ var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var hydBYloPrRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"),
+ var hydBYloPrYElec = warning.new(msg: " -YELLOW ELEC PUMP....ON", colour: "c"),
+ var hydBYloPrRatOn = warning.new(msg: " -RAT.............MAN ON", colour: "c"),
+ var hydBYloPrBElec = warning.new(msg: " -BLUE ELEC PUMP.....OFF", colour: "c"),
+ var hydBYloPrYEng = warning.new(msg: " -YELLOW ENG 2 PUMP..OFF", colour: "c"),
+ var hydBYloPrMaxSpd = warning.new(msg: " MAX SPEED.......320/.77", colour: "c"),
+ var hydBYloPrMnvrCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
+ var hydBYloPrGaPitch = warning.new(msg: " FOR GA:MAX PITCH 15 DEG", colour: "c"),
+ var hydBYloPrFuelCnsmpt = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"),
+ var hydBYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
+
+ # G + B LO PR
+ var hydGBloPr = warning.new(msg: "HYD G+B SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var hydGBloPrRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"),
+ var hydGBloPrRatOn = warning.new(msg: " -RAT.............MAN ON", colour: "c"),
+ var hydGBloPrBElec = warning.new(msg: " -BLUE ELEC PUMP.....OFF", colour: "c"),
+ var hydGBloPrGEng = warning.new(msg: " -GREEN ENG 1 PUMP...OFF", colour: "c"),
+ var hydGBloPrMnvrCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
+ var hydGBloPrGaPitch = warning.new(msg: " FOR GA:MAX PITCH 15 DEG", colour: "c"),
+ var hydGBloPrFuelCnsmpt = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"),
+ var hydGBloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
+
+ # G + Y LO PR
+ var hydGYloPr = warning.new(msg: "HYD G+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
+ var hydGYloPrPtu = warning.new(msg: " -PTU................OFF", colour: "c"),
+ var hydGYloPrGEng = warning.new(msg: " -GREEN ENG 1 PUMP...OFF", colour: "c"),
+ var hydGYloPrYEng = warning.new(msg: " -YELLOW ENG 2 PUMP..OFF", colour: "c"),
+ var hydGYloPrYElec = warning.new(msg: " -YELLOW ELEC PUMP....ON", colour: "c"),
+ var hydGYloPrMnvrCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
+ var hydGYloPrFuelCnsmpt = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"),
+ var hydGYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
+
# DC EMER CONFIG
var dcEmerconfig = warning.new(msg: "ELEC DC EMER CONFIG", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var dcEmerconfigManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas
index 9eebf749..c56b7f8e 100644
--- a/Nasal/Libraries/property-tree-setup.nas
+++ b/Nasal/Libraries/property-tree-setup.nas
@@ -26,6 +26,7 @@ var Controls = {
firePb: [props.globals.getNode("/controls/engines/engine[0]/fire-btn"), props.globals.getNode("/controls/engines/engine[1]/fire-btn")],
throttle: [props.globals.getNode("/controls/engines/engine[0]/throttle"), props.globals.getNode("/controls/engines/engine[1]/throttle")],
throttleFdm: [props.globals.getNode("/controls/engines/engine[0]/throttle-fdm"), props.globals.getNode("/controls/engines/engine[1]/throttle-fdm")],
+ throttleLever: [props.globals.getNode("/controls/engines/engine[0]/throttle-lever"), props.globals.getNode("/controls/engines/engine[1]/throttle-lever")],
throttleOutput: [props.globals.getNode("/controls/engines/engine[0]/throttle-output"), props.globals.getNode("/controls/engines/engine[1]/throttle-output")],
throttlePos: [props.globals.getNode("/controls/engines/engine[0]/throttle-pos"), props.globals.getNode("/controls/engines/engine[1]/throttle-pos")],
throttleRev: [props.globals.getNode("/controls/engines/engine[0]/throttle-rev"), props.globals.getNode("/controls/engines/engine[1]/throttle-rev")],
@@ -39,6 +40,7 @@ var Controls = {
elevatorTrim: props.globals.getNode("/controls/flight/elevator-trim"),
flaps: props.globals.getNode("/controls/flight/flaps"),
flapsTemp: 0,
+ flapsInput: props.globals.getNode("/controls/flight/flaps-input"),
flapsPos: props.globals.getNode("/controls/flight/flaps-pos"),
speedbrake: props.globals.getNode("/controls/flight/speedbrake"),
speedbrakeArm: props.globals.getNode("/controls/flight/speedbrake-arm"),
diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas
index 3e3eb097..97754a25 100644
--- a/Nasal/MCDU/MCDU.nas
+++ b/Nasal/MCDU/MCDU.nas
@@ -355,6 +355,8 @@ var lskbutton = func(btn, i) {
pageNode[i].setValue("DATAMODE");
} else if (page == "RECEIVEDMSGS") {
canvas_mcdu.myReceivedMessages[i].leftKey(2);
+ } else if (page == "DATAMODE") {
+ atsu.ATIS.server = 0;
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -408,6 +410,8 @@ var lskbutton = func(btn, i) {
pageNode[i].setValue("VOICEDIRECTORY");
} else if (page == "RECEIVEDMSGS") {
canvas_mcdu.myReceivedMessages[i].leftKey(3);
+ } else if (page == "DATAMODE") {
+ atsu.ATIS.server = 1;
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -693,6 +697,8 @@ var rskbutton = func(btn, i) {
pageNode[i].setValue("COMPANYCALL");
} else if (page == "AOCMENU") {
pageNode[i].setValue("WEATHERREQ");
+ } else if (page == "DATAMODE") {
+ atsu.AOC.server = 0;
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -730,6 +736,8 @@ var rskbutton = func(btn, i) {
canvas_mcdu.myReceivedMessages[i] = nil;
canvas_mcdu.myReceivedMessages[i] = receivedMessagesPage.new(i);
pageNode[i].setValue("RECEIVEDMSGS");
+ } else if (page == "DATAMODE") {
+ atsu.AOC.server = 1;
} else {
mcdu_message(i, "NOT ALLOWED");
}
diff --git a/Nasal/Systems/Comm/Notification.nas b/Nasal/Systems/Comm/Notification.nas
index 15b195a4..642a5386 100644
--- a/Nasal/Systems/Comm/Notification.nas
+++ b/Nasal/Systems/Comm/Notification.nas
@@ -2,6 +2,10 @@
# Jonathan Redpath
# Copyright (c) 2020 Josh Davidson (Octal450)
+var defaultServer = "https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&mostRecent=true&hoursBeforeNow=12&stationString=";
+var serverString = "";
+var result = nil;
+
var ATSU = {
working: 0,
loop: func() {
@@ -93,13 +97,14 @@ var CompanyCall = {
var AOC = {
station: nil,
- selectedType: "HOURLY WX", # 0 = METAR 1 = TAF
+ selectedType: "HOURLY WX",
lastMETAR: nil,
lastTAF: nil,
sent: 0,
sentTime: nil,
received: 0,
receivedTime: nil,
+ server: 0, # 0 = noaa, 1 = vatsim
newStation: func(airport) {
if (size(airport) == 3 or size(airport) == 4) {
if (size(findAirportsByICAO(airport)) == 0) {
@@ -152,8 +157,19 @@ var AOC = {
me.sent = 0;
return 1;
}
- http.load("https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&mostRecent=true&hoursBeforeNow=12&stationString=" ~ airport)
- .fail(func print("Download failed!"))
+
+ serverString = "";
+
+ if (me.server == 0) {
+ serverString = defaultServer;
+ } elsif (me.server == 1) {
+ serverString = "https://api.flybywiresim.com/metar?source=vatsim&icao=";
+ } else { # fall back to NOAA silently
+ serverString = defaultServer;
+ }
+
+ http.load(serverString ~ airport)
+ .fail(func(r) print("Download failed; try changing your server to NOAA"))
.done(func(r) me.processMETAR(r, i));
return 0;
},
@@ -201,4 +217,89 @@ var AOC = {
mcdu.ReceivedMessagesDatabase.addMessage(message);
}, math.max(rand()*6, 2.25));
},
+};
+
+var ATIS = {
+ station: nil,
+ lastATIS: nil,
+ sent: 0,
+ sentTime: nil,
+ received: 0,
+ receivedTime: nil,
+ server: 0,
+ newStation: func(airport) {
+ if (size(airport) == 3 or size(airport) == 4) {
+ if (size(findAirportsByICAO(airport)) == 0) {
+ return 2;
+ } else {
+ me.station = airport;
+ return 0;
+ }
+ } else {
+ return 1;
+ }
+ },
+ sendReq: func(i) {
+ if (me.station == nil or (me.sent and !me.received)) {
+ return 1;
+ }
+ me.sent = 1;
+ me.received = 0;
+ var sentTime = left(getprop("/sim/time/gmt-string"), 5);
+ me.sentTime = split(":", sentTime)[0] ~ "." ~ split(":", sentTime)[1] ~ "Z";
+
+ result = me.fetchATIS(atsu.ATIS.station, i);
+ if (result == 0) {
+ return 0;
+ } elsif (result == 1) {
+ return 3;
+ } elsif (result == 2) {
+ return 4;
+ }
+ },
+ fetchATIS: func(airport, i) {
+ if (!ATSU.working) {
+ me.sent = 0;
+ return 2;
+ }
+ if (ecam.vhf3_voice.active) {
+ me.sent = 0;
+ return 1;
+ }
+
+ serverString = "";
+
+ if (me.server == 0) {
+ serverString = "https://api.flybywiresim.com/atis?source=faa&icao=";
+ } elsif (me.server == 1) {
+ serverString = "https://api.flybywiresim.com/atis?source=vatsim&icao=";
+ } else { # fall back to FAA silently
+ serverString = "https://api.flybywiresim.com/atis?source=faa&icao=";
+ }
+
+ http.load(serverString ~ airport)
+ .fail(func(r) return 3)
+ .done(func(r) me.processATIS(r, i));
+ return 0;
+ },
+ processATIS: func(r, i) {
+ var raw = r.response;
+ if (find("combined", raw)) {
+ raw = split('{"combined":"', raw)[1];
+ raw = split('"}', raw)[0];
+ } else {
+ raw = split('{"arr":"', raw)[1];
+ raw = split('","dep":', raw)[0];
+ }
+ me.lastATIS = raw;
+ settimer(func() {
+ me.received = 1;
+ mcdu.mcdu_message(i, "WX UPLINK");
+
+ var receivedTime = left(getprop("/sim/time/gmt-string"), 5);
+ me.receivedTime = split(":", receivedTime)[0] ~ "." ~ split(":", receivedTime)[1] ~ "Z";
+ var message = mcdu.ACARSMessage.new(me.receivedTime, me.lastATIS);
+ mcdu.ReceivedMessagesDatabase.addMessage(message);
+ }, math.max(rand()*10, 2.25));
+ },
};
\ No newline at end of file
diff --git a/Nasal/Systems/FADEC/engines-cfm.nas b/Nasal/Systems/FADEC/engines-cfm.nas
index ec450cde..eb84b081 100644
--- a/Nasal/Systems/FADEC/engines-cfm.nas
+++ b/Nasal/Systems/FADEC/engines-cfm.nas
@@ -25,7 +25,7 @@ var eng_init = func {
# Trigger Startups and Stops
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
- if (getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
fast_start_one();
} else {
@@ -35,7 +35,7 @@ setlistener("/controls/engines/engine[0]/cutoff-switch", func {
eng_one_man_start.start();
}
}
- } else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
+ } else if (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1) {
cutoff_one();
}
});
@@ -75,7 +75,7 @@ setlistener("/controls/engines/engine[0]/man-start", func {
var start_one_mancheck = func {
if (getprop("/controls/engines/engine[0]/man-start") == 1) {
- if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1)) {
setprop("/systems/pneumatics/valves/starter-valve-1", 1);
settimer(start_one_mancheck_b, 0.5);
}
@@ -96,20 +96,20 @@ var start_one_mancheck_b = func {
}
var start_one_check = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
setprop("/systems/pneumatics/valves/starter-valve-1", 1);
settimer(start_one_check_b, 0.5);
}
}
var start_one_check_b = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !getprop("/controls/engines/engine[0]/cutoff-switch")) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
auto_start_one();
}
}
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
- if (getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
fast_start_two();
} else {
@@ -119,7 +119,7 @@ setlistener("/controls/engines/engine[1]/cutoff-switch", func {
eng_two_man_start.start();
}
}
- } else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
+ } else if (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1) {
cutoff_two();
}
});
@@ -158,7 +158,7 @@ setlistener("/controls/engines/engine[1]/man-start", func {
var start_two_mancheck = func {
if (getprop("/controls/engines/engine[1]/man-start") == 1) {
- if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1)) {
setprop("/systems/pneumatics/valves/starter-valve-2", 1);
settimer(start_two_mancheck_b, 0.5);
}
@@ -179,14 +179,14 @@ var start_two_mancheck_b = func {
}
var start_two_check = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
setprop("/systems/pneumatics/valves/starter-valve-2", 1);
settimer(start_two_check_b, 0.5);
}
}
var start_two_check_b = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !getprop("/controls/engines/engine[1]/cutoff-switch")) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
auto_start_two();
}
}
diff --git a/Nasal/Systems/FADEC/engines-iae.nas b/Nasal/Systems/FADEC/engines-iae.nas
index 27a74738..784841a6 100644
--- a/Nasal/Systems/FADEC/engines-iae.nas
+++ b/Nasal/Systems/FADEC/engines-iae.nas
@@ -25,7 +25,7 @@ var eng_init = func {
# Trigger Startups and Stops
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
- if (getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
fast_start_one();
} else {
@@ -35,7 +35,7 @@ setlistener("/controls/engines/engine[0]/cutoff-switch", func {
eng_one_man_start.start();
}
}
- } else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
+ } else if (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1) {
cutoff_one();
}
});
@@ -75,7 +75,7 @@ setlistener("/controls/engines/engine[0]/man-start", func {
var start_one_mancheck = func {
if (getprop("/controls/engines/engine[0]/man-start") == 1) {
- if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1)) {
setprop("/systems/pneumatics/valves/starter-valve-1", 1);
settimer(start_one_mancheck_b, 0.5);
}
@@ -96,20 +96,20 @@ var start_one_mancheck_b = func {
}
var start_one_check = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
setprop("/systems/pneumatics/valves/starter-valve-1", 1);
settimer(start_one_check_b, 0.5);
}
}
var start_one_check_b = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !getprop("/controls/engines/engine[0]/cutoff-switch")) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
auto_start_one();
}
}
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
- if (getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
fast_start_two();
} else {
@@ -119,7 +119,7 @@ setlistener("/controls/engines/engine[1]/cutoff-switch", func {
eng_two_man_start.start();
}
}
- } else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
+ } else if (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1) {
cutoff_two();
}
});
@@ -158,7 +158,7 @@ setlistener("/controls/engines/engine[1]/man-start", func {
var start_two_mancheck = func {
if (getprop("/controls/engines/engine[1]/man-start") == 1) {
- if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1)) {
setprop("/systems/pneumatics/valves/starter-valve-2", 1);
settimer(start_two_mancheck_b, 0.5);
}
@@ -179,14 +179,14 @@ var start_two_mancheck_b = func {
}
var start_two_check = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
setprop("/systems/pneumatics/valves/starter-valve-2", 1);
settimer(start_two_check_b, 0.5);
}
}
var start_two_check_b = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !getprop("/controls/engines/engine[1]/cutoff-switch")) {
+ if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
auto_start_two();
}
}
diff --git a/Nasal/Systems/fire.nas b/Nasal/Systems/fire.nas
index 89044210..433e6335 100644
--- a/Nasal/Systems/fire.nas
+++ b/Nasal/Systems/fire.nas
@@ -630,7 +630,7 @@ eng2Agent2TimerMakeTimerFunc = func() {
}
setlistener("/controls/apu/fire-btn", func() {
- if (getprop("/controls/apu/fire-btn") == 1) {
+ if (systems.APUNodes.Controls.fire.getValue() == 1) {
ecam.shutUpYou();
systems.APUController.APU.emergencyStop();
apuAgentTimerMakeTimer.stop();
diff --git a/Nasal/Systems/hydraulics.nas b/Nasal/Systems/hydraulics.nas
index 7fee62d6..3cd48602 100644
--- a/Nasal/Systems/hydraulics.nas
+++ b/Nasal/Systems/hydraulics.nas
@@ -34,10 +34,16 @@ var HYD = {
active: props.globals.getNode("/systems/hydraulic/sources/ptu/ptu-hydraulic-condition"),
diff: props.globals.getNode("/systems/hydraulic/yellow-psi-diff"),
},
+ Pump: {
+ yellowElec: props.globals.getNode("/systems/hydraulic/sources/yellow-elec/pump-operate"),
+ },
Qty: {
blueInput: props.globals.initNode("/systems/hydraulic/blue-qty-input", 0, "INT"),
+ blue: props.globals.getNode("/systems/hydraulic/blue-qty"),
greenInput: props.globals.initNode("/systems/hydraulic/green-qty-input", 0, "INT"),
+ green: props.globals.getNode("/systems/hydraulic/green-qty"),
yellowInput: props.globals.initNode("/systems/hydraulic/yellow-qty-input", 0, "INT"),
+ yellow: props.globals.getNode("/systems/hydraulic/yellow-qty"),
},
Rat: {
position: props.globals.getNode("/systems/hydraulic/sources/rat/position"),
diff --git a/Nasal/Systems/pneumatics.nas b/Nasal/Systems/pneumatics.nas
index d6f23d57..9587c486 100644
--- a/Nasal/Systems/pneumatics.nas
+++ b/Nasal/Systems/pneumatics.nas
@@ -115,8 +115,8 @@ var PNEU = {
setprop("/systems/pressurization/outflowpos-man", "0.5");
setprop("/systems/pressurization/outflowpos-man-sw", "0");
setprop("/systems/pressurization/outflowpos-norm-cmd", "0");
- setprop("/systems/pressurization/cabinalt", getprop("instrumentation/altimeter/indicated-altitude-ft"));
- setprop("/systems/pressurization/targetalt", getprop("instrumentation/altimeter/indicated-altitude-ft"));
+ setprop("/systems/pressurization/cabinalt", pts.Instrumentation.Altimeter.indicatedFt.getValue());
+ setprop("/systems/pressurization/targetalt", pts.Instrumentation.Altimeter.indicatedFt.getValue());
setprop("/systems/pressurization/diff-to-target", "0");
setprop("/systems/pressurization/ditchingpb", 0);
setprop("/systems/pressurization/targetvs", "0");
diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml
index e93408c2..e98ce503 100644
--- a/Sounds/A320-common-sound.xml
+++ b/Sounds/A320-common-sound.xml
@@ -935,6 +935,21 @@
100.0
+
+ retard2
+ Aircraft/A320-family/Sounds/GPWS/retard.wav
+ looped
+
+ /sim/sound/warnings/retard
+
+
+ /sim/current-view/internal
+ 8.0
+
+ 20.0
+ 100.0
+
+
apoff-looped
looped
diff --git a/Systems/a320-fcs.xml b/Systems/a320-fcs.xml
index 6f189fa6..37de4aa2 100644
--- a/Systems/a320-fcs.xml
+++ b/Systems/a320-fcs.xml
@@ -857,8 +857,15 @@
+
+
+
+ /systems/failures/gear eq 1
+
+
+
- gear/gear-cmd-norm
+ gear/gear-cmd-switch
0
diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml
index da23cdd9..b2f6b8dd 100644
--- a/Systems/a320-fwc.xml
+++ b/Systems/a320-fwc.xml
@@ -8,367 +8,367 @@
- Timer for the ECAM system
- /ECAM/phases/timer/eng1idle
- 100
- 0.033
-
+ Timer for the ECAM system
+ /ECAM/phases/timer/eng1idle
+ 100
+ 0.033
+
- Timer for the ECAM system
- /ECAM/phases/timer/eng2idle
- 100
- 0.033
-
+ Timer for the ECAM system
+ /ECAM/phases/timer/eng2idle
+ 100
+ 0.033
+
- Timer for the ECAM system
- /ECAM/phases/timer/eng1or2
- 100
- 0.033
-
+ Timer for the ECAM system
+ /ECAM/phases/timer/eng1or2
+ 100
+ 0.033
+
- Timer for the ECAM system
- /ECAM/phases/timer/to-inhibit
- 100
- 0.33
-
+ Timer for the ECAM system
+ /ECAM/phases/timer/to-inhibit
+ 100
+ 0.33
+
- Timer for the ECAM system
- /ECAM/phases/timer/ldg-inhibit
- 100
- 0.33
-
+ Timer for the ECAM system
+ /ECAM/phases/timer/ldg-inhibit
+ 100
+ 0.33
+
- Timer for the ECAM system
- /ECAM/warnings/timer/bleed-1-fault
- 100
- 0.2
-
+ Timer for the ECAM system
+ /ECAM/warnings/timer/bleed-1-fault
+ 100
+ 0.2
+
- Timer for the ECAM system
- /ECAM/warnings/timer/bleed-2-fault
- 100
- 0.2
-
+ Timer for the ECAM system
+ /ECAM/warnings/timer/bleed-2-fault
+ 100
+ 0.2
+
- Timer for the ECAM system
- /ECAM/warnings/logic/apu-bleed-fault
- 100
- 0.1
-
+ Timer for the ECAM system
+ /ECAM/warnings/logic/apu-bleed-fault
+ 100
+ 0.1
+
- Timer for the ECAM system
- /systems/pneumatics/warnings/crossbleed-disag
- 100
- 0.1
-
+ Timer for the ECAM system
+ /systems/pneumatics/warnings/crossbleed-disag
+ 100
+ 0.1
+
- Timer for the ECAM system
- /ECAM/warnings/logic/prv-1-not-shut-apu
- 100
- 1
-
+ Timer for the ECAM system
+ /ECAM/warnings/logic/prv-1-not-shut-apu
+ 100
+ 1
+
- Timer for the ECAM system
- /ECAM/warnings/logic/prv-2-not-shut-apu
- 100
- 1
-
+ Timer for the ECAM system
+ /ECAM/warnings/logic/prv-2-not-shut-apu
+ 100
+ 1
+
- Timer for the ECAM system
- /ECAM/warnings/logic/prv-1-not-shut
- 100
- 1
-
+ Timer for the ECAM system
+ /ECAM/warnings/logic/prv-1-not-shut
+ 100
+ 1
+
- Timer for the ECAM system
- /ECAM/warnings/logic/prv-2-not-shut
- 100
- 1
-
+ Timer for the ECAM system
+ /ECAM/warnings/logic/prv-2-not-shut
+ 100
+ 1
+
- Timer for the ECAM system
- /ECAM/warnings/timer/bleed-1-and-2-low-temp
- 100
- 0.00185185
-
+ Timer for the ECAM system
+ /ECAM/warnings/timer/bleed-1-and-2-low-temp
+ 100
+ 0.00185185
+
- Timer for the ECAM system
- /systems/pneumatics/warnings/lowtemp-1-mem
- 100
- 0.016666
-
+ Timer for the ECAM system
+ /systems/pneumatics/warnings/lowtemp-1-mem
+ 100
+ 0.016666
+
- Timer for the ECAM system
- /systems/pneumatics/warnings/lowtemp-2-mem
- 100
- 0.016666
-
+ Timer for the ECAM system
+ /systems/pneumatics/warnings/lowtemp-2-mem
+ 100
+ 0.016666
+
- Timer for the ECAM system
- /ECAM/warnings/logic/bleed-1-off-60
- 100
- 0.016666
-
+ Timer for the ECAM system
+ /ECAM/warnings/logic/bleed-1-off-60
+ 100
+ 0.016666
+
- Timer for the ECAM system
- /ECAM/warnings/logic/bleed-2-off-60
- 100
- 0.016666
-
+ Timer for the ECAM system
+ /ECAM/warnings/logic/bleed-2-off-60
+ 100
+ 0.016666
+
- Timer for the ECAM system
- /ECAM/warnings/logic/bleed-1-off-5
- 100
- 0.2
-
+ Timer for the ECAM system
+ /ECAM/warnings/logic/bleed-1-off-5
+ 100
+ 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/bleed-2-off-5
+ 100
+ 0.2
+
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/eng-aice-1-open
- 100
- 0.2
+ 100
+ 0.2
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/eng-aice-2-open
- 100
- 0.2
+ 100
+ 0.2
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/eng-aice-1-closed
- 100
- 0.1
+ 100
+ 0.1
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/eng-aice-2-closed
- 100
- 0.1
+ 100
+ 0.1
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/wing-anti-ice-flipflop-set-input
- 100
- 0.0285714
+ 100
+ 0.0285714
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/timer/phase-1-input
- 100
- 0.5
+ 100
+ 0.5
- Timer for the ECAM system
+ Timer for the ECAM system
/controls/ice-protection/wing
- 100
- 0.04
+ 100
+ 0.04
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/wing-anti-ice-left-closed-set-input
- 100
- 0.066666
+ 100
+ 0.066666
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/wing-anti-ice-right-closed-set-input
- 100
- 0.066666
+ 100
+ 0.066666
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/proc-wai-shutdown-flipflop
- 100
- 0.1
+ 100
+ 0.1
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/wing-hi-pr-left-input
- 100
- 0.025
+ 100
+ 0.025
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/wing-hi-pr-right-input
- 100
- 0.025
+ 100
+ 0.025
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/cranking-35-sec-input
- 100
- 0.028571
+ 100
+ 0.028571
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/pack-1-fault-closed-input
- 100
- 0.1
+ 100
+ 0.1
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/pack-2-fault-closed-input
- 100
- 0.1
+ 100
+ 0.1
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/pack-1-disagree-input
- 100
- 0.1
+ 100
+ 0.1
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/pack-2-disagree-input
- 100
- 0.1
+ 100
+ 0.1
- Timer for the ECAM system
+ Timer for the ECAM system
/ECAM/warnings/logic/ignition
- 100
- 0.028571
+ 100
+ 0.028571
Timer for the ECAM system
/ECAM/warnings/logic/pack-1-fault-input
- 100
- 0.20
+ 100
+ 0.20
Timer for the ECAM system
/ECAM/warnings/logic/pack-2-fault-input
- 100
- 0.20
+ 100
+ 0.20
Timer for the ECAM system
/ECAM/warnings/logic/pack-1-fault-warning-input
- 100
- 0.50
+ 100
+ 0.50
Timer for the ECAM system
/ECAM/warnings/logic/pack-2-fault-warning-input
- 100
- 0.50
+ 100
+ 0.50
Timer for the ECAM system
/ECAM/warnings/logic/pack-1-off-input
- 100
- 0.0166666
+ 100
+ 0.0166666
Timer for the ECAM system
/ECAM/warnings/logic/pack-2-off-input
- 100
- 0.0166666
+ 100
+ 0.0166666
Timer for the ECAM system
/ECAM/warnings/logic/trim-air-fault-input
- 100
- 0.2
+ 100
+ 0.2
Timer for the ECAM system
/ECAM/warnings/logic/yaw-damper-1-fault
- 100
- 0.2
+ 100
+ 0.2
Timer for the ECAM system
/ECAM/warnings/logic/yaw-damper-2-fault
- 100
- 0.2
+ 100
+ 0.2
Timer for the ECAM system
/ECAM/warnings/logic/nav-gpws-terr-fault
- 100
- 1.0
+ 100
+ 1.0
Timer for the ECAM system
/ECAM/warnings/logic/gen-1-fault-set
- 100
- 0.1818
+ 100
+ 0.1818
Timer for the ECAM system
/ECAM/warnings/logic/gen-2-fault-set
- 100
- 0.1818
+ 100
+ 0.1818
Timer for the ECAM system
/ECAM/warnings/logic/apu-gen-fault-set
- 100
- 0.2
+ 100
+ 0.2
Timer for the ECAM system
/ECAM/warnings/logic/apu-gen-fault-reset
- 100
- 0.5
+ 100
+ 0.5
@@ -1375,7 +1375,7 @@
/systems/hydraulic/green-psi lt 1500
- /ECAM/warning-phase eq 1
+ /ECAM/warning-phase ne 1
@@ -1420,7 +1420,7 @@
/systems/hydraulic/yellow-psi lt 1500
- /ECAM/warning-phase eq 1
+ /ECAM/warning-phase ne 1
@@ -1516,8 +1516,8 @@
/systems/electrical/relay/gen-1-glc/contact-pos
- 100
- 0.5
+ 100
+ 0.5
@@ -1577,8 +1577,8 @@
/systems/electrical/relay/gen-2-glc/contact-pos
- 100
- 0.5
+ 100
+ 0.5
@@ -1662,4 +1662,716 @@
+
+
+
+
+
+
+ /ECAM/warnings/logic/stall/phase-8-output eq 0
+ /ECAM/warning-phase eq 7
+
+
+ /ECAM/warnings/logic/stall/phase-4-output eq 0
+ /ECAM/warning-phase eq 5
+
+
+
+
+
+
+
+ /ECAM/warning-phase eq 4
+
+
+
+
+
+
+ /ECAM/warning-phase eq 5
+
+
+
+
+
+
+ /ECAM/warning-phase eq 8
+
+
+
+
+
+
+ /ECAM/warnings/logic/stall/phase-5-output eq 0
+ /ECAM/warning-phase eq 6
+
+
+
+
+
+
+ /instrumentation/radar-altimeter[0]/radar-altitude-ft lt 1500
+ /instrumentation/radar-altimeter[1]/radar-altitude-ft lt 1500
+
+ /ECAM/warnings/logic/stall/phase-flipflop eq 1
+
+
+
+
+
+
+
+
+ /fdm/jsbsim/fcs/slat-pos-deg lt 15
+
+ /systems/navigation/adr/output/aoa-1 ge 15
+ /systems/navigation/adr/output/aoa-2 ge 15
+ /systems/navigation/adr/output/aoa-3 ge 15
+
+
+
+ /fdm/jsbsim/fcs/slat-pos-deg ge 15
+
+ /systems/navigation/adr/output/aoa-1 ge 23
+ /systems/navigation/adr/output/aoa-2 ge 23
+ /systems/navigation/adr/output/aoa-3 ge 23
+
+
+
+
+
+ /systems/navigation/adr/operating-1 eq 1
+ /systems/navigation/adr/operating-2 eq 1
+ /systems/navigation/adr/operating-3 eq 1
+
+
+
+
+
+
+
+
+ /ECAM/warning-phase eq 5
+ /ECAM/warning-phase eq 6
+ /ECAM/warning-phase eq 7
+
+ /ECAM/warnings/logic/stall/stall-warn eq 1
+ /ECAM/warnings/logic/stall/stall-warn-inhibit eq 0
+
+
+
+
+
+
+
+
+
+
+ /fdm/jsbsim/spoilers/max-spoiler eq 1
+ /fdm/jsbsim/spoilers/main-cmd gt 0
+
+
+
+
+ /ECAM/warnings/logic/eng/ground-spoilers
+ 100
+ 2
+
+
+
+
+
+ /ECAM/timer/ground-calc eq 0
+ /ECAM/warning-phase eq 6
+ /ECAM/warning-phase eq 7
+ /ECAM/warnings/logic/eng/ground-spoilers-output eq 1
+ /ECAM/phases/monostable/phase-8-output eq 1
+
+
+
+
+
+
+ /controls/engines/engine[0]/throttle-lever ge 0.13333333333
+
+
+
+
+
+
+ /controls/engines/engine[0]/throttle-lever ge 0.13333333333
+ /ECAM/phases/to-power-set eq 0
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-1-tla-abv-6
+ 100
+ 1
+
+
+
+ /ECAM/warnings/logic/eng/eng-1-tla-abv-6-2
+ 100
+ 1
+
+
+
+
+
+ /controls/engines/engine[0]/throttle-lever lt 0.055
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-1-tla-idle
+ 100
+ 1
+
+
+
+
+
+ /engines/engine[0]/reverser-pos-norm gt 0
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-1-reverse
+ 100
+ 1
+
+
+
+
+
+ /controls/engines/engine[1]/throttle-lever ge 0.13333333333
+
+
+
+
+
+
+ /controls/engines/engine[1]/throttle-lever ge 0.13333333333
+ /ECAM/phases/to-power-set eq 0
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-2-tla-abv-6
+ 100
+ 1
+
+
+
+ /ECAM/warnings/logic/eng/eng-2-tla-abv-6-2
+ 100
+ 1
+
+
+
+
+
+ /controls/engines/engine[1]/throttle-lever lt 0.055
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-2-tla-idle
+ 100
+ 1
+
+
+
+
+
+ /engines/engine[1]/reverser-pos-norm gt 0
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-2-reverse
+ 100
+ 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
+
+ /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
+
+
+
+
+
+
+
+
+ /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
+
+
+
+
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1
+ /engines/engine[0]/state eq 3
+ /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
+
+
+
+
+
+
+
+
+ /ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1
+ /engines/engine[0]/state eq 3
+ /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
+
+
+
+
+
+
+
+
+ /ECAM/warnings/logic/eng/ground-retard eq 1
+ /velocities/groundspeed-kt gt 40
+
+ /ECAM/warnings/logic/eng/eng-1-retard-case-1 eq 1
+ /ECAM/warnings/logic/eng/eng-1-retard-case-2 eq 1
+
+
+
+
+
+
+
+ /ECAM/warnings/logic/eng/ground-retard eq 0
+
+ /ECAM/warnings/logic/eng/eng-1-retard-case-1 eq 0
+ /ECAM/warnings/logic/eng/eng-1-retard-case-2 eq 0
+
+
+
+
+
+
+
+ /ECAM/warnings/logic/eng/ground-retard eq 1
+ /velocities/groundspeed-kt gt 40
+
+ /ECAM/warnings/logic/eng/eng-2-retard-case-1 eq 1
+ /ECAM/warnings/logic/eng/eng-2-retard-case-2 eq 1
+
+
+
+
+
+
+
+ /ECAM/warnings/logic/eng/ground-retard eq 0
+
+ /ECAM/warnings/logic/eng/eng-2-retard-case-1 eq 0
+ /ECAM/warnings/logic/eng/eng-2-retard-case-2 eq 0
+
+
+
+
+
+
+
+
+
+
+
+ /ECAM/warning-phase eq 3
+ /controls/gear/brake-parking eq 1
+
+
+
+
+
+
+ /controls/gear/brake-parking eq 0
+ /ECAM/warning-phase eq 5
+
+
+
+
+
+
+
+
+
+
+ /ECAM/warning-phase ne 1
+ /ECAM/warning-phase ne 10
+
+ hydraulics/elevator-l/pressure-switch-or eq 0
+ /systems/failures/elevator-left eq 1
+
+
+ hydraulics/elevator-r/pressure-switch-or eq 0
+ /systems/failures/elevator-right eq 1
+
+
+
+
+
+ /ECAM/warnings/fctl/lrElevFault
+ 100
+ 3.33333333333
+
+
+
+
+
+
+ /instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750
+ /instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750
+
+ /ECAM/phases/to-power-set eq 0
+
+ fcs/slat-pos-deg gt 16
+ fcs/flap-pos-deg gt 18
+
+
+ /gear/gear[0]/position-norm ne 1
+ /gear/gear[1]/position-norm ne 1
+ /gear/gear[2]/position-norm ne 1
+
+
+
+
+
+
+
+ /ECAM/warnings/fctl/gear-not-down-not-cancellable ne 1
+ /instrumentation/altimeter[0]/indicated-altitude-ft lt 18500
+
+
+ /engines/engine[0]/n1-actual lt 75
+ /engines/engine[1]/n1-actual lt 75
+
+
+ /engines/engine[0]/n1-actual lt 97
+ /controls/engines/engine[1]/cutoff-switch eq 1
+
+
+ /engines/engine[1]/n1-actual lt 97
+ /controls/engines/engine[0]/cutoff-switch eq 1
+
+
+
+ /instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750
+ /instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750
+
+ /ECAM/phases/to-power-set eq 0
+
+ /gear/gear[0]/position-norm ne 1
+ /gear/gear[1]/position-norm ne 1
+ /gear/gear[2]/position-norm ne 1
+
+
+
+
+
+
+
+ /controls/gear/gear-down eq 1
+
+ /ECAM/warning-phase eq 6
+ /ECAM/warning-phase eq 7
+
+
+
+
+
+
+
+ /ECAM/warnings/fctl/gear-lever-down-pulse eq 1
+ /ECAM/warnings/fctl/gear-lever-down eq 1
+
+ /gear/gear[0]/position-norm ne 1
+ /gear/gear[1]/position-norm ne 1
+ /gear/gear[2]/position-norm ne 1
+
+
+
+
+
+
+
+ /ECAM/warning-phase eq 8
+
+
+
+
+
+
+ /ECAM/warnings/fctl/gear-lever-down eq 1
+
+ /gear/gear[0]/position-norm ne 1
+ /gear/gear[1]/position-norm ne 1
+ /gear/gear[2]/position-norm ne 1
+
+
+
+
+
+ /ECAM/warnings/fctl/gear-not-down-locked-set-input
+ 100
+ 0.03333333333
+
+
+
+
+
+ /ECAM/warnings/fctl/gear-not-down-locked-set-output eq 1
+
+
+
+
+
+
+ /gear/gear[0]/position-norm eq 1
+ /gear/gear[1]/position-norm eq 1
+ /gear/gear[2]/position-norm eq 1
+
+
+
+
+
+
+
+
+
+ /engines/engine[0]/state eq 3
+ /engines/engine[1]/state eq 3
+
+
+
+
+ /ECAM/warnings/hyd/engines-2-online
+ 100
+ 1
+
+
+
+
+
+ /engines/engine[0]/state ne 3
+ /engines/engine[1]/state ne 3
+ /ECAM/timer/ground-calc eq 0
+
+
+
+
+ /ECAM/warnings/hyd/engines-2-off-in-air
+ 100
+ 0.2
+
+
+
+
+
+ /engines/engine[0]/state eq 3
+
+ /ECAM/warning-phase ne 1
+ /ECAM/warning-phase ne 2
+ /ECAM/warning-phase ne 9
+ /ECAM/warning-phase ne 10
+
+
+
+
+
+ /ECAM/warnings/hyd/engine-1-start
+ 100
+ 1
+
+
+
+
+
+ /engines/engine[1]/state eq 3
+
+ /ECAM/warning-phase ne 1
+ /ECAM/warning-phase ne 2
+ /ECAM/warning-phase ne 9
+ /ECAM/warning-phase ne 10
+
+
+
+
+
+ /ECAM/warnings/hyd/engine-2-start
+ 100
+ 1
+
+
+
+
+
+ /systems/hydraulics/warnings/blue-lo-pr eq 1
+
+ /ECAM/warnings/hyd/engines-2-online eq 1
+ /ECAM/warnings/hyd/engines-2-off-in-air-output eq 1
+
+
+
+
+
+
+
+ /systems/hydraulics/warnings/green-lo-pr eq 1
+ /ECAM/warnings/hyd/engine-1-start-output eq 1
+
+
+
+
+
+
+ /systems/hydraulics/warnings/yellow-lo-pr eq 1
+ /ECAM/warnings/hyd/engine-2-start-output eq 1
+
+
+
+
+
+
+
+ /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1
+ /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1
+
+
+ /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1
+ /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1
+
+
+
+
+
+
+
+
+ /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1
+ /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1
+
+
+ /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1
+ /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1
+
+
+
+
+
+
+
+
+ /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1
+ /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1
+
+
+ /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1
+ /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1
+
+
+
+
+
+
+
+ /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1
+ /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1
+
+
+
+
+
+
+ /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1
+ /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1
+
+
+
+
+
+
+ /engines/engine[0]/state eq 3
+ /engines/engine[1]/state eq 3
+ /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1
+ /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1
+
+
+
+
+
+
+ /ECAM/timer/ground-calc eq 0
+ /engines/engine[0]/state eq 3
+ /engines/engine[1]/state eq 3
+
+
+
+
+
+
+ /ECAM/timer/ground-calc eq 0
+ /engines/engine[0]/state eq 3
+ /engines/engine[1]/state eq 3
+
+ fcs/flap-pos-deg ne 0
+ hydraulics/spoiler-l1/final-deg gt 0
+ hydraulics/spoiler-r1/final-deg gt 0
+ hydraulics/spoiler-l2/final-deg gt 0
+ hydraulics/spoiler-r2/final-deg gt 0
+ hydraulics/spoiler-l4/final-deg gt 0
+ hydraulics/spoiler-r4/final-deg gt 0
+ hydraulics/spoiler-l5/final-deg gt 0
+ hydraulics/spoiler-r5/final-deg gt 0
+
+
+
+
+
+
+
+
+ /ECAM/timer/ground-calc eq 0
+ /engines/engine[0]/state eq 3
+ /engines/engine[1]/state eq 3
+
+
+
+
+
diff --git a/Systems/a320-hydraulic.xml b/Systems/a320-hydraulic.xml
index 383d2e7d..3ed0871f 100644
--- a/Systems/a320-hydraulic.xml
+++ b/Systems/a320-hydraulic.xml
@@ -291,6 +291,7 @@
/controls/hydraulic/switches/yellow-elec eq 1
+ /systems/failures/hydraulic/yellow-elec ne 1
/systems/electrical/sources/ext/output-volt ge 110
/systems/electrical/bus/ac-2 ge 110
@@ -300,20 +301,13 @@
-
-
- /systems/failures/hydraulic/yellow-elec
- 1
-
-
- /systems/hydraulic/sources/yellow-elec/pump-operate
-
- 0 0
- 1 3000
-
-
- 0
-
+
+ /systems/hydraulic/sources/yellow-elec/pump-operate
+
+ 0 0
+ 1 3000
+
+
@@ -648,6 +642,40 @@
/systems/hydraulic/green-qty lt 3.5
+
+
+
+
+
+ /systems/hydraulic/blue-psi lt 1750
+ /systems/hydraulics/warnings/blue-lo-pr eq 1
+
+ /systems/hydraulic/blue-psi lt 1450
+
+
+
+
+
+
+
+ /systems/hydraulic/green-psi lt 1750
+ /systems/hydraulics/warnings/green-lo-pr eq 1
+
+ /systems/hydraulic/green-psi lt 1450
+
+
+
+
+
+
+
+ /systems/hydraulic/yellow-psi lt 1750
+ /systems/hydraulics/warnings/yellow-lo-pr eq 1
+
+ /systems/hydraulic/yellow-psi lt 1450
+
+
+
diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml
index 80d56c3b..1e1bd8c9 100644
--- a/Systems/ecam-proprules.xml
+++ b/Systems/ecam-proprules.xml
@@ -399,6 +399,66 @@
+
+ monostable
+ true
+
+
+ ECAM/phases/monostable/phase-8
+
+
+
+
+
+ monostable
+ true
+
+
+ /ECAM/warnings/logic/eng/eng-1-retard-case-2
+
+
+
+
+
+ monostable
+ true
+
+
+ /ECAM/warnings/logic/eng/eng-2-retard-case-2
+
+
+
+
+
+ monostable
+ true
+
+
+ /ECAM/warnings/logic/eng/eng-1-reverse
+
+
+
+
+
+ monostable
+ true
+
+
+ /ECAM/warnings/logic/eng/eng-2-reverse
+
+
+
+
monostable
true
@@ -525,6 +585,17 @@
+
+ monostable
+
+
+ /ECAM/warnings/fctl/gear-lever-down
+
+
+
+
monostable
+
+
+ SR
+
+ /ECAM/warnings/logic/eng/eng-1-thr-lvr-abv-idle-set
+
+
+ /ECAM/warnings/logic/eng/eng-1-thr-lvr-abv-idle-reset
+
+
+
+
+
+ SR
+
+ /ECAM/warnings/logic/eng/eng-2-thr-lvr-abv-idle-set
+
+
+ /ECAM/warnings/logic/eng/eng-2-thr-lvr-abv-idle-reset
+
+
+
+
+
+
+ monostable
+ true
+
+
+ /ECAM/warnings/logic/stall/phase-4
+
+
+
+
+
+ monostable
+ true
+
+
+ /ECAM/warnings/logic/stall/phase-5
+
+
+
+
+
+ monostable
+ true
+
+
+ /ECAM/warnings/logic/stall/phase-8
+
+
+
+
+
+ RS
+
+ /ECAM/warnings/logic/stall/phase-flipflop-set
+
+
+ /ECAM/warnings/logic/stall/phase-flipflop-reset
+
+
+
+
+
+ SR
+
+ /ECAM/warnings/config/park-brk/park-brk-set
+
+
+ /ECAM/warnings/config/park-brk/park-brk-reset
+
+
+
+
+
+ SR
+
+ /ECAM/warnings/fctl/gear-not-downlocked-set
+
+
+ /ECAM/warnings/fctl/gear-not-downlocked-reset
+
+
+
+
+
+ RS
+
+ /ECAM/warnings/fctl/gear-not-down-locked-set
+
+
+ /ECAM/warnings/fctl/gear-not-down-locked-reset
+
+
+
+