From 72ba57d4d76eeac70694304eed4e529b01997d19 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 6 May 2022 17:06:02 +0100 Subject: [PATCH 1/3] Move tyresmoke to effects namespace --- A320-main.xml | 4 ++-- Nasal/{Systems => Effects}/tyresmoke.nas | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename Nasal/{Systems => Effects}/tyresmoke.nas (100%) diff --git a/A320-main.xml b/A320-main.xml index 983e4fd8..fffc3650 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -4763,9 +4763,10 @@ Aircraft/A320-family/AircraftConfig/acconfig.nas + Aircraft/A320-family/Nasal/Effects/icing.nas Aircraft/A320-family/Nasal/Effects/light-manager.nas Aircraft/A320-family/Nasal/Effects/thunder-effects.nas - Aircraft/A320-family/Nasal/Effects/icing.nas + Aircraft/A320-family/Nasal/Effects/tyresmoke.nas Aircraft/A320-family/Nasal/Systems/APU.nas @@ -4782,7 +4783,6 @@ Aircraft/A320-family/Nasal/Systems/ground_services.nas Aircraft/A320-family/Nasal/Systems/payload.nas Aircraft/A320-family/Nasal/Panels/clock.nas - Aircraft/A320-family/Nasal/Systems/tyresmoke.nas Aircraft/A320-family/Nasal/ECAM/SystemDisplay.nas diff --git a/Nasal/Systems/tyresmoke.nas b/Nasal/Effects/tyresmoke.nas similarity index 100% rename from Nasal/Systems/tyresmoke.nas rename to Nasal/Effects/tyresmoke.nas From 759c7fbd9133acee2b6315041627180a276ef67e Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 7 May 2022 17:57:16 +0100 Subject: [PATCH 2/3] ENG page - make XX --- .../Instruments/Lower-ECAM/Lower-ECAM-eng.nas | 22 ++++---- Models/Instruments/Lower-ECAM/res/eng.svg | 52 +++++++++++++------ 2 files changed, 50 insertions(+), 24 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-eng.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-eng.nas index 3b8f7bec..fc173b56 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM-eng.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-eng.nas @@ -40,6 +40,8 @@ var canvas_lowerECAMPageEng = } else { obj.quantity[0] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOilQT1 * 10, 5)), 0, 99.5)); } + obj["OilQT1"].setText(sprintf("%s", left(obj.quantity[0], (size(obj.quantity[0]) == 4 ? 2 : 1)))); + obj["OilQT1-decimal"].setText(sprintf("%s", right(obj.quantity[0], 1))); obj["OilQT1-needle"].setRotation(math.clamp(val.engOilQT1, 0, 27) * 6.66 * D2R); }), props.UpdateManager.FromHashList(["engOilQT2","acconfigUnits"], 0.005, func(val) { @@ -48,6 +50,8 @@ var canvas_lowerECAMPageEng = } else { obj.quantity[1] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOilQT2 * 10, 5)), 0, 99.5)); } + obj["OilQT2"].setText(sprintf("%s", left(obj.quantity[1], (size(obj.quantity[1]) == 4 ? 2 : 1)))); + obj["OilQT2-decimal"].setText(sprintf("%s", right(obj.quantity[1], 1))); obj["OilQT2-needle"].setRotation(math.clamp(val.engOilQT2, 0, 27) * 6.66 * D2R); }), props.UpdateManager.FromHashValue("engOilPsi1", 0.25, func(val) { @@ -134,7 +138,7 @@ var canvas_lowerECAMPageEng = getKeys: func() { return["OilQT1-needle","OilQT2-needle","OilQT1","OilQT2","OilQT1-decimal","OilQT2-decimal","OilPSI1-needle","OilPSI2-needle","OilPSI1","OilPSI2", "FUEL-used-1","FUEL-used-2", "Fused-weight-unit","Fused-oil-unit","FUEL-clog-1","FUEL-clog-2","OIL-clog-1","OIL-clog-2","OilTemp1","OilTemp2", - "VIB-N1-1","VIB-N1-2","VIB-N2-1","VIB-N2-2","OilQT1-decimalpt","OilQT2-decimalpt"]; + "VIB-N1-1","VIB-N1-2","VIB-N2-1","VIB-N2-2","OilQT1-decimalpt","OilQT2-decimalpt","OilQT1-XX","OilQT2-XX"]; }, updateBottom: func(notification) { if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) { @@ -187,9 +191,8 @@ var canvas_lowerECAMPageEng = } if (notification.dc1 >= 25) { - me["OilQT1"].setColor(0.0509,0.7529,0.2941); - me["OilQT1"].setText(sprintf("%s", left(me.quantity[0], (size(me.quantity[0]) == 4 ? 2 : 1)))); - me["OilQT1-decimal"].setText(sprintf("%s", right(me.quantity[0], 1))); + me["OilQT1-XX"].hide(); + me["OilQT1"].show(); me["OilPSI1"].setText(sprintf("%s", math.clamp(math.round(me.pressure[0], 2), 0, 998))); if (me.pressure[0] >= 13) { @@ -203,6 +206,8 @@ var canvas_lowerECAMPageEng = me["OilQT1-needle"].show(); me["OilPSI1-needle"].show(); } else { + me["OilQT1"].hide(); + me["OilQT1-XX"].show(); me["OilQT1"].setColor(0.7333,0.3803,0); me["OilPSI1"].setColor(0.7333,0.3803,0); me["OilQT1"].setText(" XX"); @@ -215,9 +220,8 @@ var canvas_lowerECAMPageEng = } if (notification.dc2 >= 25) { - me["OilQT2"].setColor(0.0509,0.7529,0.2941); - me["OilQT2"].setText(sprintf("%s", left(me.quantity[1], (size(me.quantity[1]) == 4 ? 2 : 1)))); - me["OilQT2-decimal"].setText(sprintf("%s", right(me.quantity[1], 1))); + me["OilQT2-XX"].hide(); + me["OilQT2"].show(); me["OilPSI2"].setText(sprintf("%s", math.clamp(math.round(me.pressure[0], 2), 0, 998))); if (me.pressure[1] >= 13) { @@ -231,9 +235,9 @@ var canvas_lowerECAMPageEng = me["OilQT2-needle"].show(); me["OilPSI2-needle"].show(); } else { - me["OilQT2"].setColor(0.7333,0.3803,0); + me["OilQT2"].hide(); + me["OilQT2-XX"].show(); me["OilPSI2"].setColor(0.7333,0.3803,0); - me["OilQT2"].setText(" XX"); me["OilPSI2"].setText("XX"); me["OilQT2-decimalpt"].hide(); diff --git a/Models/Instruments/Lower-ECAM/res/eng.svg b/Models/Instruments/Lower-ECAM/res/eng.svg index 348edb17..47e8dc1b 100644 --- a/Models/Instruments/Lower-ECAM/res/eng.svg +++ b/Models/Instruments/Lower-ECAM/res/eng.svg @@ -40,9 +40,9 @@ inkscape:window-height="974" id="namedview371" showgrid="true" - inkscape:zoom="2" - inkscape:cx="930" - inkscape:cy="390.5" + inkscape:zoom="2.8284271" + inkscape:cx="372.64527" + inkscape:cy="402.69731" inkscape:window-x="-11" inkscape:window-y="-11" inkscape:window-maximized="1" @@ -496,19 +496,19 @@ sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path4328" - d="m 312.4476,261.18529 0,9.47635" - style="fill:none;stroke:#ffffff;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="m 312.4476,261.18529 v 9.47635" + style="fill:none;stroke:#ffffff;stroke-width:3.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -533,8 +533,8 @@ inkscape:label="#g4340" id="OilQT2-scaletick"> 22 + XX + XX From 26711f678e690413d686f3b5cc728b62cf3c3b8c Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 7 May 2022 17:57:44 +0100 Subject: [PATCH 3/3] Fix Nasal typo --- Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas index e10174db..ea971f0e 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas @@ -25,9 +25,9 @@ var canvas_lowerECAMPageCruise = obj.update_items = [ props.UpdateManager.FromHashList(["engOil1", "acconfigUnits"], 0.005, func(val) { if (val.acconfigUnits) { - obj.quantity[0] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOilQt1 * QT2LTR * 10, 5)), 0, 99.5)); + obj.quantity[0] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOil1 * QT2LTR * 10, 5)), 0, 99.5)); } else { - obj.quantity[0] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOilQt1 * 10, 5)), 0, 99.5)); + obj.quantity[0] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOil1 * 10, 5)), 0, 99.5)); } }), props.UpdateManager.FromHashList(["engOil2", "acconfigUnits"], 0.005, func(val) {