diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 3ec91985..8713738a 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -3,7 +3,7 @@ # props.nas: -var dualFailNode = props.globals.initNode("/ECAM/dual-failure-enabled", 0, "BOOL"); +var dualFailNode = props.globals.initNode("/ECAM/warnings/logic/eng/dual-failure", 0, "BOOL"); var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1); var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1); @@ -1920,7 +1920,7 @@ var messages_priority_2 = func { } # GEN 1 FAULT - if (gen1fault.clearFlag == 0 and warningNodes.Flipflops.gen1Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { + if (gen1fault.clearFlag == 0 and warningNodes.Flipflops.gen1Fault.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { gen1fault.active = 1; if (!warningNodes.Flipflops.gen1FaultOnOff.getValue()) { gen1faultGen.active = 1; @@ -1950,7 +1950,7 @@ var messages_priority_2 = func { } # GEN 2 FAULT - if (gen2fault.clearFlag == 0 and warningNodes.Flipflops.gen2Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { + if (gen2fault.clearFlag == 0 and warningNodes.Flipflops.gen2Fault.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { gen2fault.active = 1; if (!warningNodes.Flipflops.gen2FaultOnOff.getValue()) { gen2faultGen.active = 1; @@ -3642,19 +3642,3 @@ var messages_right_memo = func { adirs_switch.active = 0; } } - -setlistener("/engines/engine[0]/state", func() { - if ((state1Node.getValue() != 3 and state2Node.getValue() != 3) and !pts.Fdm.JSBsim.Position.wow.getBoolValue()) { - dualFailNode.setBoolValue(1); - } else { - dualFailNode.setBoolValue(0); - } -}, 0, 0); - -setlistener("/engines/engine[1]/state", func() { - if ((state1Node.getValue() != 3 and state2Node.getValue() != 3) and !pts.Fdm.JSBsim.Position.wow.getBoolValue()) { - dualFailNode.setBoolValue(1); - } else { - dualFailNode.setBoolValue(0); - } -}, 0, 0); diff --git a/Systems/a320-fwc-phases.xml b/Systems/a320-fwc-phases.xml index 58e178df..27853087 100644 --- a/Systems/a320-fwc-phases.xml +++ b/Systems/a320-fwc-phases.xml @@ -141,39 +141,11 @@ - - - - - /ECAM/phases/timer/eng1idle-output eq 0 - /controls/engines/engine[0]/cutoff-switch eq 1 - - - /ECAM/timer/ground-calc eq 1 - /ECAM/phases/timer/eng1idle eq 0 - - - - - - - - - /ECAM/phases/timer/eng2idle-output eq 0 - /controls/engines/engine[1]/cutoff-switch eq 1 - - - /ECAM/timer/ground-calc eq 1 - /ECAM/phases/timer/eng2idle eq 0 - - - - - /ECAM/phases/phase-calculation/engine-1-off eq 1 - /ECAM/phases/phase-calculation/engine-2-off eq 1 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index 81329baf..bda7bca8 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -1500,10 +1500,80 @@ + + + + /engines/engine[0]/n2-actual ge 59.4 + + + + + /ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle-input + 0.03333333333 + 1.0 + + + + /controls/engines/engine[0]/fire-btn + 0.03225806451 + 1.0 + + + + + + /controls/engines/engine[0]/cutoff-switch eq 1 + + /ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle ne 1 + + /engines/engine[0]/n2-actual lt 59.4 + /ECAM/timer/ground-calc eq 1 + /controls/engines/engine[0]/fire-btn eq 0 + /ECAM/warnings/logic/eng/eng-1-fire-btn-timer-31 ne 1 + + + + + + + + + /engines/engine[0]/n2-actual ge 59.4 + + + + + /ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle-input + 0.03333333333 + 1.0 + + + + /controls/engines/engine[1]/fire-btn + 0.03225806451 + 1.0 + + + + + + /controls/engines/engine[1]/cutoff-switch eq 1 + + /ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle ne 1 + + /engines/engine[1]/n2-actual lt 59.4 + /ECAM/timer/ground-calc eq 1 + /controls/engines/engine[1]/fire-btn eq 0 + /ECAM/warnings/logic/eng/eng-2-fire-btn-timer-31 ne 1 + + + + + - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 0 /systems/electrical/relay/gen-1-glc/contact-pos eq 0 @@ -1571,7 +1641,7 @@ - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 0 /systems/electrical/relay/gen-2-glc/contact-pos eq 0 @@ -1824,7 +1894,7 @@ /ECAM/timer/ground-calc eq 0 - /ECAM/dual-failure-enabled eq 0 + /ECAM/warnings/logic/eng/dual-failure eq 0 @@ -1871,7 +1941,7 @@ /ECAM/timer/ground-calc eq 0 - /ECAM/dual-failure-enabled eq 0 + /ECAM/warnings/logic/eng/dual-failure eq 0 @@ -2763,6 +2833,48 @@ + + + + /engines/engine[0]/n2-actual lt 59.4 + /engines/engine[1]/n2-actual lt 59.4 + + + + + /ECAM/warnings/logic/eng/dual-failure-5-sec-input + 0.5 + 100 + + + + /controls/engines/engine[1]/fire-btn + 0.1 + 1.0 + + + + + + /ECAM/timer/ground-calc eq 0 + + /ECAM/warnings/logic/eng/eng-2-fire-btn-timer eq 1 + /controls/engines/engine[1]/fire-btn eq 0 + + + + /controls/engines/engine[0]/fire-btn eq 1 + /controls/engines/engine[1]/fire-btn eq 1 + + + /controls/engines/engine[0]/cutoff-switch eq 1 + /controls/engines/engine[1]/cutoff-switch eq 1 + + /ECAM/warnings/logic/eng/dual-failure-5-sec eq 1 + + + + @@ -2829,7 +2941,7 @@ /engines/engine[0]/n2-actual ge 59.4 - /ECAM/dual-failure-enabled eq 1 + /ECAM/warnings/logic/eng/dual-failure eq 1 @@ -2837,7 +2949,7 @@ /engines/engine[1]/n2-actual ge 59.4 - /ECAM/dual-failure-enabled eq 1 + /ECAM/warnings/logic/eng/dual-failure eq 1 @@ -2902,7 +3014,7 @@ /ECAM/phases/timer/acconfig-running eq 0 - /ECAM/dual-failure-enabled eq 0 + /ECAM/warnings/logic/eng/dual-failure eq 0 @@ -2923,7 +3035,7 @@ /ECAM/phases/timer/acconfig-running eq 0 - /ECAM/dual-failure-enabled eq 0 + /ECAM/warnings/logic/eng/dual-failure eq 0