From 38d2279b5e0f958cfa13991c802fd2a26bde2bde Mon Sep 17 00:00:00 2001 From: merspieler Date: Fri, 13 Apr 2018 19:21:18 +0200 Subject: [PATCH 1/5] Make status page visible Signed-off-by: merspieler --- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 47 ++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index ec32b6d3..7acd8ed7 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -15,6 +15,7 @@ var lowerECAM_fctl = nil; var lowerECAM_fuel = nil; var lowerECAM_hyd = nil; var lowerECAM_press = nil; +var lowerECAM_status = nil; var lowerECAM_wheel = nil; var lowerECAM_test = nil; var lowerECAM_display = nil; @@ -124,6 +125,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_test.page.show(); lowerECAM_test.update(); @@ -140,6 +142,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_apu.update(); @@ -153,6 +156,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_bleed.update(); @@ -166,6 +170,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_cond.update(); @@ -179,6 +184,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_door.update(); @@ -192,6 +198,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_elec.update(); @@ -205,6 +212,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_eng.update(); @@ -218,6 +226,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.show(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_fctl.update(); @@ -231,6 +240,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.show(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_fuel.update(); @@ -244,9 +254,24 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.show(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); lowerECAM_press.update(); + } else if (page == "sts") { + lowerECAM_apu.page.hide(); + lowerECAM_bleed.page.hide(); + lowerECAM_cond.page.hide(); + lowerECAM_door.page.hide(); + lowerECAM_elec.page.hide(); + lowerECAM_eng.page.hide(); + lowerECAM_fctl.page.hide(); + lowerECAM_fuel.page.hide(); + lowerECAM_press.page.hide(); + lowerECAM_status.page.show(); + lowerECAM_hyd.page.hide(); + lowerECAM_wheel.page.hide(); + lowerECAM_status.update(); } else if (page == "hyd") { lowerECAM_apu.page.hide(); lowerECAM_bleed.page.hide(); @@ -257,6 +282,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.show(); lowerECAM_wheel.page.hide(); lowerECAM_hyd.update(); @@ -270,6 +296,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.show(); lowerECAM_wheel.update(); @@ -283,6 +310,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); } @@ -298,6 +326,7 @@ var canvas_lowerECAM_base = { lowerECAM_fctl.page.hide(); lowerECAM_fuel.page.hide(); lowerECAM_press.page.hide(); + lowerECAM_status.page.hide(); lowerECAM_hyd.page.hide(); lowerECAM_wheel.page.hide(); } @@ -1781,6 +1810,22 @@ var canvas_lowerECAM_press = { }, }; +var canvas_lowerECAM_status = { + new: func(canvas_group, file) { + var m = {parents: [canvas_lowerECAM_status, canvas_lowerECAM_base]}; + m.init(canvas_group, file); + + return m; + }, + getKeys: func() { + return ["TAT","SAT","GW","UTCh","UTCm"]; + }, + update: func() { + + me.updateBottomStatus(); + }, +}; + var canvas_lowerECAM_hyd = { new: func(canvas_group, file) { var m = {parents: [canvas_lowerECAM_hyd, canvas_lowerECAM_base]}; @@ -2452,6 +2497,7 @@ setlistener("sim/signals/fdm-initialized", func { var groupFctl = lowerECAM_display.createGroup(); var groupFuel = lowerECAM_display.createGroup(); var groupPress = lowerECAM_display.createGroup(); + var groupStatus = lowerECAM_display.createGroup(); var groupHyd = lowerECAM_display.createGroup(); var groupWheel = lowerECAM_display.createGroup(); var group_test = lowerECAM_display.createGroup(); @@ -2465,6 +2511,7 @@ setlistener("sim/signals/fdm-initialized", func { lowerECAM_fctl = canvas_lowerECAM_fctl.new(groupFctl, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/fctl.svg"); lowerECAM_fuel = canvas_lowerECAM_fuel.new(groupFuel, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/fuel.svg"); lowerECAM_press = canvas_lowerECAM_press.new(groupPress, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/press.svg"); + lowerECAM_status = canvas_lowerECAM_status.new(groupStatus, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/status.svg"); lowerECAM_hyd = canvas_lowerECAM_hyd.new(groupHyd, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/hyd.svg"); lowerECAM_wheel = canvas_lowerECAM_wheel.new(groupWheel, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/wheel.svg"); lowerECAM_test = canvas_lowerECAM_test.new(group_test, "Aircraft/IDG-A32X/Models/Instruments/Common/res/du-test.svg"); From a98f04191dfb7304319c6c4b1f576cf6ebd7609a Mon Sep 17 00:00:00 2001 From: merspieler Date: Fri, 13 Apr 2018 22:49:03 +0200 Subject: [PATCH 2/5] Added HYD stuff Signed-off-by: merspieler --- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 129 ++++++++++++++++--- Nasal/hydraulics.nas | 11 ++ 2 files changed, 125 insertions(+), 15 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index 7acd8ed7..d219fb38 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -1892,10 +1892,35 @@ var canvas_lowerECAM_hyd = { if (getprop("/controls/hydraulic/ptu") == 1 and getprop("/systems/hydraulic/ptu-fault") == 0) { me["PTU-connection"].setColor(0.0509,0.7529,0.2941); - me["PTU-Auto-or-off"].setColor(0.0509,0.7529,0.2941); + + if (getprop("/systems/hydraulic/ptu-active") == 1) { + if (getprop("/systems/hydraulic/ptu-supplies") == "yellow") { + print("if"); + me["PTU-Supply-Line"].show(); + me["PTU-supply-yellow"].show(); + me["PTU-supply-green"].hide(); + me["PTU-Auto-or-off"].hide(); + } else if (getprop("/systems/hydraulic/ptu-supplies") == "green") { + print("else if"); + me["PTU-Supply-Line"].show(); + me["PTU-supply-yellow"].hide(); + me["PTU-supply-green"].show(); + me["PTU-Auto-or-off"].hide(); + } + } else { + me["PTU-Auto-or-off"].setColor(0.0509,0.7529,0.2941); + me["PTU-Supply-Line"].hide(); + me["PTU-supply-yellow"].hide(); + me["PTU-supply-green"].hide(); + me["PTU-Auto-or-off"].show(); + } } else { me["PTU-connection"].setColor(0.7333,0.3803,0); me["PTU-Auto-or-off"].setColor(0.7333,0.3803,0); + me["PTU-Supply-Line"].hide(); + me["PTU-supply-yellow"].hide(); + me["PTU-supply-green"].hide(); + me["PTU-Auto-or-off"].show(); } if (getprop("/engines/engine[0]/n2-actual") >= 59) { @@ -1972,22 +1997,96 @@ var canvas_lowerECAM_hyd = { } else { me["ELEC-Yellow-on"].show(); me["ELEC-Yellow-off"].hide(); + if (getprop("/systems/hydraulic/yellow-psi") >= 1500) { + me["ELEC-Yellow-on"].setColor(0.0509,0.7529,0.2941); + } else { + me["ELEC-Yellow-on"].setColor(0.7333,0.3803,0); + } } - # hiding elements which have no props in the tree yet and doesn't suite in in normal ops - # TODO add these when they are in the prop tree - me["LO-AIR-PRESS-Green"].hide(); - me["LO-AIR-PRESS-Blue"].hide(); - me["LO-AIR-PRESS-Yellow"].hide(); - me["ELEC-OVHT-Yellow"].hide(); - me["ELEC-OVHT-Blue"].hide(); - me["RAT-not-stowed"].hide(); - me["PTU-Supply-Line"].hide(); - me["PTU-supply-yellow"].hide(); - me["PTU-supply-green"].hide(); - me["OVHT-Yellow"].hide(); - me["OVHT-Green"].hide(); - me["OVHT-Blue"].hide(); + if (getprop("/systems/hydraulic/yellow-resv-lo-air-press") == 1) { + me["LO-AIR-PRESS-Yellow"].show(); + } else { + me["LO-AIR-PRESS-Yellow"].hide(); + } + + if (getprop("/systems/hydraulic/blue-resv-lo-air-press") == 1) { + me["LO-AIR-PRESS-Blue"].show(); + } else { + me["LO-AIR-PRESS-Blue"].hide(); + } + + if (getprop("/systems/hydraulic/green-resv-lo-air-press") == 1) { + me["LO-AIR-PRESS-Green"].show(); + } else { + me["LO-AIR-PRESS-Green"].hide(); + } + + if (getprop("/systems/hydraulic/elec-pump-yellow-ovht") == 1) { + me["ELEC-OVHT-Yellow"].show(); + } else { + me["ELEC-OVHT-Yellow"].hide(); + } + + if (getprop("/systems/hydraulic/elec-pump-blue-ovht") == 1) { + me["ELEC-OVHT-Blue"].show(); + } else { + me["ELEC-OVHT-Blue"].hide(); + } + + if (getprop("/controls/hydraulic/rat-deployed") == 1) { + me["RAT-stowed"].hide(); + me["RAT-not-stowed"].show(); + } else { + me["RAT-stowed"].show(); + me["RAT-not-stowed"].hide(); + } + + if (getprop("/systems/hydraulic/yellow-resv-ovht") == 1) { + me["OVHT-Yellow"].show(); + } else { + me["OVHT-Yellow"].hide(); + } + + if (getprop("/systems/hydraulic/blue-resv-ovht") == 1) { + me["OVHT-Green"].show(); + } else { + me["OVHT-Green"].hide(); + } + + if (getprop("/systems/hydraulic/green-resv-ovht") == 1) { + me["OVHT-Blue"].show(); + } else { + me["OVHT-Blue"].hide(); + } + + if (getprop("/systems/electrical/bus/ac1") > 110) { + me["ELEC-Blue-label"].setColor(0.8078,0.8039,0.8078); + } else { + me["ELEC-Blue-label"].setColor(0.7333,0.3803,0); + } + + if (getprop("/systems/electrical/bus/ac2") > 110) { + me["ELEC-Yellow-label"].setColor(0.8078,0.8039,0.8078); + } else { + me["ELEC-Yellow-label"].setColor(0.7333,0.3803,0); + } + + if (getprop("/systems/hydraulic/yellow-fire-valve") == 1) { + me["Fire-Valve-Yellow"].setColor(0.7333,0.3803,0); + me["Fire-Valve-Yellow"].setRotation(90 * D2R) + } else { + me["Fire-Valve-Yellow"].setColor(0.0509,0.7529,0.2941); + me["Fire-Valve-Yellow"].setRotation(0) + } + + if (getprop("/systems/hydraulic/green-fire-valve") == 1) { + me["Fire-Valve-Green"].setColor(0.7333,0.3803,0); + me["Fire-Valve-Green"].setRotation(90 * D2R) + } else { + me["Fire-Valve-Green"].setColor(0.0509,0.7529,0.2941); + me["Fire-Valve-Green"].setRotation(0) + } me.updateBottomStatus(); }, diff --git a/Nasal/hydraulics.nas b/Nasal/hydraulics.nas index d9d20ec4..bffe7247 100644 --- a/Nasal/hydraulics.nas +++ b/Nasal/hydraulics.nas @@ -78,6 +78,17 @@ var HYD = { setprop("/systems/hydraulic/elec-pump-b-fault", 0); setprop("/systems/hydraulic/elec-pump-y-fault", 0); setprop("/systems/hydraulic/ptu-fault", 0); + setprop("/systems/hydraulic/ptu-supplies", "XX"); + setprop("/systems/hydraulic/yellow-resv-lo-air-press", 0); + setprop("/systems/hydraulic/blue-resv-lo-air-press", 0); + setprop("/systems/hydraulic/green-resv-lo-air-press", 0); + setprop("/systems/hydraulic/yellow-resv-ovht", 0); + setprop("/systems/hydraulic/blue-resv-ovht", 0); + setprop("/systems/hydraulic/green-resv-ovht", 0); + setprop("/systems/hydraulic/elec-pump-yellow-ovht", 0); + setprop("/systems/hydraulic/elec-pump-blue-ovht", 0); + setprop("/systems/hydraulic/yellow-fire-valve", 0); + setprop("/systems/hydraulic/green-fire-valve", 0); }, loop: func() { eng1_pump_sw = getprop("/controls/hydraulic/eng1-pump"); From 26af64791983ac17e536724c3745155e92fc95c1 Mon Sep 17 00:00:00 2001 From: merspieler Date: Sat, 14 Apr 2018 11:48:32 +0200 Subject: [PATCH 3/5] Changes to the bleed.svg Signed-off-by: merspieler --- Models/Instruments/Lower-ECAM/res/bleed.svg | 193 ++++++++++---------- 1 file changed, 92 insertions(+), 101 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/res/bleed.svg b/Models/Instruments/Lower-ECAM/res/bleed.svg index 5061cc60..677f5d0b 100644 --- a/Models/Instruments/Lower-ECAM/res/bleed.svg +++ b/Models/Instruments/Lower-ECAM/res/bleed.svg @@ -12,7 +12,7 @@ viewBox="0 0 1024 1024" version="1.1" id="svg2" - inkscape:version="0.91 r13725" + inkscape:version="0.92.1 r15371" sodipodi:docname="bleed.svg"> @@ -38,15 +38,15 @@ inkscape:pageopacity="1" inkscape:pageshadow="2" inkscape:window-width="1920" - inkscape:window-height="1027" + inkscape:window-height="1047" id="namedview371" showgrid="true" inkscape:zoom="0.47" - inkscape:cx="575.50811" - inkscape:cy="214.10909" - inkscape:window-x="1592" - inkscape:window-y="-8" - inkscape:window-maximized="1" + inkscape:cx="557.40426" + inkscape:cy="473.3889" + inkscape:window-x="0" + inkscape:window-y="33" + inkscape:window-maximized="0" inkscape:current-layer="svg2"> - ° C - + + - ° C - + + ICE - - + ANTI - - ANTI + + ICE - + x="171.19373" + id="tspan5836-7" + sodipodi:role="line">ICE 120000 °C Date: Sat, 14 Apr 2018 11:51:25 +0200 Subject: [PATCH 4/5] Added vims swap files to the .gitignore Signed-off-by: merspieler --- .gitignore | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a6ee3646..24d6568e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ -#ignore generated backup files +# ignore generated backup files *.*~ .*~ MyDevWIP SHS -AKV.* \ No newline at end of file +AKV.* +# ignore swap files +*.swp +*.swo From b405e027259075cb1e06e08731e330d54223ada5 Mon Sep 17 00:00:00 2001 From: merspieler Date: Thu, 19 Apr 2018 23:36:36 +0200 Subject: [PATCH 5/5] Added major bleed logic Signed-off-by: merspieler --- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 261 ++++++++++++++++++- Models/Instruments/Lower-ECAM/res/bleed.svg | 100 +++---- Nasal/pneumatics.nas | 25 ++ 3 files changed, 339 insertions(+), 47 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index d219fb38..df3afb6d 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -469,10 +469,267 @@ var canvas_lowerECAM_bleed = { return m; }, getKeys: func() { - return ["TAT","SAT","GW","UTCh","UTCm"]; + return ["TAT","SAT","GW","UTCh","UTCm", "BLEED-XFEED", "BLEED-Ram-Air", "BLEED-APU", "BLEED-HP-Valve-1", + "BLEED-ENG-1", "BLEED-HP-Valve-2", "BLEED-ENG-2", "BLEED-Precooler-1-Inlet-Press", "BLEED-Precooler-1-Outlet-Temp", + "BLEED-Precooler-2-Inlet-Press", "BLEED-Precooler-2-Outlet-Temp", "BLEED-ENG-1-label", "BLEED-ENG-2-label", + "BLEED-GND", "BLEED-Pack-1-Flow-Valve", "BLEED-Pack-2-Flow-Valve", "BLEED-Pack-1-Out-Temp", + "BLEED-Pack-1-Comp-Out-Temp", "BLEED-Pack-1-Packflow-needel", "BLEED-Pack-1-Bypass-needel", "BLEED-Pack-2-Out-Temp", + "BLEED-Pack-2-Bypass-needel", "BLEED-Pack-2-Comp-Out-Temp", "BLEED-Pack-2-Packflow-needel", "BLEED-Anti-Ice-Left", + "BLEED-Anti-Ice-Right", "BLEED-HP-2-connection", "BLEED-HP-1-connection", "BLEED-ANTI-ICE-ARROW-LEFT", "BLEED-ANTI-ICE-ARROW-RIGHT"]; }, update: func() { - + # X BLEED + if (getprop("/systems/pneumatic/xbleed-state") == "transit") { + me["BLEED-XFEED"].setColor(0.7333,0.3803,0); + me["BLEED-XFEED"].setRotation(45 * D2R); + } else { + if (getprop("/systems/pneumatic/xbleed-state") == "open") { + var xbleed_state = 1; + } else { + var xbleed_state = 0; + } + + if (xbleed_state == 1) { + me["BLEED-XFEED"].setRotation(0); + } else { + me["BLEED-XFEED"].setRotation(90 * D2R); + } + if (xbleed_state == getprop("/systems/pneumatic/xbleed")) { + me["BLEED-XFEED"].setColor(0.0509,0.7529,0.2941); + } else { + me["BLEED-XFEED"].setColor(0.7333,0.3803,0); + } + } + + # HP valve 1 + var hp_valve_state = getprop("/systems/pneumatic/hp-valve-1-state"); + + if (hp_valve_state == 1) { + me["BLEED-HP-Valve-1"].setRotation(90 * D2R); + } else { + me["BLEED-HP-Valve-1"].setRotation(0); + } + if (hp_valve_state == getprop("/systems/pneumatic/hp-valve-1")) { + me["BLEED-HP-Valve-1"].setColor(0.0509,0.7529,0.2941); + } else { + me["BLEED-HP-Valve-1"].setColor(0.7333,0.3803,0); + } + + # HP valve 2 + var hp_valve_state = getprop("/systems/pneumatic/hp-valve-2-state"); + + if (hp_valve_state == 1) { + me["BLEED-HP-Valve-2"].setRotation(90 * D2R); + } else { + me["BLEED-HP-Valve-2"].setRotation(0); + } + if (hp_valve_state == getprop("/systems/pneumatic/hp-valve-2")) { + me["BLEED-HP-Valve-2"].setColor(0.0509,0.7529,0.2941); + } else { + me["BLEED-HP-Valve-2"].setColor(0.7333,0.3803,0); + } + + # ENG BLEED valve 1 + var eng_valve_state = getprop("/systems/pneumatic/eng-valve-1-state"); + + if (eng_valve_state == 1) { + me["BLEED-ENG-1"].setRotation(90 * D2R); + } else { + me["BLEED-ENG-1"].setRotation(0); + } + if (eng_valve_state == getprop("/systems/pneumatic/eng-valve-1")) { + me["BLEED-ENG-1"].setColor(0.0509,0.7529,0.2941); + } else { + me["BLEED-ENG-1"].setColor(0.7333,0.3803,0); + } + + # ENG BLEED valve 2 + var eng_valve_state = getprop("/systems/pneumatic/eng-valve-2-state"); + + if (eng_valve_state == 1) { + me["BLEED-ENG-2"].setRotation(90 * D2R); + } else { + me["BLEED-ENG-2"].setRotation(0); + } + if (eng_valve_state == getprop("/systems/pneumatic/eng-valve-2")) { + me["BLEED-ENG-2"].setColor(0.0509,0.7529,0.2941); + } else { + me["BLEED-ENG-2"].setColor(0.7333,0.3803,0); + } + + # Precooler inlet 1 + var precooler_psi = getprop("/systems/pneumatic/precooler-1-psi"); + me["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi))); + if (precooler_psi < 4 or precooler_psi > 57) { + me["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Precooler-1-Inlet-Press"].setColor(0.0509,0.7529,0.2941); + } + + # Precooler inlet 2 + var precooler_psi = getprop("/systems/pneumatic/precooler-2-psi"); + me["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi))); + if (precooler_psi < 4 or precooler_psi > 57) { + me["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Precooler-2-Inlet-Press"].setColor(0.0509,0.7529,0.2941); + } + + # Precooler outlet 1 + var precooler_temp = getprop("/systems/pneumatic/precooler-1-temp"); + me["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp))); + if (precooler_temp < 150 or getprop("/systems/pneumatic/precooler-1-ovht")) { + me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.0509,0.7529,0.2941); + } + + # Precooler outlet 2 + var precooler_temp = getprop("/systems/pneumatic/precooler-2-temp"); + me["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp))); + if (precooler_temp < 150 or getprop("/systems/pneumatic/precooler-2-ovht") == 1) { + me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.0509,0.7529,0.2941); + } + + # GND air + if (getprop("/velocities/groundspeed-kt") < 1) { + me["BLEED-GND"].show(); + } else { + me["BLEED-GND"].hide(); + } + + # WING ANTI ICE + if (getprop("/controls/switches/wing") == 1) { + me["BLEED-Anti-Ice-Left"].show(); + me["BLEED-Anti-Ice-Right"].show(); + # TODO when seperated valves for left and right wing are implemented, do the following `if` and `else` clause for each wing. + if (getprop("/controls/deice/wing")) { + me["BLEED-ANTI-ICE-ARROW-LEFT"].show(); + me["BLEED-ANTI-ICE-ARROW-RIGHT"].show(); + if (getprop("/systems/pneumatic/total-psi") < 4 or getprop("/systems/pneumatic/total-psi") > 57) { + me["BLEED-ANTI-ICE-ARROW-LEFT"].setColor(0.7333,0.3803,0); + me["BLEED-ANTI-ICE-ARROW-RIGHT"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-ANTI-ICE-ARROW-LEFT"].setColor(0.0509,0.7529,0.2941); + me["BLEED-ANTI-ICE-ARROW-RIGHT"].setColor(0.0509,0.7529,0.2941); + } + } else { + me["BLEED-ANTI-ICE-ARROW-LEFT"].hide(); + me["BLEED-ANTI-ICE-ARROW-RIGHT"].hide(); + } + } else { + me["BLEED-Anti-Ice-Left"].hide(); + me["BLEED-Anti-Ice-Right"].hide(); + } + + # ENG 1 label + if (getprop("/engines/engine[0]/n2-actual") >= 59) { + me["BLEED-ENG-1-label"].setColor(0.8078,0.8039,0.8078); + } else { + me["BLEED-ENG-1-label"].setColor(0.7333,0.3803,0); + } + + # ENG 2 label + if (getprop("/engines/engine[1]/n2-actual") >= 59) { + me["BLEED-ENG-2-label"].setColor(0.8078,0.8039,0.8078); + } else { + me["BLEED-ENG-2-label"].setColor(0.7333,0.3803,0); + } + + # PACK 1 ----------------------------------------- + me["BLEED-Pack-1-Out-Temp"].setText(sprintf("%s", getprop("/systems/pressurization/pack-1-out-temp"))); + me["BLEED-Pack-1-Comp-Out-Temp"].setText(sprintf("%s", getprop("/systems/pressurization/pack-1-comp-out-temp"))); + + if (getprop("/systems/pressurization/pack-1-out-temp") > 90) { + me["BLEED-Pack-1-Out-Temp"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Pack-1-Out-Temp"].setColor(0.0509,0.7529,0.2941); + } + + var bypass_pos = getprop("/systems/pressurization/pack-1-bypass") - 50; # `-50` cause the middel position from where we move the needel is at 50 + bypass_pos = bypass_pos * D2R; + me["BLEED-Pack-1-Bypass-needel"].setRotation(bypass_pos); + + if (getprop("/systems/pressurization/pack-1-comp-out-temp") > 230) { + me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941); + } + + var flow_pos = getprop("/systems/pressurization/pack-1-flow") - 50; # `-50` cause the middel position from where we move the needel is at 50 + flow_pos = flow_pos * D2R; + me["BLEED-Pack-1-Packflow-needel"].setRotation(flow_pos); + + if (getprop("/systems/pressurization/pack-1-valve") == 0) { + me["BLEED-Pack-1-Packflow-needel"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Pack-1-Packflow-needel"].setColor(0.0509,0.7529,0.2941); + } + + if (getprop("/systems/pressurization/pack-1-valve") == 1) { + me["BLEED-Pack-1-Flow-Valve"].setRotation(0); + } else { + me["BLEED-Pack-1-Flow-Valve"].setRotation(90 * D2R); + } + + var pack_state = getprop("/systems/pressurization/pack-1-valve"); + if (pack_state == 1) { + me["BLEED-Pack-1-Flow-Valve"].setRotation(0); + } else { + me["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R); + } + + if (pack_state == getprop("/controls/pneumatic/switches/pack1")) { + me["BLEED-Pack-1-Flow-Valve"].setColor(0.0509,0.7529,0.2941); + } else { + me["BLEED-Pack-1-Flow-Valve"].setColor(0.7333,0.3803,0); + } + + # PACK 2 ----------------------------------------- + me["BLEED-Pack-2-Out-Temp"].setText(sprintf("%s", getprop("/systems/pressurization/pack-2-out-temp"))); + me["BLEED-Pack-2-Comp-Out-Temp"].setText(sprintf("%s", getprop("/systems/pressurization/pack-2-comp-out-temp"))); + + if (getprop("/systems/pressurization/pack-2-out-temp") > 90) { + me["BLEED-Pack-2-Out-Temp"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Pack-2-Out-Temp"].setColor(0.0509,0.7529,0.2941); + } + + var bypass_pos = getprop("/systems/pressurization/pack-2-bypass") - 50; # `-50` cause the middel position from where we move the needel is at 50 + bypass_pos = bypass_pos * D2R; + me["BLEED-Pack-2-Bypass-needel"].setRotation(bypass_pos); + + if (getprop("/systems/pressurization/pack-2-comp-out-temp") > 230) { + me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941); + } + + var flow_pos = getprop("/systems/pressurization/pack-2-flow") - 50; # `-50` cause the middel position from where we move the needel is at 50 + flow_pos = flow_pos * D2R; + me["BLEED-Pack-2-Packflow-needel"].setRotation(flow_pos); + + if (getprop("/systems/pressurization/pack-2-valve") == 0) { + me["BLEED-Pack-2-Packflow-needel"].setColor(0.7333,0.3803,0); + } else { + me["BLEED-Pack-2-Packflow-needel"].setColor(0.0509,0.7529,0.2941); + } + + var pack_state = getprop("/systems/pressurization/pack-2-valve"); + if (pack_state == 1) { + me["BLEED-Pack-2-Flow-Valve"].setRotation(0); + } else { + me["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R); + } + + if (pack_state == getprop("/controls/pneumatic/switches/pack2")) { + me["BLEED-Pack-2-Flow-Valve"].setColor(0.0509,0.7529,0.2941); + } else { + me["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0); + } + me.updateBottomStatus(); }, }; diff --git a/Models/Instruments/Lower-ECAM/res/bleed.svg b/Models/Instruments/Lower-ECAM/res/bleed.svg index 677f5d0b..0e0cbe59 100644 --- a/Models/Instruments/Lower-ECAM/res/bleed.svg +++ b/Models/Instruments/Lower-ECAM/res/bleed.svg @@ -41,9 +41,9 @@ inkscape:window-height="1047" id="namedview371" showgrid="true" - inkscape:zoom="0.47" - inkscape:cx="557.40426" - inkscape:cy="473.3889" + inkscape:zoom="0.94" + inkscape:cx="538.35254" + inkscape:cy="985.87416" inkscape:window-x="0" inkscape:window-y="33" inkscape:window-maximized="0" @@ -252,18 +252,21 @@ + id="BLEED-cond-1" + inkscape:connector-curvature="0" + inkscape:label="#path5062" /> + id="BLEED-cond-2" + inkscape:connector-curvature="0" + inkscape:label="#path5062-5" /> + id="BLEED-cond-3" + inkscape:connector-curvature="0" + inkscape:label="#path5062-5-0" /> + transform="rotate(90)" + inkscape:label="#rect5105-6-4-5-0" /> - + id="BLEED-APU-LINES" + inkscape:label="#g4686"> + + + + + y="602.28253" + x="510.74338" + height="35.467422" + width="5.3955846" + id="rect5105-6-4-5-1" + style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.27201295;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + - - @@ -1104,9 +1112,10 @@ sodipodi:role="line">ANTI + style="fill:none;stroke:#cecdce;stroke-width:3.19372106;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#path5062-54-1" /> ANTI + style="fill:none;stroke:#cecdce;stroke-width:3.19372106;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#path5062-54-1-8" />