From 59b6196e4c29cb2f166714ed38603b2cca6658d0 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Fri, 29 Jan 2021 21:09:21 +0000 Subject: [PATCH] XBLEED FAULT fixes so they don't come on with engine fire --- Nasal/ECAM/ECAM-logic.nas | 31 ++++++++++++++----------------- Nasal/ECAM/ECAM-messages.nas | 4 ++-- Systems/a320-fwc.xml | 31 +++++++++++++++++++++++++++++-- Systems/a320-pneumatic.xml | 29 ++++++++++++++++++++++++----- Systems/ecam-proprules.xml | 24 ------------------------ 5 files changed, 69 insertions(+), 50 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 5a3ce8d8..2d116e40 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -1657,32 +1657,29 @@ var messages_priority_2 = func { # Crossbleed if (xBleedFault.clearFlag == 0 and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6) and warningNodes.Logic.crossbleedFault.getValue()) { xBleedFault.active = 1; - } else { - ECAM_controller.warningReset(xBleedFault); - } - - if (xBleedFault.active) { - if (systems.PNEU.Switch.xbleed.getValue() == 1) { + + if (xBleedFaultMan.clearFlag == 0 and systems.PNEU.Switch.xbleed.getValue() == 1) { xBleedFaultMan.active = 1; } else { ECAM_controller.warningReset(xBleedFaultMan); } - if (warningNodes.Logic.crossbleedWai.getValue()) { - if (getprop("/controls/ice-protection/wing")) { - xBleedOff.active = 1; - } else { - ECAM_controller.warningReset(xBleedOff); - } - xBleedIcing.active = 1; + if (xBleedFaultWAI.clearFlag == 0 and wing_pb.getValue() and warningNodes.Logic.crossbleedWai.getValue()) { + xBleedFaultWAI.active = 1; } else { - ECAM_controller.warningReset(xBleedOff); - ECAM_controller.warningReset(xBleedIcing); + ECAM_controller.warningReset(xBleedFaultWAI); + } + + if (xBleedFaultICE.clearFlag == 0 and warningNodes.Logic.crossbleedWai.getValue()) { + xBleedFaultICE.active = 1; + } else { + ECAM_controller.warningReset(xBleedFaultICE); } } else { + ECAM_controller.warningReset(xBleedFault); ECAM_controller.warningReset(xBleedFaultMan); - ECAM_controller.warningReset(xBleedOff); - ECAM_controller.warningReset(xBleedIcing); + ECAM_controller.warningReset(xBleedFaultWAI); + ECAM_controller.warningReset(xBleedFaultICE); } if (bleed1Off.clearFlag == 0 and (warningNodes.Timers.bleed1Off60Output.getValue() == 1 or warningNodes.Timers.bleed1Off5Output.getValue() == 1) and FWC.Timer.eng1idleOutput.getBoolValue() and (phaseVar2 == 2 or phaseVar2 == 6)) { diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index 5354529c..836d5848 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -362,8 +362,8 @@ var warnings = std.Vector.new([ var hpValve2Fault = warning.new(msg: "AIR ENG 2 HP VALVE FAULT", colour: "a"), var xBleedFault = warning.new(msg: "AIR X BLEED FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), var xBleedFaultMan = warning.new(msg: " -X BLEED........MAN CTL", colour: "c"), - var xBleedOff = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"), - var xBleedIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), + var xBleedFaultWAI = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"), + var xBleedFaultICE = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), var bleed1Off = warning.new(msg: "AIR BLEED 1 OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1), var bleed2Off = warning.new(msg: "AIR BLEED 2 OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1), var engBleedLowTemp = warning.new(msg: "AIR ENG 1+2 BLEED LO TEMP", colour: "a", aural: 1, light: 1, isMainMsg: 1), diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index fc49af06..a2d77e7d 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -62,6 +62,19 @@ 0.1 + + Timer for the ECAM system + /ECAM/warnings/logic/crossbleed-fault-timer-was-one + 0.1 + 120 + + + + Timer for the ECAM system + /controls/engines/engine[0]/fire-btn + 0.06666666666 + + Timer for the ECAM system /ECAM/warnings/logic/prv-1-not-shut-apu @@ -474,13 +487,27 @@ + + + + /ECAM/warnings/timer/xbleed-fault-output eq 1 + + + + /ECAM/warnings/timer/xbleed-fault-output eq 1 - /ECAM/warnings/timer/xbleed-fault-output-10 eq 1 - /ECAM/warnings/timer/xbleed-fault-output-15 eq 0 + + /ECAM/warnings/timer/xbleed-fault-output eq 0 + /ECAM/warnings/timer/xbleed-fault-output-10 ne 0 + + + /ECAM/warnings/timer/xbleed-fault-eng-fire eq 0 + /ECAM/warnings/timer/xbleed-fault-eng-fire eq 1 + diff --git a/Systems/a320-pneumatic.xml b/Systems/a320-pneumatic.xml index bfe656d7..1ada48d2 100644 --- a/Systems/a320-pneumatic.xml +++ b/Systems/a320-pneumatic.xml @@ -1183,28 +1183,47 @@ 120 - + /systems/pneumatics/valves/crossbleed-valve-cmd eq 1 /systems/pneumatics/valves/crossbleed-valve ne 1 /controls/pneumatics/switches/x-bleed eq 2 + + + + /systems/pneumatics/valves/crossbleed-valve-cmd eq 1 /systems/pneumatics/valves/crossbleed-valve ne 1 /controls/pneumatics/switches/x-bleed eq 1 - /systems/electrical/bus/dc-2 ge 25 - - + + + + + /systems/pneumatics/warnings/crossbleed-disag-open-man eq 1 + + /systems/pneumatics/warnings/crossbleed-disag-open-auto eq 1 + /systems/electrical/bus/dc-2 ge 25 + + + + + /systems/pneumatics/valves/crossbleed-valve-cmd eq 0 /systems/pneumatics/valves/crossbleed-valve ne 0 - + + + + + + /systems/pneumatics/warnings/crossbleed-disag-closed eq 1 /systems/pneumatics/warnings/crossbleed-disag-open eq 1 diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml index e89c7dfc..b818f2c9 100644 --- a/Systems/ecam-proprules.xml +++ b/Systems/ecam-proprules.xml @@ -412,30 +412,6 @@ - - monostable - true - - - /ECAM/warnings/timer/xbleed-fault-output - - /ECAM/warnings/timer/xbleed-fault-output-10 - - - - monostable - true - - - /controls/engines/engine[0]/fire-btn - - /ECAM/warnings/timer/xbleed-fault-output-15 - - SR