From 6863e6b4d8ae9a0a97c35ecded5691b68117ade2 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Tue, 10 May 2022 16:05:47 +0100 Subject: [PATCH 1/3] Pneumatics - make consistent with 3D branch --- Nasal/Systems/pneumatics.nas | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/Nasal/Systems/pneumatics.nas b/Nasal/Systems/pneumatics.nas index 3689c740..ecd0be20 100644 --- a/Nasal/Systems/pneumatics.nas +++ b/Nasal/Systems/pneumatics.nas @@ -21,7 +21,7 @@ var outflowpos = nil; var targetvs = nil; var eng1_starter = nil; var eng2_starter = nil; - + # Main class var PNEU = { Fail: { @@ -70,14 +70,15 @@ var PNEU = { blower: props.globals.getNode("/controls/pneumatics/switches/blower"), cabinFans: props.globals.getNode("/controls/pneumatics/switches/cabin-fans"), extract: props.globals.getNode("/controls/pneumatics/switches/extract"), + groundAir: props.globals.getNode("/controls/pneumatics/switches/ground-air"), hotAir: props.globals.getNode("/controls/pneumatics/switches/hot-air"), pack1: props.globals.getNode("/controls/pneumatics/switches/pack-1"), pack2: props.globals.getNode("/controls/pneumatics/switches/pack-2"), packFlow: props.globals.getNode("/controls/pneumatics/switches/pack-flow"), ramAir: props.globals.getNode("/controls/pneumatics/switches/ram-air"), tempAft: props.globals.getNode("/controls/pneumatics/switches/temp-cabin-aft"), - tempFwd: props.globals.getNode("/controls/pneumatics/switches/temp-cabin-fwd"), tempCockpit: props.globals.getNode("/controls/pneumatics/switches/temp-cockpit"), + tempFwd: props.globals.getNode("/controls/pneumatics/switches/temp-cabin-fwd"), xbleed: props.globals.getNode("/controls/pneumatics/switches/x-bleed"), }, Warnings: { @@ -104,7 +105,23 @@ var PNEU = { }, pressMode: props.globals.getNode("/systems/pressurization/mode", 1), init: func() { - me.resetFail(); + me.resetFailures(); + me.Switch.apu.setBoolValue(0); + me.Switch.bleed1.setBoolValue(1); + me.Switch.bleed2.setBoolValue(1); + me.Switch.blower.setBoolValue(0); + me.Switch.cabinFans.setBoolValue(1); + me.Switch.extract.setBoolValue(0); + me.Switch.groundAir.setBoolValue(0); + me.Switch.hotAir.setBoolValue(1); + me.Switch.pack1.setBoolValue(0); + me.Switch.pack2.setBoolValue(0); + me.Switch.packFlow.setValue(1); + me.Switch.ramAir.setBoolValue(0); + me.Switch.tempAft.setValue(0.5); + me.Switch.tempCockpit.setValue(0.5); + me.Switch.tempFwd.setValue(0.5); + me.Switch.xbleed.setValue(1); # Legacy pressurization system setprop("/systems/pressurization/mode", "GN"); @@ -143,7 +160,7 @@ var PNEU = { setprop("/controls/oxygen/passenger-mask-deploy-man", 0); setprop("/controls/oxygen/passenger-mask-reset", 0); # this is the TMR RESET pb on the maintenance panel, needs 3D model }, - resetFail: func() { + resetFailures: func() { me.Fail.apu.setBoolValue(0); me.Fail.bleed1.setBoolValue(0); me.Fail.bleed2.setBoolValue(0); From 6534b29ebbc7b243090cbb02ef9d92225256398c Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Tue, 10 May 2022 16:07:12 +0100 Subject: [PATCH 2/3] ACConfig --- AircraftConfig/acconfig.nas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index 549c83a5..06679d6b 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -22,7 +22,7 @@ var spinning = maketimer(0.05, func { var failReset = func { systems.ELEC.resetFail(); - systems.PNEU.resetFail(); + systems.PNEU.resetFailures(); fbw.FBW.resetFail(); systems.HYD.resetFail(); } From 55e0f9a5c36a5e46c29ecc389dc07d6e87c81277 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Tue, 10 May 2022 16:08:56 +0100 Subject: [PATCH 3/3] Fix --- Nasal/Systems/pneumatics.nas | 2 -- 1 file changed, 2 deletions(-) diff --git a/Nasal/Systems/pneumatics.nas b/Nasal/Systems/pneumatics.nas index ecd0be20..4d120959 100644 --- a/Nasal/Systems/pneumatics.nas +++ b/Nasal/Systems/pneumatics.nas @@ -70,7 +70,6 @@ var PNEU = { blower: props.globals.getNode("/controls/pneumatics/switches/blower"), cabinFans: props.globals.getNode("/controls/pneumatics/switches/cabin-fans"), extract: props.globals.getNode("/controls/pneumatics/switches/extract"), - groundAir: props.globals.getNode("/controls/pneumatics/switches/ground-air"), hotAir: props.globals.getNode("/controls/pneumatics/switches/hot-air"), pack1: props.globals.getNode("/controls/pneumatics/switches/pack-1"), pack2: props.globals.getNode("/controls/pneumatics/switches/pack-2"), @@ -112,7 +111,6 @@ var PNEU = { me.Switch.blower.setBoolValue(0); me.Switch.cabinFans.setBoolValue(1); me.Switch.extract.setBoolValue(0); - me.Switch.groundAir.setBoolValue(0); me.Switch.hotAir.setBoolValue(1); me.Switch.pack1.setBoolValue(0); me.Switch.pack2.setBoolValue(0);