diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas index faab2f1c..01deb93f 100644 --- a/Nasal/ECAM/ECAM-controller.nas +++ b/Nasal/ECAM/ECAM-controller.nas @@ -76,6 +76,17 @@ var warningNodes = { leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"), rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"), flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"), + slatsConfig: props.globals.initNode("/ECAM/warnings/fctl/slats-config-output"), + flapsConfig: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-output"), + spdBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-output"), + pitchTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-output"), + rudTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-output"), + parkBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/park-brk-config-output"), + slatsConfig2: props.globals.initNode("/ECAM/warnings/fctl/slats-config-range"), + flapsConfig2: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-range"), + spdBrkConfig2: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-range"), + pitchTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-range"), + rudTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-range"), }, Timers: { apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 230d353f..0a8232cc 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -578,29 +578,23 @@ var messages_priority_3 = func { 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); - } + if (slats_config.clearFlag == 0 and (warningNodes.Logic.slatsConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.slatsConfig2.getBoolValue()))) { + 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 and (warningNodes.Logic.flapsConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.flapsConfig2.getBoolValue()))) { + 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 takeoffConfig) { + if (spd_brk_config.clearFlag == 0 and (warningNodes.Logic.spdBrkConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.spdBrkConfig2.getBoolValue()))) { spd_brk_config.active = 1; spd_brk_config_1.active = 1; } else { @@ -608,7 +602,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") > 2.6 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -2.6) and takeoffConfig) { + if (pitch_trim_config.clearFlag == 0 and (warningNodes.Logic.pitchTrimConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.pitchTrimConfig2.getBoolValue()))) { pitch_trim_config.active = 1; pitch_trim_config_1.active = 1; } else { @@ -616,7 +610,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.6 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.6) and takeoffConfig) { + if (rud_trim_config.clearFlag == 0 and (warningNodes.Logic.rudTrimConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.rudTrimConfig2.getBoolValue()))) { rud_trim_config.active = 1; rud_trim_config_1.active = 1; } else { @@ -624,7 +618,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(rud_trim_config_1); } - if ((park_brk_config.clearFlag == 0) and warningNodes.Flipflops.parkBrk.getValue() and phaseVar3 >= 2 and phaseVar3 <= 3) { + if (park_brk_config.clearFlag == 0 and warningNodes.Logic.parkBrkConfig.getValue() and phaseVar3 >= 2 and phaseVar3 <= 3) { park_brk_config.active = 1; } else { ECAM_controller.warningReset(park_brk_config); diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index 836d5848..40c92c72 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -85,6 +85,20 @@ var warnings = std.Vector.new([ var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"), var eng2FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"), + # ADR 1 + 2 + 3 FAULT + var ADR123Fault = warning.new(msg: "NAV ADR1+2+3 FAULT ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var ADR123FaultAP = warning.new(msg: " -AP+FD..............OFF", colour: "c"), + var ADR123FaultATHR = warning.new(msg: " -ATHR...............OFF", colour: "c"), + var ADR123FaultPRBW = warning.new(msg: " -PROBE/WINDOW HEAT...ON", colour: "c"), + var ADR123FaultBUSSC = warning.new(msg: " -CAPT BKUP SPD/ALT...ON", colour: "c"), + var ADR123FaultBUSSF = warning.new(msg: " -FO BKUP SPD/ALT.....ON", colour: "c"), + var ADR123FaultADRPB = warning.new(msg: " -ADR 1+2+3 P/B......OFF", colour: "c"), + var ADR123FaultSPD = warning.new(msg: " -SPD......FLY THE GREEN", colour: "c"), + var ADR123FaultAOADISAG = warning.new(msg: " •IF AOA DISAGREE: ", colour: "w", isMainMsg: 1), + var ADR123FaultBUSSINOP = warning.new(msg: " BKUP SPD/ALT.DO NOT USE", colour: "c"), + var ADR123FaultSTBY = warning.new(msg: " -STBY INST.MAY BE UNREL", colour: "c"), + var ADR123FaultPROC = warning.new(msg: " -ALL ADR OFF PROC.APPLY", colour: "c"), + # APU FIRE var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apu"), var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"), diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index a9be041d..98422d49 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -2337,6 +2337,156 @@ + + + + fcs/flap-pos-deg lt 2 + fcs/flap-pos-deg ge 24 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/flaps-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/flaps-config-range ne 1 + + + + + + + fcs/slat-pos-deg lt 17 + fcs/slat-pos-deg ge 25 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/slats-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/slats-config-range ne 1 + + + + + + + /controls/flight/speedbrake gt 0.0 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/spd-brk-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/spd-brk-config-range ne 1 + + + + + + + hydraulics/elevator-trim/final-deg gt 2.9 + hydraulics/elevator-trim/final-deg lt -2.9 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/pitch-trim-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/pitch-trim-config-range ne 1 + + + + + + + hydraulics/rudder/trim-deg gt 3.6 + hydraulics/rudder/trim-deg lt -3.6 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/rudder-trim-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/rudder-trim-config-range ne 1 + + + + + + + /ECAM/warning-phase eq 3 + /controls/gear/brake-parking eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /controls/gear/brake-parking eq 0 + + + @@ -2728,4 +2878,21 @@ + + diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml index db8cdd3f..be08bc8a 100644 --- a/Systems/ecam-proprules.xml +++ b/Systems/ecam-proprules.xml @@ -1005,4 +1005,70 @@ /ECAM/phases/phase-calculation/altitude-ge-800 + + + SR + + /ECAM/warnings/fctl/flaps-config-set + + + /ECAM/warnings/fctl/flaps-config-reset + + /ECAM/warnings/fctl/flaps-config-output + + + + SR + + /ECAM/warnings/fctl/slats-config-set + + + /ECAM/warnings/fctl/slats-config-reset + + /ECAM/warnings/fctl/slats-config-output + + + + SR + + /ECAM/warnings/fctl/spd-brk-config-set + + + /ECAM/warnings/fctl/spd-brk-config-reset + + /ECAM/warnings/fctl/spd-brk-config-output + + + + SR + + /ECAM/warnings/fctl/pitch-trim-config-set + + + /ECAM/warnings/fctl/pitch-trim-config-reset + + /ECAM/warnings/fctl/pitch-trim-config-output + + + + SR + + /ECAM/warnings/fctl/rudder-trim-config-set + + + /ECAM/warnings/fctl/rudder-trim-config-reset + + /ECAM/warnings/fctl/rudder-trim-config-output + + + + SR + + /ECAM/warnings/fctl/park-brk-config-set + + + /ECAM/warnings/fctl/park-brk-config-reset + + /ECAM/warnings/fctl/park-brk-config-output +