diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas
index b45a809b..55015168 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas
@@ -297,6 +297,7 @@ var input = {
apuEgtRot: "/ECAM/Lower/APU-EGT",
apuGenPB: "/controls/electrical/switches/apu",
apuGLC: "/systems/electrical/relay/apu-glc/contact-pos",
+ apuFireBtn: "/controls/apu/fire-btn",
apuFlap: "/controls/apu/inlet-flap/position-norm",
apuFuelPump: "/systems/fuel/pumps/apu-operate",
apuFuelPumpsOff: "/systems/fuel/pumps/all-eng-pump-off",
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-fuel.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-fuel.nas
index ea3ca35b..4da77543 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-fuel.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-fuel.nas
@@ -1,6 +1,9 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
+var fuel_used_lbs1 = props.globals.getNode("/systems/fuel/fuel-used-1", 1);
+var fuel_used_lbs2 = props.globals.getNode("/systems/fuel/fuel-used-2", 1);
+
var canvas_lowerECAMPageFuel =
{
new: func(svg,name) {
@@ -21,8 +24,430 @@ var canvas_lowerECAMPageFuel =
obj.units = acconfig_weight_kgs.getValue();
# init
+ obj["FUEL-Left-blocked"].hide();
+ obj["FUEL-Right-blocked"].hide();
+ obj["FUEL-Left-Outer-Inacc"].hide();
+ obj["FUEL-Left-Inner-Inacc"].hide();
+ obj["FUEL-Right-Outer-Inacc"].hide();
+ obj["FUEL-Right-Inner-Inacc"].hide();
+ obj["FUEL-Center-Inacc"].hide();
obj.update_items = [
+ props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
+ if (val) {
+ obj["FOB-weight-unit"].setText("KG");
+ obj["Fused-weight-unit"].setText("KG");
+ obj["FFlow-weight-unit"].setText("KG/MIN");
+ obj["FUEL-On-Board"].setText(sprintf("%s", math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() * LBS2KGS, 10)));
+ obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftOuter.getValue() * LBS2KGS, 10)));
+ obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftInner.getValue() * LBS2KGS, 10)));
+ obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.center.getValue() * LBS2KGS, 10)));
+ obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightInner.getValue() * LBS2KGS, 10)));
+ obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightOuter.getValue() * LBS2KGS, 10)));
+ obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round(((pts.Engines.Engine.fuelFlow[0].getValue() + pts.Engines.Engine.fuelFlow[1].getValue()) * LBS2KGS) / 60, 10)));
+ obj["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10)));
+ obj["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue() * LBS2KGS, 10)));
+ obj["FUEL-used-both"].setText(sprintf("%s", (math.round((fuel_used_lbs1.getValue() * LBS2KGS) + (fuel_used_lbs2.getValue() * LBS2KGS), 10))));
+ } else {
+ obj["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
+ obj["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
+ obj["FUEL-used-both"].setText(sprintf("%s", (math.round(fuel_used_lbs1.getValue() + fuel_used_lbs2.getValue(), 10))));
+ obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round((pts.Engines.Engine.fuelFlow[0].getValue() + pts.Engines.Engine.fuelFlow[1].getValue()) / 60, 10)));
+ obj["FOB-weight-unit"].setText("LBS");
+ obj["Fused-weight-unit"].setText("LBS");
+ obj["FFlow-weight-unit"].setText("LBS/MIN");
+ obj["FUEL-On-Board"].setText(sprintf("%s", math.round(pts.Consumables.Fuel.totalFuelLbs.getValue(), 10)));
+ obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftOuter.getValue(), 10)));
+ obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftInner.getValue(), 10)));
+ obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.center.getValue(), 10)));
+ obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightInner.getValue(), 10)));
+ obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightOuter.getValue(), 10)));
+ }
+ }),
+ props.UpdateManager.FromHashValue("engFuelUsed1", 0.5, func(val) {
+ if (obj.units) {
+ obj["FUEL-used-1"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ } else {
+ obj["FUEL-used-1"].setText(sprintf("%s", math.round(val, 10)));
+ }
+ }),
+ props.UpdateManager.FromHashValue("engFuelUsed2", 0.5, func(val) {
+ if (obj.units) {
+ obj["FUEL-used-2"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ } else {
+ obj["FUEL-used-2"].setText(sprintf("%s", math.round(val, 10)));
+ }
+ }),
+ props.UpdateManager.FromHashList(["engFuelUsed1","engFuelUsed2"], 0.5, func(val) {
+ if (obj.units) {
+ obj["FUEL-used-both"].setText(sprintf("%s", (math.round((val.engFuelUsed1 * LBS2KGS) + (val.engFuelUsed2 * LBS2KGS), 10))));
+ } else {
+ obj["FUEL-used-both"].setText(sprintf("%s", (math.round(val.engFuelUsed1 + val.engFuelUsed2, 10))));
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelLeftOuterQty", 0.25, func(val) {
+ if (obj.units) {
+ obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ } else {
+ obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(val, 10)));
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelRightOuterQty", 0.25, func(val) {
+ if (obj.units) {
+ obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ } else {
+ obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(val, 10)));
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelLeftInnerQty", 0.25, func(val) {
+ if (obj.units) {
+ obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ } else {
+ obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(val, 10)));
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelRightInnerQty", 0.25, func(val) {
+ if (obj.units) {
+ obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ } else {
+ obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(val, 10)));
+ }
+ }),
+ props.UpdateManager.FromHashList(["fadecPower1","fadecPower2","fadecPowerStart","fuelflow_1","fuelflow_2"], nil, func(val) {
+ if (val.fadecPower1 or val.fadecPower2 or val.fadecPowerStart) {
+ obj["FUEL-Flow-per-min"].setColor(0.0509,0.7529,0.2941);
+ if (obj.units) {
+ obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round(((val.fuelflow_1 + val.fuelflow_2) * LBS2KGS) / 60, 10)));
+ } else {
+ obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round((val.fuelflow_1 + val.fuelflow_2) / 60, 10)));
+ }
+ } else {
+ obj["FUEL-Flow-per-min"].setColor(0.7333,0.3803,0);
+ obj["FUEL-Flow-per-min"].setText("XX");
+ }
+ }),
+ props.UpdateManager.FromHashValue("N1_actual_1", 0.05, func(val) {
+ if (val <= 18.8) {
+ obj["ENG1idFFlow"].setColor(0.7333,0.3803,0);
+ obj["FUEL-ENG-1-label"].setColor(0.7333,0.3803,0);
+ } else {
+ obj["ENG1idFFlow"].setColor(0.8078,0.8039,0.8078);
+ obj["FUEL-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
+ }
+ }),
+ props.UpdateManager.FromHashValue("N1_actual_2", 0.05, func(val) {
+ if (val <= 18.8) {
+ obj["ENG2idFFlow"].setColor(0.7333,0.3803,0);
+ obj["FUEL-ENG-2-label"].setColor(0.7333,0.3803,0);
+ } else {
+ obj["ENG2idFFlow"].setColor(0.8078,0.8039,0.8078);
+ obj["FUEL-ENG-2-label"].setColor(0.8078,0.8039,0.8078);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelLeftSwitch1", nil, func(val) {
+ if (val) {
+ obj["FUEL-Pump-Left-1-Open"].show();
+ obj["FUEL-Pump-Left-1-Closed"].hide();
+ obj["FUEL-Pump-Left-1"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Left-1"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Left-1-Square"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Left-1-Open"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Left-1-Closed"].setColorFill(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-Pump-Left-1-Open"].hide();
+ obj["FUEL-Pump-Left-1-Closed"].show();
+ obj["FUEL-Pump-Left-1"].setColor(0.7333,0.3803,0);
+ obj["FUEL-Pump-Left-1-Square"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Left-1"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Left-1-Open"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Left-1-Closed"].setColorFill(0.7333,0.3803,0);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelLeftSwitch2", nil, func(val) {
+ if (val) {
+ obj["FUEL-Pump-Left-2-Open"].show();
+ obj["FUEL-Pump-Left-2-Closed"].hide();
+ obj["FUEL-Pump-Left-2"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Left-2"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Left-2-Square"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Left-2-Open"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Left-2-Closed"].setColorFill(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-Pump-Left-2-Open"].hide();
+ obj["FUEL-Pump-Left-2-Closed"].show();
+ obj["FUEL-Pump-Left-2"].setColor(0.7333,0.3803,0);
+ obj["FUEL-Pump-Left-2"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Left-2-Square"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Left-2-Open"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Left-2-Closed"].setColorFill(0.7333,0.3803,0);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelCenterSwitch1", nil, func(val) {
+ if (val) {
+ obj["FUEL-Pump-Center-1-Open"].show();
+ obj["FUEL-Pump-Center-1-Closed"].hide();
+ obj["FUEL-Pump-Center-1"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Center-1"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Center-1-Square"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Center-1-Open"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Center-1-Closed"].setColorFill(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-Pump-Center-1-Open"].hide();
+ obj["FUEL-Pump-Center-1-Closed"].show();
+ obj["FUEL-Pump-Center-1"].setColor(0.7333,0.3803,0);
+ obj["FUEL-Pump-Center-1"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Center-1-Square"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Center-1-Open"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Center-1-Closed"].setColorFill(0.7333,0.3803,0);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelCenterSwitch2", nil, func(val) {
+ if (val) {
+ obj["FUEL-Pump-Center-2-Open"].show();
+ obj["FUEL-Pump-Center-2-Closed"].hide();
+ obj["FUEL-Pump-Center-2"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Center-2"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Center-2-Square"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Center-2-Open"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Center-2-Closed"].setColorFill(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-Pump-Center-2-Open"].hide();
+ obj["FUEL-Pump-Center-2-Closed"].show();
+ obj["FUEL-Pump-Center-2"].setColor(0.7333,0.3803,0);
+ obj["FUEL-Pump-Center-2"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Center-2-Square"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Center-2-Open"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Center-2-Closed"].setColorFill(0.7333,0.3803,0);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelRightSwitch1", nil, func(val) {
+ if (val) {
+ obj["FUEL-Pump-Right-1-Open"].show();
+ obj["FUEL-Pump-Right-1-Closed"].hide();
+ obj["FUEL-Pump-Right-1"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Right-1"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Right-1-Square"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Right-1-Open"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Right-1-Closed"].setColorFill(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-Pump-Right-1-Open"].hide();
+ obj["FUEL-Pump-Right-1-Closed"].show();
+ obj["FUEL-Pump-Right-1"].setColor(0.7333,0.3803,0);
+ obj["FUEL-Pump-Right-1"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Right-1-Square"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Right-1-Open"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Right-1-Closed"].setColorFill(0.7333,0.3803,0);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelRightSwitch2", nil, func(val) {
+ if (val) {
+ obj["FUEL-Pump-Right-2-Open"].show();
+ obj["FUEL-Pump-Right-2-Closed"].hide();
+ obj["FUEL-Pump-Right-2"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Right-2"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Right-2-Square"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Right-2-Open"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-Pump-Right-2-Closed"].setColorFill(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-Pump-Right-2-Open"].hide();
+ obj["FUEL-Pump-Right-2-Closed"].show();
+ obj["FUEL-Pump-Right-2"].setColor(0.7333,0.3803,0);
+ obj["FUEL-Pump-Right-2"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Right-2-Square"].setColor(0.7333,0.3803,0);
+ obj["FUEL-Pump-Right-2-Open"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-Pump-Right-2-Closed"].setColorFill(0.7333,0.3803,0);
+ }
+ }),
+ props.UpdateManager.FromHashList(["fuelCenterSwitch1","fuelCenterSwitch2"], nil, func(val) {
+ if (!val.fuelCenterSwitch1 and !val.fuelCenterSwitch2) {
+ obj["FUEL-Center-blocked"].show();
+ } else {
+ obj["FUEL-Center-blocked"].hide();
+ }
+ }),
+ props.UpdateManager.FromHashList(["fuelCrossfeedValve","fuelCrossfeedSwitch"], nil, func(val) {
+ if (val.fuelCrossfeedValve == 1) {
+ obj["FUEL-XFEED"].setRotation(0);
+ obj["FUEL-XFEED-pipes"].show();
+ if (val.fuelCrossfeedSwitch) {
+ obj["FUEL-XFEED"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-XFEED"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-XFEED-Cross"].setColorFill(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-XFEED"].setColor(0.7333,0.3803,0);
+ obj["FUEL-XFEED"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
+ }
+ } elsif (val.fuelCrossfeedValve == 0) {
+ obj["FUEL-XFEED"].setRotation(90 * D2R);
+ obj["FUEL-XFEED-pipes"].hide();
+ if (!val.fuelCrossfeedSwitch) {
+ obj["FUEL-XFEED"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-XFEED"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-XFEED-Cross"].setColorFill(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-XFEED"].setColor(0.7333,0.3803,0);
+ obj["FUEL-XFEED"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
+ }
+ } else {
+ obj["FUEL-XFEED"].setRotation(45 * D2R);
+ obj["FUEL-XFEED-pipes"].hide();
+ obj["FUEL-XFEED"].setColor(0.7333,0.3803,0);
+ obj["FUEL-XFEED"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
+ }
+ }),
+ props.UpdateManager.FromHashList(["fuelEngine1Valve","engineCutoff1"], nil, func(val) {
+ if (val.fuelEngine1Valve) {
+ if (val.fuelEngine1Valve == 1) {
+ obj["FUEL-ENG-Master-1"].setRotation(0);
+ } else {
+ obj["FUEL-ENG-Master-1"].setRotation(45 * D2R);
+ }
+ if (val.engineCutoff1) {
+ obj["FUEL-ENG-Master-1"].setColor(0.7333,0.3803,0);
+ obj["FUEL-ENG-Master-1"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-Master-1-Cross"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-1-pipe"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-1-pipe"].setColorFill(0.7333,0.3803,0);
+ } else {
+ obj["FUEL-ENG-Master-1"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-ENG-Master-1"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-ENG-Master-1-Cross"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-ENG-1-pipe"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-ENG-1-pipe"].setColorFill(0.0509,0.7529,0.2941);
+ }
+ } else {
+ obj["FUEL-ENG-Master-1"].setRotation(90 * D2R);
+ obj["FUEL-ENG-Master-1"].setColor(0.7333,0.3803,0);
+ obj["FUEL-ENG-Master-1"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-Master-1-Cross"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-1-pipe"].setColor(0.7333,0.3803,0);
+ obj["FUEL-ENG-1-pipe"].setColorFill(0.7333,0.3803,0);
+ }
+ }),
+ props.UpdateManager.FromHashList(["fuelEngine2Valve","engineCutoff2"], nil, func(val) {
+ if (val.fuelEngine2Valve) {
+ if (val.fuelEngine2Valve == 1) {
+ obj["FUEL-ENG-Master-2"].setRotation(0);
+ } else {
+ obj["FUEL-ENG-Master-2"].setRotation(45 * D2R);
+ }
+ if (val.engineCutoff1) {
+ obj["FUEL-ENG-Master-2"].setColor(0.7333,0.3803,0);
+ obj["FUEL-ENG-Master-2"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-Master-2-Cross"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-2-pipe"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-2-pipe"].setColorFill(0.7333,0.3803,0);
+ } else {
+ obj["FUEL-ENG-Master-2"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-ENG-Master-2"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-ENG-Master-2-Cross"].setColorFill(0.0509,0.7529,0.2941);
+ obj["FUEL-ENG-2-pipe"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-ENG-2-pipe"].setColorFill(0.0509,0.7529,0.2941);
+ }
+ } else {
+ obj["FUEL-ENG-Master-2"].setRotation(90 * D2R);
+ obj["FUEL-ENG-Master-2"].setColor(0.7333,0.3803,0);
+ obj["FUEL-ENG-Master-2"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-Master-2-Cross"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-ENG-2-pipe"].setColor(0.7333,0.3803,0);
+ obj["FUEL-ENG-2-pipe"].setColorFill(0.7333,0.3803,0);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelTransferValve1", nil, func(val) {
+ if (val == 0) {
+ obj["FUEL-Left-Transfer"].hide();
+ } else {
+ if (val == 1) {
+ obj["FUEL-Left-Transfer"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-Left-Transfer"].setColor(0.7333,0.3803,0);
+ }
+ obj["FUEL-Left-Transfer"].show();
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelTransferValve2", nil, func(val) {
+ if (val == 0) {
+ obj["FUEL-Right-Transfer"].hide();
+ } else {
+ if (val == 1) {
+ obj["FUEL-Right-Transfer"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ obj["FUEL-Right-Transfer"].setColor(0.7333,0.3803,0);
+ }
+ obj["FUEL-Right-Transfer"].show();
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelTotalLbs", 1, func(val) {
+ if (obj.units) {
+ obj["FUEL-On-Board"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ } else {
+ obj["FUEL-On-Board"].setText(sprintf("%s", math.round(val, 10)));
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelTempLeftOuter", 0.25, func(val) {
+ obj["FUEL-Left-Outer-temp"].setText(sprintf("%s", math.round(val)));
+ if (val > 55 or val < -40) {
+ obj["FUEL-Left-Outer-temp"].setColor(0.7333,0.3803,0);
+ } else {
+ obj["FUEL-Left-Outer-temp"].setColor(0.0509,0.7529,0.2941);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelTempLeftInner", 0.25, func(val) {
+ obj["FUEL-Left-Inner-temp"].setText(sprintf("%s", math.round(val)));
+ if (val > 45 or val < -40) {
+ obj["FUEL-Left-Inner-temp"].setColor(0.7333,0.3803,0);
+ } else {
+ obj["FUEL-Left-Inner-temp"].setColor(0.0509,0.7529,0.2941);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelTempRightInner", 0.25, func(val) {
+ obj["FUEL-Right-Inner-temp"].setText(sprintf("%s", math.round(val)));
+ if (val > 45 or val < -40) {
+ obj["FUEL-Right-Inner-temp"].setColor(0.7333,0.3803,0);
+ } else {
+ obj["FUEL-Right-Inner-temp"].setColor(0.0509,0.7529,0.2941);
+ }
+ }),
+ props.UpdateManager.FromHashValue("fuelTempRightOuter", 0.25, func(val) {
+ obj["FUEL-Right-Outer-temp"].setText(sprintf("%s", math.round(val)));
+ if (val > 55 or val < -40) {
+ obj["FUEL-Right-Outer-temp"].setColor(0.7333,0.3803,0);
+ } else {
+ obj["FUEL-Right-Outer-temp"].setColor(0.0509,0.7529,0.2941);
+ }
+ }),
+ props.UpdateManager.FromHashList(["fuelApuValve","apuMaster","apuFireBtn"], nil, func(val) {
+ if (val.fuelApuValve == 0) {
+ if (val.apuMaster or val.apuFireBtn) {
+ obj["FUEL-APU-label"].setColor(0.7333,0.3803,0);
+ obj["FUEL-APU-line"].hide();
+ obj["FUEL-APU-arrow"].hide();
+ } else {
+ obj["FUEL-APU-label"].setColor(0.8078, 0.8039, 0.8078);
+ obj["FUEL-APU-arrow"].setColor(0.8078, 0.8039, 0.8078);
+ obj["FUEL-APU-line"].hide();
+ obj["FUEL-APU-arrow"].show();
+ }
+ } else {
+ if (!val.apuMaster or val.apuFireBtn) {
+ obj["FUEL-APU-label"].setColor(0.7333,0.3803,0);
+ obj["FUEL-APU-line"].setColor(0.7333,0.3803,0);
+ obj["FUEL-APU-line"].setColorFill(0.7333,0.3803,0);
+ obj["FUEL-APU-arrow"].setColor(0.7333,0.3803,0);
+ obj["FUEL-APU-line"].show();
+ obj["FUEL-APU-arrow"].show();
+ } else {
+ obj["FUEL-APU-label"].setColor(0.8078, 0.8039, 0.8078);
+ obj["FUEL-APU-line"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-APU-arrow"].setColor(0.0509,0.7529,0.2941);
+ obj["FUEL-APU-line"].show();
+ obj["FUEL-APU-arrow"].show();
+ }
+ }
+ }),
];
obj.displayedGForce = 0;
@@ -62,10 +487,13 @@ var canvas_lowerECAMPageFuel =
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
- return["Bulk","BulkLine","BulkLbl","Exit1L","Exit1R","Cabin1Left","Cabin1LeftLbl","Cabin1LeftLine","Cabin1LeftSlide","Cabin1Right","Cabin1RightLbl","Cabin1RightLine","Cabin1RightSlide","Cabin2Left","Cabin2LeftLbl",
- "Cabin2LeftLine","Cabin2LeftSlide","Cabin2Right","Cabin2RightLbl","Cabin2RightLine","Cabin2RightSlide","Cabin3Left","Cabin3LeftLbl","Cabin3LeftLine","Cabin3LeftSlide","Cabin3Right","Cabin3RightLbl","Cabin3RightLine","Cabin3RightSlide","AvionicsLine1",
- "AvionicsLbl1","AvionicsLine2","AvionicsLbl2","Cargo1Line","Cargo1Lbl","Cargo1Door","Cargo2Line","Cargo2Lbl","Cargo2Door","ExitLSlide","ExitLLine","ExitLLbl","ExitRSlide","ExitRLine","ExitRLbl","Cabin4Left","Cabin4LeftLbl","Cabin4LeftLine",
- "Cabin4LeftSlide","Cabin4Right","Cabin4RightLbl","Cabin4RightLine","Cabin4RightSlide","DOOROXY-REGUL-LO-PR"];},
+ return["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit","FUEL-Pump-Left-1","FUEL-Pump-Left-2","FUEL-Pump-Center-1","FUEL-Pump-Center-2","FUEL-Pump-Right-1","FUEL-Pump-Right-2","FUEL-Left-blocked","FUEL-Right-blocked","FUEL-Center-blocked","FUEL-Left-Transfer",
+ "FUEL-Right-Transfer","FUEL-Left-Outer-Inacc","FUEL-Left-Inner-Inacc","FUEL-Center-Inacc","FUEL-Right-Inner-Inacc","FUEL-Right-Outer-Inacc","FUEL-Left-Outer-quantity","FUEL-Left-Inner-quantity","FUEL-Center-quantity","FUEL-Right-Inner-quantity",
+ "FUEL-Right-Outer-quantity","FUEL-On-Board","FUEL-Flow-per-min","FUEL-APU-arrow","FUEL-APU-line","FUEL-APU-label","FUEL-used-1","FUEL-used-both","FUEL-used-2","FUEL-ENG-Master-1","FUEL-ENG-Master-2","FUEL-XFEED","FUEL-XFEED-Cross","FUEL-XFEED-pipes","FUEL-Left-Outer-temp",
+ "FUEL-Left-Inner-temp","FUEL-Right-Inner-temp","FUEL-Right-Outer-temp","FUEL-Pump-Left-1-Closed","FUEL-Pump-Left-1-Open","FUEL-Pump-Left-2-Closed","FUEL-Pump-Left-2-Open","FUEL-Pump-Center-1-Open","FUEL-Pump-Center-1-Closed","FUEL-Pump-Center-2-Closed",
+ "FUEL-Pump-Center-2-Open","FUEL-Pump-Right-1-Closed","FUEL-Pump-Right-1-Open","FUEL-Pump-Right-2-Closed","FUEL-Pump-Right-2-Open","FUEL-ENG-1-label","FUEL-ENG-2-label","FUEL-ENG-1-pipe","FUEL-ENG-2-pipe","ENG1idFFlow","ENG2idFFlow","FUEL-used-1","FUEL-used-2","FUEL-used-both",
+ "Fused-weight-unit","FFlow-weight-unit","FOB-weight-unit","FUEL-ENG-Master-1-Cross","FUEL-ENG-Master-2-Cross","FUEL-Pump-Left-1-Square","FUEL-Pump-Left-2-Square","FUEL-Pump-Center-1-Square","FUEL-Pump-Center-2-Square","FUEL-Pump-Right-1-Square","FUEL-Pump-Right-2-Square"];
+ },
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
@@ -140,6 +568,31 @@ var canvas_lowerECAMPageFuel =
};
var input = {
+ engineCutoff1: "/controls/engines/engine[0]/cutoff-switch",
+ engineCutoff2: "/controls/engines/engine[1]/cutoff-switch",
+ fuelApuValve: "/systems/fuel/valves/apu-lp-valve",
+ fuelCrossfeedSwitch: "/controls/fuel/switches/crossfeed",
+ fuelCrossfeedValve: "/systems/fuel/valves/crossfeed-valve",
+ fuelEngine1Valve: "/systems/fuel/valves/engine-1-lp-valve",
+ fuelEngine2Valve: "/systems/fuel/valves/engine-2-lp-valve",
+ fuelTransferValve1: "/systems/fuel/valves/outer-inner-transfer-valve-1",
+ fuelTransferValve2: "/systems/fuel/valves/outer-inner-transfer-valve-2",
+ fuelLeftSwitch1: "/controls/fuel/switches/pump-left-1",
+ fuelLeftSwitch2: "/controls/fuel/switches/pump-left-2",
+ fuelCenterSwitch1: "/controls/fuel/switches/pump-center-1",
+ fuelCenterSwitch2: "/controls/fuel/switches/pump-center-2",
+ fuelRightSwitch1: "/controls/fuel/switches/pump-right-1",
+ fuelRightSwitch2: "/controls/fuel/switches/pump-right-2",
+ fuelTempLeftOuter: "/consumables/fuel/tank[0]/temperature_degC",
+ fuelTempLeftInner: "/consumables/fuel/tank[1]/temperature_degC",
+ fuelTempRightOuter: "/consumables/fuel/tank[4]/temperature_degC",
+ fuelTempRightInner: "/consumables/fuel/tank[3]/temperature_degC",
+ fuelLeftOuterQty: "/consumables/fuel/tank[0]/level-lbs",
+ fuelLeftInnerQty: "/consumables/fuel/tank[1]/level-lbs",
+ fuelRightOuterQty: "/consumables/fuel/tank[4]/level-lbs",
+ fuelRightInnerQty: "/consumables/fuel/tank[3]/level-lbs",
+ fuelCenterQty: "/consumables/fuel/tank[2]/level-lbs",
+ fuelTotalLbs: "/consumables/fuel/total-fuel-lbs",
};
foreach (var name; keys(input)) {
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-old.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-old.nas
index 64dbbd05..f2e2719a 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-old.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-old.nas
@@ -131,23 +131,8 @@ var R4BrakeTempc = props.globals.getNode("/gear/gear[2]/R4brake-temp-degc", 1);
var eng1_running = props.globals.getNode("/engines/engine[0]/running", 1);
var eng2_running = props.globals.getNode("/engines/engine[1]/running", 1);
var switch_cart = props.globals.getNode("/controls/electrical/ground-cart", 1);
-var spoiler_L1 = props.globals.getNode("", 1);
-var spoiler_L2 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l2/final-deg", 1);
-var spoiler_L3 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l3/final-deg", 1);
-var spoiler_L4 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l4/final-deg", 1);
-var spoiler_L5 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l5/final-deg", 1);
-var spoiler_R1 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r1/final-deg", 1);
-var spoiler_R2 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r2/final-deg", 1);
-var spoiler_R3 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r3/final-deg", 1);
-var spoiler_R4 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r4/final-deg", 1);
-var spoiler_R5 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r5/final-deg", 1);
-var total_fuel_lbs = props.globals.getNode("/consumables/fuel/total-fuel-lbs", 1);
var fuel_flow1 = props.globals.getNode("/engines/engine[0]/fuel-flow_actual", 1);
var fuel_flow2 = props.globals.getNode("/engines/engine[1]/fuel-flow_actual", 1);
-var fuel_left_outer_temp = props.globals.getNode("/consumables/fuel/tank[0]/temperature_degC", 1);
-var fuel_left_inner_temp = props.globals.getNode("/consumables/fuel/tank[1]/temperature_degC", 1);
-var fuel_right_outer_temp = props.globals.getNode("/consumables/fuel/tank[4]/temperature_degC", 1);
-var fuel_right_inner_temp = props.globals.getNode("/consumables/fuel/tank[3]/temperature_degC", 1);
var cutoff_switch1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
var cutoff_switch2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
var autobreak_mode = props.globals.getNode("/controls/autobrake/mode", 1);
@@ -1486,339 +1471,8 @@ var canvas_lowerECAM_eng = {
me.updateBottomStatus();
},
};
-
-
- # Elevators
-
-
- # Flight Computers
- if (elac1Node) {
- me["elac1"].setColor(0.0509,0.7529,0.2941);
- me.setColor(0.0509,0.7529,0.2941);
- } else if (!elac1Node or fbw.FBW.Failures.elac1.getValue()) {
- me["elac1"].setColor(0.7333,0.3803,0);
- me["path4249"].setColor(0.7333,0.3803,0);
- }
-
- if (elac2Node) {
- me["elac2"].setColor(0.0509,0.7529,0.2941);
- me.setColor(0.0509,0.7529,0.2941);
- } else if (!elac2Node or fbw.FBW.Failures.elac2.getValue()) {
- me["elac2"].setColor(0.7333,0.3803,0);
- me["path4249-3"].setColor(0.7333,0.3803,0);
- }
-
- if (sec1Node) {
- me["sec1"].setColor(0.0509,0.7529,0.2941);
- me["path4249-3-6-7"].setColor(0.0509,0.7529,0.2941);
- } else if (!sec1Node or fbw.FBW.Failures.sec1.getValue()) {
- me["sec1"].setColor(0.7333,0.3803,0);
- me["path4249-3-6-7"].setColor(0.7333,0.3803,0);
- }
-
- if (sec2Node) {
- me["sec2"].setColor(0.0509,0.7529,0.2941);
- me["path4249-3-6-7-5"].setColor(0.0509,0.7529,0.2941);
- } else if (!sec2Node or fbw.FBW.Failures.sec2.getValue()) {
- me["sec2"].setColor(0.7333,0.3803,0);
- me["path4249-3-6-7-5"].setColor(0.7333,0.3803,0);
- }
-
- if (fbw.FBW.Computers.sec3.getValue()) {
- me["sec3"].setColor(0.0509,0.7529,0.2941);
- me["path4249-3-6"].setColor(0.0509,0.7529,0.2941);
- } else if (!fbw.FBW.Computers.sec3.getValue() or fbw.FBW.Failures.sec3.getValue()) {
- me["sec3"].setColor(0.7333,0.3803,0);
- me["path4249-3-6"].setColor(0.7333,0.3803,0);
- }
-
- # Hydraulic Indicators
-
-
-
- me.updateBottomStatus();
- },
-};
-
-var canvas_lowerECAM_fuel = {
- new: func(canvas_group, file) {
- var m = {parents: [canvas_lowerECAM_fuel, canvas_lowerECAM_base]};
- m.init(canvas_group, file);
-
- return m;
- },
- getKeys: func() {
- return["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit","FUEL-Pump-Left-1","FUEL-Pump-Left-2","FUEL-Pump-Center-1","FUEL-Pump-Center-2","FUEL-Pump-Right-1","FUEL-Pump-Right-2","FUEL-Left-blocked","FUEL-Right-blocked","FUEL-Center-blocked","FUEL-Left-Transfer",
- "FUEL-Right-Transfer","FUEL-Left-Outer-Inacc","FUEL-Left-Inner-Inacc","FUEL-Center-Inacc","FUEL-Right-Inner-Inacc","FUEL-Right-Outer-Inacc","FUEL-Left-Outer-quantity","FUEL-Left-Inner-quantity","FUEL-Center-quantity","FUEL-Right-Inner-quantity",
- "FUEL-Right-Outer-quantity","FUEL-On-Board","FUEL-Flow-per-min","FUEL-APU-arrow","FUEL-APU-line","FUEL-APU-label","FUEL-used-1","FUEL-used-both","FUEL-used-2","FUEL-ENG-Master-1","FUEL-ENG-Master-2","FUEL-XFEED","FUEL-XFEED-pipes","FUEL-Left-Outer-temp",
- "FUEL-Left-Inner-temp","FUEL-Right-Inner-temp","FUEL-Right-Outer-temp","FUEL-Pump-Left-1-Closed","FUEL-Pump-Left-1-Open","FUEL-Pump-Left-2-Closed","FUEL-Pump-Left-2-Open","FUEL-Pump-Center-1-Open","FUEL-Pump-Center-1-Closed","FUEL-Pump-Center-2-Closed",
- "FUEL-Pump-Center-2-Open","FUEL-Pump-Right-1-Closed","FUEL-Pump-Right-1-Open","FUEL-Pump-Right-2-Closed","FUEL-Pump-Right-2-Open","FUEL-ENG-1-label","FUEL-ENG-2-label","FUEL-ENG-1-pipe","FUEL-ENG-2-pipe","ENG1idFFlow","ENG2idFFlow","FUEL-used-1","FUEL-used-2","FUEL-used-both",
- "Fused-weight-unit","FFlow-weight-unit","FOB-weight-unit"];
- },
- update: func() {
- _weight_kgs = acconfig_weight_kgs.getValue();
-
- if (pts.Engines.Engine.n1Actual[0].getValue() <= 18.8) {
- me["ENG1idFFlow"].setColor(0.7333,0.3803,0);
- me["FUEL-ENG-1-label"].setColor(0.7333,0.3803,0);
- } else {
- me["ENG1idFFlow"].setColor(0.8078,0.8039,0.8078);
- me["FUEL-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
- }
-
- if (pts.Engines.Engine.n1Actual[1].getValue() <= 18.5) {
- me["ENG2idFFlow"].setColor(0.7333,0.3803,0);
- me["FUEL-ENG-2-label"].setColor(0.7333,0.3803,0);
- } else {
- me["ENG2idFFlow"].setColor(0.8078,0.8039,0.8078);
- me["FUEL-ENG-2-label"].setColor(0.8078,0.8039,0.8078);
- }
-
- # TODO add FOB half-boxed amber if some fuel is blocked
- if (_weight_kgs == 1)
- {
- me["FUEL-On-Board"].setText(sprintf("%s", math.round(total_fuel_lbs.getValue() * LBS2KGS, 10)));
- me["FOB-weight-unit"].setText("KG");
- } else {
- me["FUEL-On-Board"].setText(sprintf("%s", math.round(total_fuel_lbs.getValue(), 10)));
- me["FOB-weight-unit"].setText("LBS");
- }
-
- if (_weight_kgs == 1) {
- me["FFlow-weight-unit"].setText("KG/MIN");
- } else {
- me["FFlow-weight-unit"].setText("LBS/MIN");
- }
-
- if (fadec.FADEC.Power.powered1.getValue() and fadec.FADEC.Power.powered2.getValue() or fadec.FADEC.Power.powerup.getValue()) {
- me["FUEL-Flow-per-min"].setColor(0.0509,0.7529,0.2941);
- if (_weight_kgs == 1) {
- me["FUEL-Flow-per-min"].setText(sprintf("%s", math.round(((fuel_flow1.getValue() + fuel_flow2.getValue()) * LBS2KGS) / 60, 10)));
- } else {
- me["FUEL-Flow-per-min"].setText(sprintf("%s", math.round((fuel_flow1.getValue() + fuel_flow2.getValue()) / 60, 10)));
- }
- } else {
- me["FUEL-Flow-per-min"].setColor(0.7333,0.3803,0);
- me["FUEL-Flow-per-min"].setText("XX");
- }
-
- # TODO use the valve prop and add amber if difference between eng master and valve
- # TODO add transition state
- if (systems.FUEL.Valves.lpValve1.getValue()) {
- me["FUEL-ENG-Master-1"].setRotation(0);
- me["FUEL-ENG-Master-1"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-ENG-Master-1"].setColorFill(0.0509,0.7529,0.2941);
- me["FUEL-ENG-1-pipe"].setColor(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-ENG-Master-1"].setRotation(90 * D2R);
- me["FUEL-ENG-Master-1"].setColor(0.7333,0.3803,0);
- me["FUEL-ENG-Master-1"].setColorFill(0.7333,0.3803,0);
- me["FUEL-ENG-1-pipe"].setColor(0.7333,0.3803,0);
- }
-
- # TODO use the valve prop and add amber if difference between eng master and valve
- # TODO add transition state
- if (systems.FUEL.Valves.lpValve2.getValue()) {
- me["FUEL-ENG-Master-2"].setRotation(0);
- me["FUEL-ENG-Master-2"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-ENG-Master-2"].setColorFill(0.0509,0.7529,0.2941);
- me["FUEL-ENG-2-pipe"].setColor(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-ENG-Master-2"].setRotation(90 * D2R);
- me["FUEL-ENG-Master-2"].setColor(0.7333,0.3803,0);
- me["FUEL-ENG-Master-2"].setColorFill(0.7333,0.3803,0);
- me["FUEL-ENG-2-pipe"].setColor(0.7333,0.3803,0);
- }
-
- # this is now bound to the XFEED switch
- # TODO use the valve prop
- # TODO add amber when disagree between switch and btn
- # TODO add transition state
- if (systems.FUEL.Valves.crossfeed.getBoolValue()) {
- me["FUEL-XFEED"].setRotation(0);
- me["FUEL-XFEED-pipes"].show();
- } else {
- me["FUEL-XFEED"].setRotation(90 * D2R);
- me["FUEL-XFEED-pipes"].hide();
- }
-
- # TODO add LO indication
- if (systems.FUEL.Switches.pumpLeft1.getBoolValue()) {
- me["FUEL-Pump-Left-1-Open"].show();
- me["FUEL-Pump-Left-1-Closed"].hide();
- me["FUEL-Pump-Left-1"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-Pump-Left-1"].setColorFill(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-Pump-Left-1-Open"].hide();
- me["FUEL-Pump-Left-1-Closed"].show();
- me["FUEL-Pump-Left-1"].setColor(0.7333,0.3803,0);
- me["FUEL-Pump-Left-1"].setColorFill(0.7333,0.3803,0);
- }
-
- # TODO add LO indication
- if (systems.FUEL.Switches.pumpLeft2.getBoolValue()) {
- me["FUEL-Pump-Left-2-Open"].show();
- me["FUEL-Pump-Left-2-Closed"].hide();
- me["FUEL-Pump-Left-2"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-Pump-Left-2"].setColorFill(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-Pump-Left-2-Open"].hide();
- me["FUEL-Pump-Left-2-Closed"].show();
- me["FUEL-Pump-Left-2"].setColor(0.7333,0.3803,0);
- me["FUEL-Pump-Left-2"].setColorFill(0.7333,0.3803,0);
- }
-
- # TODO add functionality to match FCOM 1.28.20 "Amber: Transfer valve is open, whereas commanded closed in automatic or manual mode"
- if (systems.FUEL.Switches.pumpCenter1.getBoolValue()) {
- me["FUEL-Pump-Center-1-Open"].show();
- me["FUEL-Pump-Center-1-Closed"].hide();
- me["FUEL-Pump-Center-1"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-Pump-Center-1"].setColorFill(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-Pump-Center-1-Open"].hide();
- me["FUEL-Pump-Center-1-Closed"].show();
- me["FUEL-Pump-Center-1"].setColor(0.7333,0.3803,0);
- me["FUEL-Pump-Center-1"].setColorFill(0.7333,0.3803,0);
- }
-
- # TODO add LO indication
- if (systems.FUEL.Switches.pumpCenter2.getBoolValue()) {
- me["FUEL-Pump-Center-2-Open"].show();
- me["FUEL-Pump-Center-2-Closed"].hide();
- me["FUEL-Pump-Center-2"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-Pump-Center-2"].setColorFill(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-Pump-Center-2-Open"].hide();
- me["FUEL-Pump-Center-2-Closed"].show();
- me["FUEL-Pump-Center-2"].setColor(0.7333,0.3803,0);
- me["FUEL-Pump-Center-2"].setColorFill(0.7333,0.3803,0);
- }
-
- # TODO add LO indication
- if (systems.FUEL.Switches.pumpRight1.getBoolValue()) {
- me["FUEL-Pump-Right-1-Open"].show();
- me["FUEL-Pump-Right-1-Closed"].hide();
- me["FUEL-Pump-Right-1"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-Pump-Right-1"].setColorFill(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-Pump-Right-1-Open"].hide();
- me["FUEL-Pump-Right-1-Closed"].show();
- me["FUEL-Pump-Right-1"].setColor(0.7333,0.3803,0);
- me["FUEL-Pump-Right-1"].setColorFill(0.7333,0.3803,0);
- }
-
- # TODO add LO indication
- if (systems.FUEL.Switches.pumpRight2.getBoolValue()) {
- me["FUEL-Pump-Right-2-Open"].show();
- me["FUEL-Pump-Right-2-Closed"].hide();
- me["FUEL-Pump-Right-2"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-Pump-Right-2"].setColorFill(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-Pump-Right-2-Open"].hide();
- me["FUEL-Pump-Right-2-Closed"].show();
- me["FUEL-Pump-Right-2"].setColor(0.7333,0.3803,0);
- me["FUEL-Pump-Right-2"].setColorFill(0.7333,0.3803,0);
- }
-
- # Fuel Used
- if (_weight_kgs == 1) {
- me["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10)));
- me["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue() * LBS2KGS, 10)));
- me["FUEL-used-both"].setText(sprintf("%s", (math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10) + math.round(fuel_used_lbs2.getValue() * LBS2KGS, 10))));
- me["Fused-weight-unit"].setText("KG");
- } else {
- me["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
- me["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
- me["FUEL-used-both"].setText(sprintf("%s", (math.round(fuel_used_lbs1.getValue(), 10) + math.round(fuel_used_lbs2.getValue(), 10))));
- me["Fused-weight-unit"].setText("LBS");
- }
-
- # Fuel Temp
- me["FUEL-Left-Outer-temp"].setText(sprintf("%s", math.round(fuel_left_outer_temp.getValue())));
- me["FUEL-Left-Inner-temp"].setText(sprintf("%s", math.round(fuel_left_inner_temp.getValue())));
- me["FUEL-Right-Outer-temp"].setText(sprintf("%s", math.round(fuel_right_outer_temp.getValue())));
- me["FUEL-Right-Inner-temp"].setText(sprintf("%s", math.round(fuel_right_inner_temp.getValue())));
-
- # Fuel Quantity
- # TODO add LO indication
- if (_weight_kgs == 1) {
- me["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftOuter.getValue() * LBS2KGS, 10)));
- me["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftInner.getValue() * LBS2KGS, 10)));
- me["FUEL-Center-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.center.getValue() * LBS2KGS, 10)));
- me["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightInner.getValue() * LBS2KGS, 10)));
- me["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightOuter.getValue() * LBS2KGS, 10)));
- } else {
- me["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftOuter.getValue(), 10)));
- me["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftInner.getValue(), 10)));
- me["FUEL-Center-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.center.getValue(), 10)));
- me["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightInner.getValue(), 10)));
- me["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightOuter.getValue(), 10)));
- }
-
- if (systems.FUEL.Valves.transfer1.getValue() == 0) {
- me["FUEL-Left-Transfer"].hide();
- } else {
- if (systems.FUEL.Valves.transfer1.getValue()) {
- me["FUEL-Left-Transfer"].setColor(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-Left-Transfer"].setColor(0.7333,0.3803,0);
- }
- me["FUEL-Left-Transfer"].show();
- }
-
- if (systems.FUEL.Valves.transfer2.getValue() == 0) {
- me["FUEL-Right-Transfer"].hide();
- } else {
- if (systems.FUEL.Valves.transfer2.getValue()) {
- me["FUEL-Right-Transfer"].setColor(0.0509,0.7529,0.2941);
- } else {
- me["FUEL-Right-Transfer"].setColor(0.7333,0.3803,0);
- }
- me["FUEL-Right-Transfer"].show();
- }
-
- if (!systems.FUEL.Switches.pumpCenter1.getValue() and !systems.FUEL.Switches.pumpCenter2.getValue()) {
- me["FUEL-Center-blocked"].show();
- } else {
- me["FUEL-Center-blocked"].hide();
- }
-
- # APU
- if (systems.FUEL.Valves.apu.getValue() and systems.APUNodes.Controls.master.getValue() and !systems.APUNodes.Controls.fire.getValue()) {
- me["FUEL-APU-label"].setColor(0.8078, 0.8039, 0.8078);
- me["FUEL-APU-line"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-APU-arrow"].setColor(0.0509,0.7529,0.2941);
- me["FUEL-APU-line"].show();
- me["FUEL-APU-arrow"].show();
- } elsif (systems.FUEL.Valves.apu.getValue() and (!systems.APUNodes.Controls.master.getValue() or systems.APUNodes.Controls.fire.getValue())) {
- me["FUEL-APU-label"].setColor(0.7333,0.3803,0);
- me["FUEL-APU-line"].setColor(0.7333,0.3803,0);
- me["FUEL-APU-arrow"].setColor(0.7333,0.3803,0);
- me["FUEL-APU-line"].show();
- me["FUEL-APU-arrow"].show();
- } elsif (systems.FUEL.Valves.apu.getValue() != 1 and (systems.APUNodes.Controls.master.getValue() or systems.APUNodes.Controls.fire.getValue())) {
- me["FUEL-APU-label"].setColor(0.7333,0.3803,0);
- me["FUEL-APU-line"].hide();
- me["FUEL-APU-arrow"].hide();
- } else {
- me["FUEL-APU-label"].setColor(0.8078, 0.8039, 0.8078);
- me["FUEL-APU-arrow"].setColor(0.8078, 0.8039, 0.8078);
- me["FUEL-APU-line"].hide();
- me["FUEL-APU-arrow"].show();
- }
-
- # Hide not yet implemented features
- # TODO add them
- me["FUEL-Left-blocked"].hide();
- me["FUEL-Right-blocked"].hide();
- me["FUEL-Left-Outer-Inacc"].hide();
- me["FUEL-Left-Inner-Inacc"].hide();
- me["FUEL-Right-Outer-Inacc"].hide();
- me["FUEL-Right-Inner-Inacc"].hide();
- me["FUEL-Center-Inacc"].hide();
- me.updateBottomStatus();
},
};
diff --git a/Models/Instruments/Lower-ECAM/res/fuel.svg b/Models/Instruments/Lower-ECAM/res/fuel.svg
index a2d0ce43..d91dff25 100644
--- a/Models/Instruments/Lower-ECAM/res/fuel.svg
+++ b/Models/Instruments/Lower-ECAM/res/fuel.svg
@@ -50,8 +50,8 @@
id="namedview371"
showgrid="false"
inkscape:zoom="0.68"
- inkscape:cx="817.73616"
- inkscape:cy="1022.6281"
+ inkscape:cx="434.43172"
+ inkscape:cy="1022.8371"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@@ -148,8 +148,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
- id="rect5105-2-5-3"
- style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ id="FUEL-XFEED-Cross"
+ style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:label="#rect5105-2-5-3" />
0000
+ style="font-size:30.1989994px;line-height:0;text-align:end;text-anchor:end;">0000
0000
000
+ style="font-size:30.1989994px;line-height:0;text-anchor:middle;text-align:center;">000
000
+ style="font-size:30.1989994px;line-height:0;text-align:end;text-anchor:end;">000
+ id="FUEL-ENG-Master-1-Cross"
+ style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:label="#rect5105-2-5-3-4" />
+ id="FUEL-ENG-Master-2-Cross"
+ style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:label="#rect5105-2-5-3-4-3" />
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+ ry="0"
+ transform="matrix(0,1,-1,0,0,0)"
+ y="-261.75253"
+ x="232.60442"
+ height="18.894773"
+ width="5.3955846"
+ id="FUEL-APU-line"
+ style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.09431255;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ sodipodi:nodetypes="cccccsc"
+ inkscape:connector-curvature="0"
+ id="FUEL-APU-arrow"
+ d="m 209.24999,234.99999 15.75,-7.5 16.5,-8.25 v 17.25 l 0,15.30854 c 0,0 -1.69343,-0.68362 -19.69533,-10.2091 -11.05467,-5.84944 -12.55467,-6.59944 -12.55467,-6.59944 z"
+ style="fill:none;stroke:#0dc04b;stroke-width:2.77499986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.80000019;stroke-dasharray:none;stroke-opacity:1" />
0000
+ style="font-size:30px;line-height:1.25;text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75;">0000
0000
+ style="font-size:30.00000191px;line-height:1.25;text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75;">0000
0000
+ style="font-size:30.00000191px;line-height:1.25;text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75;">0000