diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 7d5b355f..5cb4bae7 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -574,6 +574,61 @@ var messages_priority_3 = func { ECAM_controller.warningReset(apuFireMaster); } + if (ADR123Fault.clearFlag == 0 and warningNodes.Logic.adr123Fault.getValue() and phaseVar3 != 4 and phaseVar3 != 8) { + ADR123Fault.active = 1; + + if (ADR123FaultAP.clearFlag == 0 and (fmgc.Output.ap1.getBoolValue() or fmgc.Output.ap2.getBoolValue() or fmgc.Output.fd1.getBoolValue() or fmgc.Output.fd2.getBoolValue())) { + ADR123FaultAP.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultAP); + } + + if (ADR123FaultATHR.clearFlag == 0 and fmgc.Output.athr.getBoolValue()) { + ADR123FaultATHR.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultATHR); + } + + if (ADR123FaultPRBW.clearFlag == 0) { + ADR123FaultPRBW.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultPRBW); + } + + if (ADR123FaultADRPB.clearFlag == 0 and (systems.ADIRS.Switches.adrSw[0].getBoolValue() or systems.ADIRS.Switches.adrSw[1].getBoolValue() or systems.ADIRS.Switches.adrSw[2].getBoolValue())) { + ADR123FaultADRPB.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultADRPB); + } + + if (ADR123FaultSPD.clearFlag == 0) { + ADR123FaultSPD.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultSPD); + } + + if (ADR123FaultSTBY.clearFlag == 0) { + ADR123FaultSTBY.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultSTBY); + } + + if (ADR123FaultPROC.clearFlag == 0) { + ADR123FaultPROC.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultPROC); + } + } else { + ECAM_controller.warningReset(ADR123Fault); + ECAM_controller.warningReset(ADR123FaultAP); + ECAM_controller.warningReset(ADR123FaultATHR); + ECAM_controller.warningReset(ADR123FaultPRBW); + ECAM_controller.warningReset(ADR123FaultADRPB); + ECAM_controller.warningReset(ADR123FaultSPD); + ECAM_controller.warningReset(ADR123FaultSTBY); + ECAM_controller.warningReset(ADR123FaultPROC); + } + if ((ecamConfigTest.getValue() and (phaseVar3 == 1 or phaseVar3 == 2 or phaseVar3 == 9)) or phaseVar3 == 3 or phaseVar3 == 4) { takeoffConfig = 1; } else { @@ -626,7 +681,194 @@ var messages_priority_3 = func { ECAM_controller.warningReset(park_brk_config); } - if (lrElevFault.clearFlag == 0 and warningNodes.Timers.LRElevFault.getValue()) { + if (excessCabAlt.clearFlag == 0 and warningNodes.Logic.excessCabAlt.getValue() == 1 and phaseVar3 == 6) { + excessCabAlt.active = 1; + + if (excessCabAltMask.clearFlag == 0 and warningNodes.Flipflops.cabPressExcessFlipflopTop.getValue()) { + excessCabAltMask.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltMask); + } + + if (warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { + if (excessCabAltSigns.clearFlag == 0 and (!pts.Controls.Lighting.noSmokingSign.getValue() or !pts.Controls.Lighting.seatbeltSign.getValue())) { + excessCabAltSigns.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltSigns); + } + + if (excessCabAltEmerD.clearFlag == 0) { + excessCabAltEmerD.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltEmerD); + } + } else { + ECAM_controller.warningReset(excessCabAltSigns); + ECAM_controller.warningReset(excessCabAltEmerD); + } + + if (excessCabAltDES.clearFlag == 0 and warningNodes.Flipflops.cabPressExcessFlipflopTop.getValue()) { + excessCabAltDES.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltDES); + } + + if (warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { + if (excessCabAltTHRLVR.clearFlag == 0 and !fmgc.Output.athr.getBoolValue() and warningNodes.Logic.JE1TLAI.getValue() == 0 and warningNodes.Logic.JE2TLAI.getValue() == 0) { + excessCabAltTHRLVR.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltTHRLVR); + } + + if (excessCabAltSPDBRK.clearFlag == 0 and pts.Controls.Flight.speedbrake.getValue() != 1) { + excessCabAltSPDBRK.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltSPDBRK); + } + + if (excessCabAltSPD.clearFlag == 0) { + excessCabAltSPD.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltSPD); + } + + if (excessCabAltENG.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 1) { + excessCabAltENG.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltENG); + } + + if (excessCabAltATC.clearFlag == 0) { + excessCabAltATC.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltATC); + } + } else { + ECAM_controller.warningReset(excessCabAltTHRLVR); + ECAM_controller.warningReset(excessCabAltSPDBRK); + ECAM_controller.warningReset(excessCabAltSPD); + ECAM_controller.warningReset(excessCabAltENG); + ECAM_controller.warningReset(excessCabAltATC); + } + + if (warningNodes.Flipflops.cabPressExcessFlipflopTop.getValue() and !warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { + if (excessCabAltCAB.clearFlag == 0) { + excessCabAltCAB.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltCAB); + } + } else { + ECAM_controller.warningReset(excessCabAltCAB); + } + + if (warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { + if (excessCabAltPA.clearFlag == 0) { + excessCabAltPA.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltPA); + } + + if (excessCabAltXPDR.clearFlag == 0) { + excessCabAltXPDR.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltXPDR); + } + } else { + ECAM_controller.warningReset(excessCabAltPA); + ECAM_controller.warningReset(excessCabAltXPDR); + } + + if (excessCabAltMEA.clearFlag == 0) { + excessCabAltMEA.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltMEA); + } + + if (excessCabAltCabAlt.clearFlag == 0) { + excessCabAltCabAlt.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltCabAlt); + } + + if (excessCabAltMasks.clearFlag == 0) { + excessCabAltMasks.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltMasks); + } + } else { + ECAM_controller.warningReset(excessCabAlt); + ECAM_controller.warningReset(excessCabAltMask); + ECAM_controller.warningReset(excessCabAltSigns); + ECAM_controller.warningReset(excessCabAltEmerD); + ECAM_controller.warningReset(excessCabAltDES); + ECAM_controller.warningReset(excessCabAltTHRLVR); + ECAM_controller.warningReset(excessCabAltSPDBRK); + ECAM_controller.warningReset(excessCabAltSPD); + ECAM_controller.warningReset(excessCabAltENG); + ECAM_controller.warningReset(excessCabAltCAB); + ECAM_controller.warningReset(excessCabAltATC); + ECAM_controller.warningReset(excessCabAltPA); + ECAM_controller.warningReset(excessCabAltXPDR); + ECAM_controller.warningReset(excessCabAltMEA); + ECAM_controller.warningReset(excessCabAltCabAlt); + ECAM_controller.warningReset(excessCabAltMasks); + } + + if (eng1OilLoPr.clearFlag == 0 and warningNodes.Logic.eng1OilLoPr.getBoolValue() and phaseVar3 != 1 and phaseVar3 != 10) { + eng1OilLoPr.active = 1; + + if (eng1OilLoPrIf.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) { + eng1OilLoPrIf.active = 1; + } else { + ECAM_controller.warningReset(eng1OilLoPrIf); + } + + if (eng1OilLoPrThrot.clearFlag == 0 and !warningNodes.Logic.JE1TLAI.getValue()) { + eng1OilLoPrThrot.active = 1; + } else { + ECAM_controller.warningReset(eng1OilLoPrThrot); + } + + if (eng1OilLoPrMaster.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) { + eng1OilLoPrMaster.active = 1; + } else { + ECAM_controller.warningReset(eng1OilLoPrMaster); + } + } else { + ECAM_controller.warningReset(eng1OilLoPr); + ECAM_controller.warningReset(eng1OilLoPrIf); + ECAM_controller.warningReset(eng1OilLoPrThrot); + ECAM_controller.warningReset(eng1OilLoPrMaster); + } + + if (eng2OilLoPr.clearFlag == 0 and warningNodes.Logic.eng2OilLoPr.getBoolValue() and phaseVar3 != 1 and phaseVar3 != 10) { + eng2OilLoPr.active = 1; + + if (eng2OilLoPrIf.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) { + eng2OilLoPrIf.active = 1; + } else { + ECAM_controller.warningReset(eng2OilLoPrIf); + } + + if (eng2OilLoPrThrot.clearFlag == 0 and !warningNodes.Logic.JE2TLAI.getValue()) { + eng2OilLoPrThrot.active = 1; + } else { + ECAM_controller.warningReset(eng2OilLoPrThrot); + } + + if (eng2OilLoPrMaster.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) { + eng2OilLoPrMaster.active = 1; + } else { + ECAM_controller.warningReset(eng2OilLoPrMaster); + } + } else { + ECAM_controller.warningReset(eng2OilLoPr); + ECAM_controller.warningReset(eng2OilLoPrIf); + ECAM_controller.warningReset(eng2OilLoPrThrot); + ECAM_controller.warningReset(eng2OilLoPrMaster); + } + + if (lrElevFault.clearFlag == 0 and warningNodes.Timers.LRElevFault.getValue() == 1) { lrElevFault.active = 1; if (lrElevFaultSpeed.clearFlag == 0) { lrElevFaultSpeed.active = 1; @@ -829,6 +1071,32 @@ var messages_priority_3 = func { ECAM_controller.warningReset(lavatorySmokeComm); } + # CAB PRESS EXESS RESIDUAL PRESS + if (excessResidPress.clearFlag == 0 and warningNodes.Logic.excessPress.getValue() == 1 and phaseVar == 10) { + if (excessResidPressPack1.clearFlag == 0) { + excessResidPressPack1.active = 1; + } else { + ECAM_controller.warningReset(excessResidPressPack1); + } + + if (excessResidPressPack2.clearFlag == 0) { + excessResidPressPack2.active = 1; + } else { + ECAM_controller.warningReset(excessResidPressPack2); + } + + if (excessResidPressCabCr.clearFlag == 0) { + excessResidPressCabCr.active = 1; + } else { + ECAM_controller.warningReset(excessResidPressCabCr); + } + } else { + ECAM_controller.warningReset(excessResidPress); + ECAM_controller.warningReset(excessResidPressPack1); + ECAM_controller.warningReset(excessResidPressPack2); + ECAM_controller.warningReset(excessResidPressCabCr); + } + # ESS on BAT # NEW EMER ELEC CONFIG if (essBusOnBat.clearFlag == 0 and warningNodes.Timers.staticInverter.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) { @@ -977,13 +1245,13 @@ var messages_priority_3 = func { 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) { + if (hydBYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and !systems.HYD.Pump.yellowElecFail.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and !systems.HYD.Fail.yellowReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.yellowReservoirOvht.getBoolValue() and !systems.HYD.Warnings.yellowLoLvl.getBoolValue()) { 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) { + if (hydBYloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 1.8 and !systems.HYD.Fail.blueReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.blueReservoirOvht.getBoolValue() and !systems.HYD.Warnings.blueLoLvl.getBoolValue()) { hydBYloPrRatOn.active = 1; } else { ECAM_controller.warningReset(hydBYloPrRatOn); @@ -1052,7 +1320,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(hydGBloPrRat); } - if (hydGBloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 2.4) { + if (hydGBloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 1.8 and !systems.HYD.Fail.blueReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.blueReservoirOvht.getBoolValue() and !systems.HYD.Warnings.blueLoLvl.getBoolValue()) { hydGBloPrRatOn.active = 1; } else { ECAM_controller.warningReset(hydGBloPrRatOn); @@ -1105,7 +1373,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(hydGBloPrFmsPredict); } - if (hydGYloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.greenYellow.getValue()) { + if (hydGYloPr.clearFlag == 0 and warningNodes.Logic.greenYellow.getValue()) { hydGYloPr.active = 1; if (hydGYloPrPtu.clearFlag == 0 and systems.HYD.Switch.ptu.getValue() != 0) { hydGYloPrPtu.active = 1; @@ -1125,7 +1393,7 @@ var messages_priority_3 = func { 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) { + if (hydGYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and !systems.HYD.Pump.yellowElecFail.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and !systems.HYD.Fail.yellowReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.yellowReservoirOvht.getBoolValue() and !systems.HYD.Warnings.yellowLoLvl.getBoolValue()) { hydGYloPrYElec.active = 1; } else { ECAM_controller.warningReset(hydGYloPrYElec); @@ -3314,7 +3582,7 @@ var messages_config_memo = func { toMemoLine1.colour = "c"; } - if (pts.Controls.Switches.seatbeltSwitch.getValue() and pts.Controls.Switches.noSmokingSwitch.getValue()) { + if (pts.Controls.Lighting.seatbeltSign.getValue() and pts.Controls.Lighting.noSmokingSign.getValue()) { toMemoLine2.msg = " SIGNS ON"; toMemoLine2.colour = "g"; } else { @@ -3380,7 +3648,7 @@ var messages_config_memo = func { ldgMemoLine1.colour = "c"; } - if (pts.Controls.Switches.seatbeltSwitch.getValue() and pts.Controls.Switches.noSmokingSwitch.getValue()) { + if (pts.Controls.Lighting.seatbeltSign.getValue() and pts.Controls.Lighting.noSmokingSign.getValue()) { ldgMemoLine2.msg = " SIGNS ON"; ldgMemoLine2.colour = "g"; } else { diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index 0be5d0d9..63e389d8 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -18,7 +18,7 @@ var warnings = std.Vector.new([ var overspeedGear = warning.new(msg: "-VLE...........280 /.67", colour: "r"), var overspeedFlap = warning.new(msg: "-VFE................XXX", colour: "r"), - var allEngFail = warning.new(msg: "ENG ALL ENGINES FAILURE", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var allEngFail = warning.new(msg: "ENG ALL ENGINES FAILURE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), 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"), @@ -40,7 +40,7 @@ var warnings = std.Vector.new([ 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), + var eng1Fire = warning.new(msg: "ENG 1 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), var eng1FireFllever = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"), var eng1FireFlmaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"), var eng1FireFlPB = warning.new(msg: " -ENG 1 FIRE P/B....PUSH", colour: "c"), @@ -63,7 +63,7 @@ var warnings = std.Vector.new([ 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), + var eng2Fire = warning.new(msg: "ENG 2 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), var eng2FireFllever = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"), var eng2FireFlmaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"), var eng2FireFlPB = warning.new(msg: " -ENG 2 FIRE P/B....PUSH", colour: "c"), @@ -85,8 +85,15 @@ 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"), + # APU FIRE + var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apuPage"), + var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"), + var apuFireAgentTimer = warning.new(msg: " -AGENT AFT 10 S...DISCH", colour: "c"), + var apuFireAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), + var apuFireMaster = warning.new(msg: " -MASTER SW..........OFF", 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 ADR123Fault = warning.new(msg: "NAV ADR 1+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"), @@ -99,28 +106,28 @@ var warnings = std.Vector.new([ 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: "apuPage"), - var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"), - var apuFireAgentTimer = warning.new(msg: " -AGENT AFT 10 S...DISCH", colour: "c"), - var apuFireAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), - var apuFireMaster = warning.new(msg: " -MASTER SW..........OFF", colour: "c"), - # Config var slats_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0), var slats_config_1 = warning.new(msg: "SLATS NOT IN T.O. CONFIG", colour: "r", aural: 0, light: 0), var flaps_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0), var flaps_config_1 = warning.new(msg: "FLAPS NOT IN T.O. CONFIG", colour: "r", aural: 0, light: 0), - var spd_brk_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0), + var spd_brk_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0, sdPage: "fctlPage"), var spd_brk_config_1 = warning.new(msg: "SPD BRK NOT RETRACTED", colour: "r", aural: 0, light: 0), - var pitch_trim_config = warning.new(msg: "CONFIG PITCH TRIM", colour: "r", aural: 0, light: 0), + var pitch_trim_config = warning.new(msg: "CONFIG PITCH TRIM", colour: "r", aural: 0, light: 0, sdPage: "fctlPage"), var pitch_trim_config_1 = warning.new(msg: " NOT IN T.O. RANGE", colour: "r", aural: 0, light: 0), - var rud_trim_config = warning.new(msg: "CONFIG RUD TRIM", colour: "r", aural: 0, light: 0), + var rud_trim_config = warning.new(msg: "CONFIG RUD TRIM", colour: "r", aural: 0, light: 0, sdPage: "fctlPage"), 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), + var l_sidestick_fault = warning.new(msg: "CONFIG L SIDESTICK FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var l_sidestick_fault_to = warning.new(msg: " (BY TAKE OVER)", colour: "r"), + var l_sidestick_fault_pb = warning.new(msg: " -L TAKE OVER....DEPRESS", colour: "c"), + var r_sidestick_fault = warning.new(msg: "CONFIG R SIDESTICK FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var r_sidestick_fault_to = warning.new(msg: " (BY TAKE OVER)", colour: "r"), + var r_sidestick_fault_pb = warning.new(msg: " -R TAKE OVER....DEPRESS", colour: "c"), + # EXCESS CAB ALT - var excessCabAlt = warning.new(msg: "CAB PR EXCESS CAB ALT", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var excessCabAlt = warning.new(msg: "CAB PR EXCESS CAB ALT", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "cabPressPage"), var excessCabAltMask = warning.new(msg: " -CREW OXY MASKS.....USE", colour: "c"), var excessCabAltSigns = warning.new(msg: " -SIGNS...............ON", colour: "c"), var excessCabAltEmerD = warning.new(msg: " •EMER DESCENT:", colour: "w"), @@ -129,6 +136,7 @@ var warnings = std.Vector.new([ var excessCabAltSPDBRK = warning.new(msg: " -SPD BRK...........FULL", colour: "c"), var excessCabAltSPD = warning.new(msg: " SPD.....MAX/APPROPRIATE", colour: "c"), var excessCabAltENG = warning.new(msg: " -ENG MODE...........IGN", colour: "c"), + var excessCabAltATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"), var excessCabAltCAB = warning.new(msg: " -CABIN CREW......ADVISE", colour: "c"), var excessCabAltPA = warning.new(msg: " -EMER DES (PA).ANNOUNCE", colour: "c"), var excessCabAltXPDR = warning.new(msg: " -XPDR 7700.....CONSIDER", colour: "c"), @@ -137,21 +145,21 @@ var warnings = std.Vector.new([ var excessCabAltMasks = warning.new(msg: " -PAX OXY MASKS...MAN ON", colour: "c"), # ENG 1 OIL LO PR - var eng1OilLoPr = warning.new(msg: "ENG 1 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var eng1OilLoPr = warning.new(msg: "ENG 1 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), var eng1OilLoPrIf = warning.new(msg: " •IF OIL PR < 13 PSI :", colour: "w"), var eng1OilLoPrIf2 = warning.new(msg: " •IF OIL PR < 60 PSI :", colour: "w"), var eng1OilLoPrThrot = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"), var eng1OilLoPrMaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"), # ENG 2 OIL LO PR - var eng2OilLoPr = warning.new(msg: "ENG 2 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var eng2OilLoPr = warning.new(msg: "ENG 2 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), var eng2OilLoPrIf = warning.new(msg: " •IF OIL PR < 13 PSI :", colour: "w"), var eng2OilLoPrIf2 = warning.new(msg: " •IF OIL PR < 60 PSI :", colour: "w"), var eng2OilLoPrThrot = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"), var eng2OilLoPrMaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"), # 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 lrElevFault = warning.new(msg: "F/CTL L+R ELEV FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "fctlPage"), 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"), @@ -159,7 +167,7 @@ var warnings = std.Vector.new([ # 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 gearNotDownLocked = warning.new(msg: "L/G GEAR NOT DOWNLOCKED", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "wheelPage"), var gearNotDownLockedRec = warning.new(msg: " -L/G LEVER......RECYCLE", colour: "c"), var gearNotDownLockedWork = warning.new(msg: " •IF UNSUCCESSFUL:", colour: "w"), var gearNotDownLocked120 = warning.new(msg: " AFTER 120S:", colour: "w"), @@ -169,14 +177,14 @@ var warnings = std.Vector.new([ 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 cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "condPage"), var cargoSmokeFwdFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"), var cargoSmokeFwdGrdClsd = warning.new(msg: " •IF FWD CRG CLSD:", colour: "w"), var cargoSmokeFwdAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), var cargoSmokeFwdGrd = warning.new(msg: " •WHEN ON GROUND", colour: "w"), var cargoSmokeFwdDoors = warning.new(msg: " BEFORE OPEN CRG DOORS:", colour: "w"), var cargoSmokeFwdDisemb = warning.new(msg: "-PAX..........DISEMBARK", colour: "c"), - var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "condPage"), var cargoSmokeAftFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"), var cargoSmokeAftGrdClsd = warning.new(msg: " •IF AFT CRG CLSD:", colour: "w"), var cargoSmokeAftAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), @@ -189,18 +197,18 @@ var warnings = std.Vector.new([ var lavatorySmokeComm = warning.new(msg: "-CKPT/CAB COM.ESTABLISH ", colour: "c"), # EXCES RESID PR - var excessResidPress = warning.new(msg: "CAB PR EXCES RESIDUAL PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var excessResidPress = warning.new(msg: "CAB PR EXCES RESIDUAL PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "cabPressPage"), var excessResidPressPack1 = warning.new(msg: "-PACK 1.............OFF", colour: "c"), var excessResidPressPack2 = warning.new(msg: "-PACK 2.............OFF", colour: "c"), var excessResidPressCabCr = warning.new(msg: "-CABIN CREW.......ALERT", colour: "c"), # ESS Bus on Bat # NEW EMER CONFIG - var essBusOnBat = warning.new(msg: "ELEC ESS BUSES ON BAT", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var essBusOnBat = warning.new(msg: "ELEC ESS BUSES ON BAT", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "elecPage"), var essBusOnBatMinSpeed = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"), # Emer Config - var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "elecPage"), 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"), @@ -219,7 +227,7 @@ var warnings = std.Vector.new([ var emerconfigFMSPRD = warning.new(msg: " FMS PRED UNRELIABLE", 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 hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "hydraulicPage"), 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"), @@ -232,7 +240,7 @@ var warnings = std.Vector.new([ 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 hydGBloPr = warning.new(msg: "HYD G+B SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "hydraulicPage"), 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"), @@ -243,7 +251,7 @@ var warnings = std.Vector.new([ 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 hydGYloPr = warning.new(msg: "HYD G+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "hydraulicPage"), 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"), @@ -253,7 +261,7 @@ var warnings = std.Vector.new([ var hydGYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), # AIR BLEED LEAK - var airBleedLeak = warning.new(msg: "AIR BLEED LEAK ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var airBleedLeak = warning.new(msg: "AIR BLEED LEAK ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "bleedPage"), var airBleedLeakShut = warning.new(msg: " -X BLEED..........SHUT", colour: "c"), # LEVEL 2 WARN diff --git a/Nasal/ECAM/ECAM-nodes.nas b/Nasal/ECAM/ECAM-nodes.nas index d19bf137..f14b0d0c 100644 --- a/Nasal/ECAM/ECAM-nodes.nas +++ b/Nasal/ECAM/ECAM-nodes.nas @@ -74,6 +74,11 @@ var FWC = { var warningNodes = { Logic: { + JE1TLAI: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-tla-idle"), + JE2TLAI: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-tla-idle"), + adr123Fault: props.globals.initNode("/ECAM/warnings/navigation/ADR123-fault"), + eng1OilLoPr: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-oil-lo-pr"), + eng2OilLoPr: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-oil-lo-pr"), altitudeAlert: props.globals.initNode("/ECAM/warnings/altitude-alert/c-chord"), altitudeAlertSteady: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-steady"), altitudeAlertFlash: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-flash"), @@ -151,6 +156,8 @@ var warningNodes = { gen1Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-1-off"), gen2Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-2-off"), spdBrkOut: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-still-out"), + excessPress: props.globals.initNode("/ECAM/warnings/press/exess-residual-pressure"), + excessCabAlt: props.globals.initNode("/ECAM/warnings/logic/press/excess-cabin-alt"), }, Timers: { apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), @@ -214,5 +221,7 @@ var warningNodes = { 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"), + cabPressExcessFlipflopTop: props.globals.initNode("/ECAM/warnings/logic/press/excess-cabin-alt-flipflop-top"), + cabPressExcessFlipflop: props.globals.initNode("/ECAM/warnings/logic/press/excess-cabin-alt-flipflop"), }, }; \ No newline at end of file diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 1b810c2d..9a7a93a0 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -214,7 +214,8 @@ var FMGCInternal = { mngSpd: 0, mngSpdCmd: 0, - landingTime: -99, + # This can't be init to -98, because we don't want it to run until WOW has gone to false and back to true + landingTime: -98, blockFuelTime: -99, fuelPredTime: -99, @@ -1212,8 +1213,9 @@ setlistener("/FMGC/internal/fuel-calculating", func() { # Maketimers var timer30secLanding = maketimer(1, func() { - if (pts.Sim.Time.elapsedSec.getValue() > FMGCInternal.landingTime + 30) { + if (pts.Sim.Time.elapsedSec.getValue() > (FMGCInternal.landingTime + 30)) { FMGCInternal.phase = 7; + FMGCNodes.phase.setValue(7); if (FMGCInternal.costIndexSet) { setprop("/FMGC/internal/last-cost-index", FMGCInternal.costIndex); diff --git a/Nasal/MCDU/F-PLN.nas b/Nasal/MCDU/F-PLN.nas index 65c2348c..a83f7c0f 100644 --- a/Nasal/MCDU/F-PLN.nas +++ b/Nasal/MCDU/F-PLN.nas @@ -122,11 +122,17 @@ var fplnItem = { return [" " ~ fmgc.flightPlanController.fromWptAlt, "mag"]; } elsif (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) { var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed + var cstrAlt = ""; + if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) { - return [" " ~ sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)), tcol]; + cstrAlt = "FL" ~ math.round(num(me.wp.alt_cstr) / 100); } else { - return [" " ~ sprintf("%5.0f", me.wp.alt_cstr), tcol]; + cstrAlt = me.wp.alt_cstr; } + + cstrAlt = (me.wp.alt_cstr_type == "above") ? "+" ~ cstrAlt : cstrAlt; + cstrAlt = (me.wp.alt_cstr_type == "below") ? "-" ~ cstrAlt : cstrAlt; + return [sprintf("%6s", cstrAlt), tcol]; } else { return ["------", "wht"]; } @@ -208,25 +214,25 @@ var fplnItem = { } elsif (find("/", scratchpadStore) != -1) { var scratchpadSplit = split("/", scratchpadStore); - if (size(scratchpadSplit[0]) == 0) { - if (num(scratchpadSplit[1]) != nil and (size(scratchpadSplit[1]) == 4 or size(scratchpadSplit[1]) == 5) and scratchpadSplit[1] >= 0 and scratchpadSplit[1] <= 39000) { - me.wp.setAltitude(math.round(scratchpadSplit[1], 10), "at"); + if (size(scratchpadSplit[0]) != 0) { + if (num(scratchpadSplit[0]) != nil and size(scratchpadSplit[0]) == 3 and scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 350) { + me.wp.setSpeed(scratchpadSplit[0], "at"); mcdu_scratchpad.scratchpads[me.computer].empty(); } else { mcdu_message(me.computer, "FORMAT ERROR"); } + } + + if (right(scratchpadSplit[1], 1) == "+") { + validateAltCstrFpln(left(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "above", me); + } elsif (right(scratchpadSplit[1], 1) == "-") { + validateAltCstrFpln(left(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "below", me); + } elsif (left(scratchpadSplit[1], 1) == "+") { + validateAltCstrFpln(right(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "above", me); + } elsif (left(scratchpadSplit[1], 1) == "-") { + validateAltCstrFpln(right(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "below", me); } else { - if (num(scratchpadSplit[0]) != nil and size(scratchpadSplit[0]) == 3 and scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 350 and - num(scratchpadSplit[1]) != nil and (size(scratchpadSplit[1]) == 4 or size(scratchpadSplit[1]) == 5) and scratchpadSplit[1] >= 0 and scratchpadSplit[1] <= 39000) { - me.wp.setSpeed(scratchpadSplit[0], "at"); - me.wp.setAltitude(math.round(scratchpadSplit[1], 10), "at"); - mcdu_scratchpad.scratchpads[me.computer].empty(); - } elsif (num(scratchpadSplit[0]) != nil and size(scratchpadSplit[0]) == 3 and scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 350 and size(scratchpadSplit[1]) == 0) { - me.wp.setSpeed(scratchpadSplit[0], "at"); - mcdu_scratchpad.scratchpads[me.computer].empty(); - } else { - mcdu_message(me.computer, "FORMAT ERROR"); - } + validateAltCstrFpln(scratchpadSplit[1], "at", me); } } elsif (num(scratchpadStore) != nil and size(scratchpadStore) == 3 and scratchpadStore >= 100 and scratchpadStore <= 350) { me.wp.setSpeed(scratchpadStore, "at"); @@ -240,6 +246,19 @@ var fplnItem = { }, }; +var validateAltCstrFpln = func(scratchpadStore, type, self) { + if (num(scratchpadStore) != nil and (size(scratchpadStore) >= 3 and size(scratchpadStore) <= 5)) { + if (scratchpadStore >= 100 and scratchpadStore <= 39000) { + self.wp.setAltitude(math.round(scratchpadStore, 10), type); + mcdu_scratchpad.scratchpads[self.computer].empty(); + } else { + mcdu_message(self.computer, "ENTRY OUT OF RANGE"); + } + } else { + mcdu_message(self.computer, "FORMAT ERROR"); + } +} + var staticText = { new: func(computer, text) { var sT = {parents:[staticText]}; diff --git a/Nasal/MCDU/VERTREV.nas b/Nasal/MCDU/VERTREV.nas index e3ced48d..000ec6d3 100644 --- a/Nasal/MCDU/VERTREV.nas +++ b/Nasal/MCDU/VERTREV.nas @@ -55,11 +55,17 @@ var vertRev = { getAlt: func() { if (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) { var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed + var cstrAlt = ""; + if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) { - return [sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)) ~ " ", tcol]; + cstrAlt = "FL" ~ math.round(num(me.wp.alt_cstr) / 100); } else { - return [sprintf("%5.0f", me.wp.alt_cstr) ~ " ", tcol]; + cstrAlt = me.wp.alt_cstr; } + + cstrAlt = (me.wp.alt_cstr_type == "above") ? "+" ~ cstrAlt : cstrAlt; + cstrAlt = (me.wp.alt_cstr_type == "below") ? "-" ~ cstrAlt : cstrAlt; + return [cstrAlt ~ (size(cstrAlt) == 6 ? "" : " "), tcol]; } else { return [nil,nil]; } @@ -242,18 +248,38 @@ var vertRev = { mcdu_scratchpad.scratchpads[me.computer].empty(); me._setupPageWithData(); canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); - } elsif (num(scratchpadStore) != nil and (size(scratchpadStore) == 4 or size(scratchpadStore) == 5) and scratchpadStore >= 0 and scratchpadStore <= 39000) { - me.wp.setAltitude(math.round(scratchpadStore, 10), "at"); - mcdu_scratchpad.scratchpads[me.computer].empty(); - me._setupPageWithData(); - canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); } else { - mcdu_message(me.computer, "FORMAT ERROR"); + if (right(scratchpadStore, 1) == "+") { + validateAltCstr(left(scratchpadStore, size(scratchpadStore) - 1), "above", me); + } elsif (right(scratchpadStore, 1) == "-") { + validateAltCstr(left(scratchpadStore, size(scratchpadStore) - 1), "below", me); + } elsif (left(scratchpadStore, 1) == "+") { + validateAltCstr(right(scratchpadStore, size(scratchpadStore) - 1), "above", me); + } elsif (left(scratchpadStore, 1) == "-") { + validateAltCstr(right(scratchpadStore, size(scratchpadStore) - 1), "below", me); + } else { + validateAltCstr(scratchpadStore, "at", me); + } } } }, }; +var validateAltCstr = func(scratchpadStore, type, self) { + if (num(scratchpadStore) != nil and (size(scratchpadStore) >= 3 and size(scratchpadStore) <= 5)) { + if (scratchpadStore >= 100 and scratchpadStore <= 39000) { + self.wp.setAltitude(math.round(scratchpadStore, 10), type); + mcdu_scratchpad.scratchpads[self.computer].empty(); + self._setupPageWithData(); + canvas_mcdu.pageSwitch[self.computer].setBoolValue(0); + } else { + mcdu_message(self.computer, "ENTRY OUT OF RANGE"); + } + } else { + mcdu_message(self.computer, "FORMAT ERROR"); + } +} + var updateCrzLvlCallback = func () { if (canvas_mcdu.myVertRev[0] != nil) { canvas_mcdu.myVertRev[0].updateR5(); diff --git a/Nasal/Systems/hydraulics.nas b/Nasal/Systems/hydraulics.nas index b32684e8..09c27f48 100644 --- a/Nasal/Systems/hydraulics.nas +++ b/Nasal/Systems/hydraulics.nas @@ -44,6 +44,7 @@ var HYD = { }, Pump: { yellowElec: props.globals.getNode("/systems/hydraulic/sources/yellow-elec/pump-operate"), + yellowElecFail: props.globals.getNode("/ECAM/warnings/hyd/yellow-elec-pump-fail"), }, Qty: { blueInput: props.globals.initNode("/systems/hydraulic/blue-qty-input", 0, "INT"), @@ -74,6 +75,12 @@ var HYD = { blueAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/blue-abnorm-lo-pr"), greenAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/green-abnorm-lo-pr"), yellowAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/yellow-abnorm-lo-pr"), + blueLoLvl: props.globals.getNode("/systems/hydraulic/relays/blue-reservoir-low-qty-switch"), + greenLoLvl: props.globals.getNode("/systems/hydraulic/relays/green-reservoir-low-qty-switch"), + yellowLoLvl: props.globals.getNode("/systems/hydraulic/relays/yellow-reservoir-low-qty-switch"), + blueReservoirOvht: props.globals.getNode("/systems/hydraulic/relays/blue-reservoir-overheat"), + greenReservoirOvht: props.globals.getNode("/systems/hydraulic/relays/green-reservoir-overheat"), + yellowReservoirOvht: props.globals.getNode("/systems/hydraulic/relays/yellow-reservoir-overheat"), }, init: func() { me.resetFailures(); diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index f64d1de9..9ab6b592 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -1624,7 +1624,7 @@ - /engines/engine[0]/n2-actual ge 59.4 + /engines/engine[1]/n2-actual ge 59.4 @@ -2674,9 +2674,9 @@ /ECAM/warnings/logic/eng/eng-1-tla-abv-6-output eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 /ECAM/warnings/logic/eng/eng-2-reverse eq 1 @@ -2693,9 +2693,9 @@ /ECAM/warnings/logic/eng/eng-1-tla-abv-6-2-output eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 /ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1 @@ -2712,9 +2712,9 @@ /ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 /ECAM/warnings/logic/eng/eng-1-reverse eq 1 @@ -2731,9 +2731,9 @@ /ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 /ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1 @@ -3135,6 +3135,36 @@ + + /controls/engines/engine[0]/cutoff-switch + 0.03333333333 + 100 + + + + + + /ECAM/warnings/logic/eng/eng-1-oil-lo-pr-cutoff-delay eq 0 + /ECAM/warnings/logic/eng/JE1NORUN eq 0 + /engines/engine[0]/oil-psi-actual lt 13 + + + + + /controls/engines/engine[1]/cutoff-switch + 0.03333333333 + 100 + + + + + + /ECAM/warnings/logic/eng/eng-2-oil-lo-pr-cutoff-delay eq 0 + /ECAM/warnings/logic/eng/JE2NORUN eq 0 + /engines/engine[1]/oil-psi-actual lt 13 + + + @@ -3157,6 +3187,114 @@ + + + + + + /ECAM/phases/phase-calculation/engines-1-2-not-running eq 1 + /ECAM/timer/ground-calc eq 1 + + + + + /ECAM/warnings/press/exess-residual-pressure-ground-input + 0.14285714285 + 100 + + + + + + /ECAM/warnings/press/exess-residual-pressure-ground eq 1 + /systems/pressurization/deltap-norm ge 0.1 + + + + + /ECAM/warnings/press/exess-residual-pressure-input + 0.2 + 100 + + + + + + /systems/pressurization/cabinalt-norm ge 9550 + + + + + /ECAM/warnings/timer/press/excess-cabin-alt-input + 1 + 100 + + + + + + /ECAM/warnings/timer/press/excess-cabin-alt eq 1 + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 10 + + + + + + + + + /systems/navigation/adr/computation/baro-alt-corrected-1-capt ge 10000 + /systems/navigation/adr/computation/baro-alt-corrected-2-capt ge 10000 + /systems/navigation/adr/computation/baro-alt-corrected-3-capt ge 10000 + + + /systems/navigation/adr/operating-1 eq 0 + /systems/navigation/adr/operating-2 eq 0 + /systems/navigation/adr/operating-3 eq 0 + + + /ECAM/warnings/logic/press/excess-cabin-alt eq 1 + /ECAM/warnings/logic/press/excess-cabin-alt-pulse eq 1 + + + + + + + + + /systems/navigation/adr/computation/baro-alt-corrected-1-capt ge 16000 + /systems/navigation/adr/computation/baro-alt-corrected-2-capt ge 16000 + /systems/navigation/adr/computation/baro-alt-corrected-3-capt ge 16000 + + + /systems/navigation/adr/operating-1 eq 0 + /systems/navigation/adr/operating-2 eq 0 + /systems/navigation/adr/operating-3 eq 0 + + + /ECAM/warnings/logic/press/excess-cabin-alt eq 1 + /ECAM/warnings/logic/press/excess-cabin-alt-pulse eq 1 + + + + + + + /ECAM/warnings/logic/phase-3-10-pulse-input eq 1 + /ECAM/warnings/logic/phase-3-10-pulse eq 1 + + + + + @@ -3655,9 +3793,9 @@ - - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + + /ECAM/warnings/logic/eng/JE1NORUN eq 0 + /ECAM/warnings/logic/eng/JE2NORUN eq 0 @@ -3670,8 +3808,8 @@ - /engines/engine[0]/state ne 3 - /engines/engine[1]/state ne 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 /ECAM/timer/ground-calc eq 0 @@ -3685,7 +3823,7 @@ - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 0 /ECAM/warning-phase ne 1 /ECAM/warning-phase ne 2 @@ -3704,7 +3842,7 @@ - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 0 /ECAM/warning-phase ne 1 /ECAM/warning-phase ne 2 @@ -3792,21 +3930,8 @@ - - - - /ECAM/warning-phase le 2 - /ECAM/warning-phase ge 9 - - /engines/engine[0]/state eq 3 - - - /ECAM/warning-phase gt 2 - /ECAM/warning-phase lt 9 - /ECAM/warning-phase ne 4 - /ECAM/warning-phase ne 5 - - + /ECAM/warning-phase ne 4 + /ECAM/warning-phase ne 5 /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1 @@ -3815,21 +3940,8 @@ - - - - /ECAM/warning-phase le 2 - /ECAM/warning-phase ge 9 - - /engines/engine[1]/state eq 3 - - - /ECAM/warning-phase gt 2 - /ECAM/warning-phase lt 9 - /ECAM/warning-phase ne 4 - /ECAM/warning-phase ne 5 - - + /ECAM/warning-phase ne 4 + /ECAM/warning-phase ne 5 /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1 @@ -3838,8 +3950,7 @@ - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/dual-failure eq 0 /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1 /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1 @@ -3848,18 +3959,16 @@ - /ECAM/timer/ground-calc eq 0 - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + /ECAM/timer/ground-calc ne 1 + /ECAM/warnings/logic/eng/dual-failure eq 0 - /ECAM/timer/ground-calc eq 0 - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + /ECAM/timer/ground-calc ne 1 + /ECAM/warnings/logic/eng/dual-failure eq 0 /ECAM/warnings/logic/SFLAPEXT eq 1 @@ -3883,9 +3992,8 @@ - /ECAM/timer/ground-calc eq 0 - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + /ECAM/timer/ground-calc ne 1 + /ECAM/warnings/logic/eng/dual-failure eq 0 /ECAM/warnings/logic/SFLAPEXT eq 1 @@ -3911,6 +4019,28 @@ + + + + /systems/hydraulic/sources/yellow-elec/pump-operate eq 1 + /systems/hydraulic/yellow-psi lt 1450 + + + + + + + + /systems/hydraulic/sources/yellow-elec/pump-operate eq 1 + /systems/hydraulic/yellow-psi ge 1450 + + + /ECAM/warnings/logic/phase-2-pulse-input eq 1 + /ECAM/warnings/logic/phase-2-pulse eq 1 + + + + @@ -4133,7 +4263,7 @@ - + diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml index 97dee05e..0e286392 100644 --- a/Systems/ecam-proprules.xml +++ b/Systems/ecam-proprules.xml @@ -586,6 +586,17 @@ /ECAM/warnings/timer/phase-1-pulse + + monostable + + + /ECAM/warnings/logic/phase-2-pulse-input + + /ECAM/warnings/logic/phase-2-pulse + + monostable + + monostable + + + /ECAM/warnings/logic/phase-3-10-pulse-input + + /ECAM/warnings/logic/phase-3-10-pulse + + monostable + + monostable + + + /ECAM/warnings/logic/press/excess-cabin-alt + + /ECAM/warnings/logic/press/excess-cabin-alt-pulse + + monostable + + + RS + + /ECAM/warnings/hyd/yellow-elec-pump-fail-set + + + /ECAM/warnings/hyd/yellow-elec-pump-fail-reset + + /ECAM/warnings/hyd/yellow-elec-pump-fail + + + + SR + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-set + + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-reset + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop + + + + SR + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-top-set + + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-reset + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-top +