From f85886d395e56b79540d0905027db2c317c28a20 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Thu, 14 May 2020 12:22:52 +0100 Subject: [PATCH] Pack flow valves shown properly on the bleed page --- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 14 ++++---- Nasal/Systems/pneumatics.nas | 4 +-- Systems/a320-aircond.xml | 14 ++++++-- Systems/lower-ecam.xml | 35 ++++++++++++++++++++ 4 files changed, 55 insertions(+), 12 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index 00b2292e..6da50d85 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -963,14 +963,13 @@ var canvas_lowerECAM_bleed = { me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941); } - var flow_pos = systems.PNEU.Packs.packFlow1.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50 - flow_pos = flow_pos * D2R; + var flow_pos = systems.PNEU.Packs.packFlow1.getValue() * D2R; me["BLEED-Pack-1-Packflow-needle"].setRotation(flow_pos); if (systems.PNEU.Valves.pack1.getValue() == 0) { - me["BLEED-Pack-1-Packflow-needle"].setColor(0.7333,0.3803,0); + me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.7333,0.3803,0); } else { - me["BLEED-Pack-1-Packflow-needle"].setColor(0.0509,0.7529,0.2941); + me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941); } var pack_state = systems.PNEU.Valves.pack1.getValue(); @@ -1006,14 +1005,13 @@ var canvas_lowerECAM_bleed = { me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941); } - var flow_pos = systems.PNEU.Packs.packFlow2.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50 - flow_pos = flow_pos * D2R; + flow_pos = systems.PNEU.Packs.packFlow2.getValue() * D2R; me["BLEED-Pack-2-Packflow-needle"].setRotation(flow_pos); if (systems.PNEU.Valves.pack2.getValue() == 0) { - me["BLEED-Pack-2-Packflow-needle"].setColor(0.7333,0.3803,0); + me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.7333,0.3803,0); } else { - me["BLEED-Pack-2-Packflow-needle"].setColor(0.0509,0.7529,0.2941); + me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941); } var pack_state = systems.PNEU.Valves.pack2.getValue(); diff --git a/Nasal/Systems/pneumatics.nas b/Nasal/Systems/pneumatics.nas index bd7ebd8a..4764f18b 100644 --- a/Nasal/Systems/pneumatics.nas +++ b/Nasal/Systems/pneumatics.nas @@ -46,8 +46,8 @@ var PNEU = { xbleed: props.globals.getNode("/systems/failures/pneumatics/x-bleed-valve"), }, Packs: { - packFlow1: props.globals.getNode("/systems/air-conditioning/packs/pack-flow-1"), - packFlow2: props.globals.getNode("/systems/air-conditioning/packs/pack-flow-2"), + packFlow1: props.globals.getNode("/ECAM/Lower/pack-1-flow-output"), + packFlow2: props.globals.getNode("/ECAM/Lower/pack-2-flow-output"), pack1OutTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-1-output-temp"), pack2OutTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-2-output-temp"), pack1OutletTemp: props.globals.getNode("/systems/air-conditioning/packs/pack-1-outlet-temp"), diff --git a/Systems/a320-aircond.xml b/Systems/a320-aircond.xml index eb22796e..5d011749 100644 --- a/Systems/a320-aircond.xml +++ b/Systems/a320-aircond.xml @@ -116,7 +116,7 @@ - + /systems/air-conditioning/valves/flow-control-valve-1 @@ -125,7 +125,12 @@ - + + /systems/air-conditioning/packs/pack-flow-1-calc + 5 + + + /systems/air-conditioning/valves/flow-control-valve-2 @@ -133,6 +138,11 @@ + + + /systems/air-conditioning/packs/pack-flow-2-calc + 5 + diff --git a/Systems/lower-ecam.xml b/Systems/lower-ecam.xml index 09ae6ad5..4ce71251 100644 --- a/Systems/lower-ecam.xml +++ b/Systems/lower-ecam.xml @@ -182,5 +182,40 @@ /fdm/jsbsim/hydraulics/elevator-trim/final-deg /ECAM/Lower/elevator-trim-deg + + + Pack 1 Flow Output + gain + 1.0 + + + + /systems/air-conditioning/packs/pack-flow-1 + 0.8-80 + 1.0 0 + 1.2 80 +
+
+ + /ECAM/Lower/pack-1-flow-output +
+ + + + Pack 1 Flow Output + gain + 1.0 + + + + /systems/air-conditioning/packs/pack-flow-2 + 0.8-80 + 1.0 0 + 1.2 80 +
+
+ + /ECAM/Lower/pack-2-flow-output +