diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas
index f96c0291..a391b517 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas
@@ -22,7 +22,6 @@ var canvas_lowerECAMPageApu =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
obj["APUGenOff"].hide();
@@ -214,8 +213,7 @@ var canvas_lowerECAMPageApu =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -255,7 +253,7 @@ var canvas_lowerECAMPageApu =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-bleed.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-bleed.nas
index d170025a..47d24862 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-bleed.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-bleed.nas
@@ -18,8 +18,6 @@ var canvas_lowerECAMPageBleed =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
-
# init
obj.update_items = [
@@ -368,8 +366,7 @@ var canvas_lowerECAMPageBleed =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -417,7 +414,7 @@ var canvas_lowerECAMPageBleed =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-cond.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-cond.nas
index e2747835..8cd06563 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-cond.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-cond.nas
@@ -18,7 +18,6 @@ var canvas_lowerECAMPageCond =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
obj["CONDFanFwdFault"].hide();
@@ -79,8 +78,7 @@ var canvas_lowerECAMPageCond =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -123,7 +121,7 @@ var canvas_lowerECAMPageCond =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas
index a934cc23..a3333f7c 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas
@@ -18,59 +18,50 @@ var canvas_lowerECAMPageCruise =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
+ obj.quantity = [0, 0];
obj.update_items = [
- props.UpdateManager.FromHashValue("engOil1", 0.005, func(val) {
- if (obj.units) {
- obj["Oil1"].setText(sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,5))));
+ 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));
} else {
- obj["Oil1"].setText(sprintf("%2.1f",(0.1 * math.round(val * 10,5))));
+ obj.quantity[0] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOilQt1 * 10, 5)), 0, 99.5));
}
}),
- props.UpdateManager.FromHashValue("engOil2", 0.005, func(val) {
- if (obj.units) {
- obj["Oil2"].setText(sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,5))));
+ props.UpdateManager.FromHashList(["engOil2", "acconfigUnits"], 0.005, func(val) {
+ if (val.acconfigUnits) {
+ obj.quantity[1] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOil2 * 10, 5)), 0, 99.5));
} else {
- obj["Oil2"].setText(sprintf("%2.1f",(0.1 * math.round(val * 10,5))));
+ obj.quantity[1] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOil2 * 10, 5)), 0, 99.5));
}
}),
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["Fused-weight-unit"].setText("KG");
obj["OilUnit"].setText("LTR");
- # immediately update parameters
- obj["Oil1"].setText(sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[0].getValue() * QT2LTR * 10,5))));
- obj["Oil2"].setText(sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[1].getValue() * QT2LTR * 10,5))));
- obj["FUsed1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10)));
- obj["FUsed2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue() * LBS2KGS, 10)));
} else {
obj["Fused-weight-unit"].setText("LBS");
obj["OilUnit"].setText("QT");
- obj["Oil1"].setText(sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[0].getValue() * 10,5))));
- obj["Oil2"].setText(sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[1].getValue() * 10,5))));
- obj["FUsed1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
- obj["FUsed2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
}
}),
- props.UpdateManager.FromHashValue("engFuelUsed1", 1, func(val) {
- if (obj.units) {
- obj["FUsed1"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ props.UpdateManager.FromHashList(["engFuelUsed1","acconfigUnits"], 1, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUsed1"].setText(sprintf("%s", math.round(val.engFuelUsed1 * LBS2KGS, 10)));
} else {
- obj["FUsed1"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUsed1"].setText(sprintf("%s", math.round(val.engFuelUsed1, 10)));
}
}),
- props.UpdateManager.FromHashValue("engFuelUsed2", 1, func(val) {
- if (obj.units) {
- obj["FUsed2"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ props.UpdateManager.FromHashList(["engFuelUsed2","acconfigUnits"], 1, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUsed2"].setText(sprintf("%s", math.round(val.engFuelUsed2 * LBS2KGS, 10)));
} else {
- obj["FUsed2"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUsed2"].setText(sprintf("%s", math.round(val.engFuelUsed2, 10)));
}
}),
- props.UpdateManager.FromHashList(["engFuelUsed1","engFuelUsed2"], 1, func(val) {
- if (obj.units) {
+ props.UpdateManager.FromHashList(["engFuelUsed1","engFuelUsed2","acconfigUnits"], 1, func(val) {
+ if (val.acconfigUnits) {
obj["FUsed"].setText(sprintf("%s", math.round((val.engFuelUsed1 + val.engFuelUsed2) * LBS2KGS, 10)));
} else {
obj["FUsed"].setText(sprintf("%s", math.round((val.engFuelUsed1 + val.engFuelUsed2), 10)));
@@ -120,8 +111,7 @@ var canvas_lowerECAMPageCruise =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -161,7 +151,7 @@ var canvas_lowerECAMPageCruise =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
@@ -209,6 +199,17 @@ var canvas_lowerECAMPageCruise =
update_item.update(notification);
}
+ if (notification.dc1 >= 25) {
+ me["Oil1"].setText(me.quantity[0]);
+ } else {
+ me["Oil1"].setText("XX");
+ }
+ if (notification.dc2 >= 25) {
+ me["Oil2"].setText(me.quantity[1]);
+ } else {
+ me["Oil2"].setText("XX");
+ }
+
me.updateBottom(notification);
},
updatePower: func() {
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-door.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-door.nas
index feaadbc6..9a3b1e44 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-door.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-door.nas
@@ -18,7 +18,6 @@ var canvas_lowerECAMPageDoor =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
obj["Cabin2LeftSlide"].hide();
@@ -196,8 +195,7 @@ var canvas_lowerECAMPageDoor =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -240,7 +238,7 @@ var canvas_lowerECAMPageDoor =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas
index a64f006d..80705212 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas
@@ -18,7 +18,6 @@ var canvas_lowerECAMPageElec =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
obj["IDG1-LOPR"].hide();
@@ -667,8 +666,7 @@ var canvas_lowerECAMPageElec =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -714,7 +712,7 @@ var canvas_lowerECAMPageElec =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-eng.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-eng.nas
index 4d5d0694..12aa9600 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-eng.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-eng.nas
@@ -23,116 +23,80 @@ var canvas_lowerECAMPageEng =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
-
# init
obj["FUEL-clog-1"].hide();
obj["FUEL-clog-2"].hide();
obj["OIL-clog-1"].hide();
obj["OIL-clog-2"].hide();
- obj.quantity = [nil, nil];
+ obj.quantity = [0, 0];
+ obj.pressure = [0, 0];
+ obj.temperature = [0, 0];
obj.update_items = [
- props.UpdateManager.FromHashValue("engOilQt1", 0.005, func(val) {
- if (obj.units) {
- obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,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(((val * QT2LTR)) * D2R);
+ props.UpdateManager.FromHashList(["engOilQT1","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));
} else {
- obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(val * 10,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((val) * D2R);
+ obj.quantity[0] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOilQT1 * 10, 5)), 0, 99.5));
}
+ obj["OilQT1-needle"].setRotation(math.clamp(val.engOilQT1, 0, 27) * 6.66 * D2R);
}),
- props.UpdateManager.FromHashValue("engOilQt2", 0.005, func(val) {
- if (obj.units) {
- obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,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(((val * QT2LTR)) * D2R);
+ props.UpdateManager.FromHashList(["engOilQT2","acconfigUnits"], 0.005, func(val) {
+ if (val.acconfigUnits) {
+ obj.quantity[1] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOilQT2 * QT2LTR * 10, 5)), 0, 99.5));
} else {
- obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(val * 10,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((val) * D2R);
+ obj.quantity[1] = sprintf("%2.1f", math.clamp((0.1 * math.round(val.engOilQT2 * 10, 5)), 0, 99.5));
}
+ obj["OilQT2-needle"].setRotation(math.clamp(val.engOilQT2, 0, 27) * 6.66 * D2R);
}),
props.UpdateManager.FromHashValue("engOilPsi1", 0.25, func(val) {
+ obj.pressure[0] = val;
+
if (val >= 13) {
- obj["OilPSI1"].setColor(0.0509,0.7529,0.2941);
obj["OilPSI1-needle"].setColor(0.0509,0.7529,0.2941);
} else {
- obj["OilPSI1"].setColor(1,0,0);
obj["OilPSI1-needle"].setColor(1,0,0);
}
-
- obj["OilPSI1"].setText(sprintf("%s", math.round(val)));
- obj["OilPSI1-needle"].setRotation((val) * D2R);
+ obj["OilPSI1-needle"].setRotation(math.clamp(val, 0, 100) * 1.8 * D2R);
}),
props.UpdateManager.FromHashValue("engOilPsi2", 0.25, func(val) {
+ obj.pressure[1] = val;
+
if (val >= 13) {
- obj["OilPSI2"].setColor(0.0509,0.7529,0.2941);
obj["OilPSI2-needle"].setColor(0.0509,0.7529,0.2941);
} else {
- obj["OilPSI2"].setColor(1,0,0);
obj["OilPSI2-needle"].setColor(1,0,0);
}
-
- obj["OilPSI2"].setText(sprintf("%s", math.round(val)));
- obj["OilPSI2-needle"].setRotation((val) * D2R);
+ obj["OilPSI2-needle"].setRotation(math.clamp(val, 0, 100) * 1.8 * D2R);
}),
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
+ props.UpdateManager.FromHashList(["engFuelUsed1","acconfigUnits"], 1, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-used-1"].setText(sprintf("%s", math.round(val.engFuelUsed1 * LBS2KGS, 10)));
+ } else {
+ obj["FUEL-used-1"].setText(sprintf("%s", math.round(val.engFuelUsed1, 10)));
+ }
+ }),
+ props.UpdateManager.FromHashList(["engFuelUsed2","acconfigUnits"], 1, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-used-2"].setText(sprintf("%s", math.round(val.engFuelUsed2 * LBS2KGS, 10)));
+ } else {
+ obj["FUEL-used-2"].setText(sprintf("%s", math.round(val.engFuelUsed2, 10)));
+ }
+ }),
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["Fused-weight-unit"].setText("KG");
obj["Fused-oil-unit"].setText("LTR");
- # immediately update parameters
- obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[0].getValue() * QT2LTR * 10,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(((pts.Engines.Engine.oilQt[0].getValue() * QT2LTR) + 90) * D2R);
- obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[1].getValue() * QT2LTR * 10,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(((pts.Engines.Engine.oilQt[1].getValue() * QT2LTR) + 90) * D2R);
- 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)));
} else {
obj["Fused-weight-unit"].setText("LBS");
obj["Fused-oil-unit"].setText("QT");
- obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[0].getValue() * 10,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((pts.Engines.Engine.oilQt[0].getValue() + 90) * D2R);
- obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[1].getValue() * 10,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((pts.Engines.Engine.oilQt[1].getValue() + 90) * D2R);
- 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)));
- }
- }),
- props.UpdateManager.FromHashValue("engFuelUsed1", 1, 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", 1, 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)));
}
}),
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -170,11 +134,11 @@ 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"];
+ "VIB-N1-1","VIB-N1-2","VIB-N2-1","VIB-N2-2","OilQT1-decimalpt","OilQT2-decimalpt"];
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
@@ -222,6 +186,78 @@ var canvas_lowerECAMPageEng =
update_item.update(notification);
}
+ 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["OilPSI1"].setText(sprintf("%s", math.clamp(math.round(me.pressure[0], 2), 0, 998)));
+ if (me.pressure[0] >= 13) {
+ me["OilPSI1"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ me["OilPSI1"].setColor(1,0,0);
+ }
+
+ me["OilQT1-decimalpt"].show();
+ me["OilQT1-decimal"].show();
+ me["OilQT1-needle"].show();
+ me["OilPSI1-needle"].show();
+ } else {
+ me["OilQT1"].setColor(0.7333,0.3803,0);
+ me["OilPSI1"].setColor(0.7333,0.3803,0);
+ me["OilQT1"].setText(" XX");
+ me["OilPSI1"].setText("XX");
+
+ me["OilQT1-decimalpt"].hide();
+ me["OilQT1-decimal"].hide();
+ me["OilQT1-needle"].hide();
+ me["OilPSI1-needle"].hide();
+ }
+
+ 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["OilPSI2"].setText(sprintf("%s", math.clamp(math.round(me.pressure[0], 2), 0, 998)));
+ if (me.pressure[1] >= 13) {
+ me["OilPSI2"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ me["OilPSI2"].setColor(1,0,0);
+ }
+
+ me["OilQT2-decimalpt"].show();
+ me["OilQT2-decimal"].show();
+ me["OilQT2-needle"].show();
+ me["OilPSI2-needle"].show();
+ } else {
+ me["OilQT2"].setColor(0.7333,0.3803,0);
+ me["OilPSI2"].setColor(0.7333,0.3803,0);
+ me["OilQT2"].setText(" XX");
+ me["OilPSI2"].setText("XX");
+
+ me["OilQT2-decimalpt"].hide();
+ me["OilQT2-decimal"].hide();
+ me["OilQT2-needle"].hide();
+ me["OilPSI2-needle"].hide();
+ }
+
+ if (notification.dcBat >= 25) {
+ me["OilTemp1"].setText("22");
+ me["OilTemp1"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ me["OilTemp1"].setText("XX");
+ me["OilTemp1"].setColor(0.7333,0.3803,0);
+ }
+
+ if (notification.dcEss >= 25) {
+ me["OilTemp2"].setText("22");
+ me["OilTemp2"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ me["OilTemp2"].setText("XX");
+ me["OilTemp2"].setColor(0.7333,0.3803,0);
+ }
+
me.updateBottom(notification);
},
updatePower: func() {
@@ -263,8 +299,8 @@ var canvas_lowerECAMPageEng =
var input = {
engFuelUsed1: "/systems/fuel/fuel-used-1",
engFuelUsed2: "/systems/fuel/fuel-used-2",
- engOilQt1: "/engines/engine[0]/oil-qt-actual",
- engOilQt2: "/engines/engine[1]/oil-qt-actual",
+ engOilQT1: "/engines/engine[0]/oil-qt-actual",
+ engOilQT2: "/engines/engine[1]/oil-qt-actual",
engOilPsi1: "/engines/engine[0]/oil-psi-actual",
engOilPsi2: "/engines/engine[1]/oil-psi-actual",
};
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-fctl.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-fctl.nas
index 0d102479..3d5aa721 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-fctl.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-fctl.nas
@@ -18,7 +18,6 @@ var canvas_lowerECAMPageFctl =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
@@ -467,8 +466,7 @@ var canvas_lowerECAMPageFctl =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -511,7 +509,7 @@ var canvas_lowerECAMPageFctl =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-fuel.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-fuel.nas
index 39c6c0eb..a746f0f5 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-fuel.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-fuel.nas
@@ -21,7 +21,6 @@ var canvas_lowerECAMPageFuel =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
obj["FUEL-Left-blocked"].hide();
@@ -33,95 +32,75 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Center-Inacc"].hide();
obj.update_items = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, 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)));
+ props.UpdateManager.FromHashList(["engFuelUsed1","acconfigUnits"], 0.5, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-used-1"].setText(sprintf("%s", math.round(val.engFuelUsed1 * LBS2KGS, 10)));
} else {
- obj["FUEL-used-1"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUEL-used-1"].setText(sprintf("%s", math.round(val.engFuelUsed1, 10)));
}
}),
- props.UpdateManager.FromHashValue("engFuelUsed2", 0.5, func(val) {
- if (obj.units) {
- obj["FUEL-used-2"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ props.UpdateManager.FromHashList(["engFuelUsed2","acconfigUnits"], 0.5, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-used-2"].setText(sprintf("%s", math.round(val.engFuelUsed2 * LBS2KGS, 10)));
} else {
- obj["FUEL-used-2"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUEL-used-2"].setText(sprintf("%s", math.round(val.engFuelUsed2, 10)));
}
}),
- props.UpdateManager.FromHashList(["engFuelUsed1","engFuelUsed2"], 0.5, func(val) {
- if (obj.units) {
+ props.UpdateManager.FromHashList(["engFuelUsed1","engFuelUsed2","acconfigUnits"], 0.5, func(val) {
+ if (val.acconfigUnits) {
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)));
+ props.UpdateManager.FromHashList(["fuelLeftOuterQty","acconfigUnits"], 0.25, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(val.fuelLeftOuterQty * LBS2KGS, 10)));
} else {
- obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(val.fuelLeftOuterQty, 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)));
+ props.UpdateManager.FromHashList(["fuelRightOuterQty","acconfigUnits"], 0.25, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(val.fuelRightOuterQty * LBS2KGS, 10)));
} else {
- obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(val.fuelRightOuterQty, 10)));
}
}),
- props.UpdateManager.FromHashValue("fuelCenterQty", 0.25, func(val) {
- if (obj.units) {
- obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
+ props.UpdateManager.FromHashList(["fuelCenterQty","acconfigUnits"], 0.25, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(val.fuelCenterQty * LBS2KGS, 10)));
} else {
- obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(val.fuelCenterQty, 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)));
+ props.UpdateManager.FromHashList(["fuelLeftInnerQty","acconfigUnits"], 0.25, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(val.fuelLeftInnerQty * LBS2KGS, 10)));
} else {
- obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(val.fuelLeftInnerQty, 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)));
+ props.UpdateManager.FromHashList(["fuelRightInnerQty","acconfigUnits"], 0.25, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(val.fuelRightInnerQty * LBS2KGS, 10)));
} else {
- obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(val.fuelRightInnerQty, 10)));
}
}),
- props.UpdateManager.FromHashList(["fuelflow_1","fuelflow_2"], nil, func(val) {
- if (obj.units) {
+ props.UpdateManager.FromHashList(["fuelflow_1","fuelflow_2","acconfigUnits"], 0.25, func(val) {
+ if (val.acconfigUnits) {
obj.fuelFlowPerMinute = sprintf("%s", math.round(((val.fuelflow_1 + val.fuelflow_2) * LBS2KGS) / 60, 10));
} else {
obj.fuelFlowPerMinute = sprintf("%s", math.round((val.fuelflow_1 + val.fuelflow_2) / 60, 10));
@@ -381,11 +360,11 @@ var canvas_lowerECAMPageFuel =
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)));
+ props.UpdateManager.FromHashList(["fuelTotalLbs","acconfigUnits"], 1, func(val) {
+ if (val.acconfigUnits) {
+ obj["FUEL-On-Board"].setText(sprintf("%s", math.round(val.fuelTotalLbs * LBS2KGS, 10)));
} else {
- obj["FUEL-On-Board"].setText(sprintf("%s", math.round(val, 10)));
+ obj["FUEL-On-Board"].setText(sprintf("%s", math.round(val.fuelTotalLbs, 10)));
}
}),
props.UpdateManager.FromHashValue("fuelTempLeftOuter", 0.5, func(val) {
@@ -452,8 +431,7 @@ var canvas_lowerECAMPageFuel =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -498,7 +476,7 @@ var canvas_lowerECAMPageFuel =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas
index ed2b3dcd..a7eaa316 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas
@@ -32,7 +32,6 @@ var canvas_lowerECAMPageHyd =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
@@ -410,8 +409,7 @@ var canvas_lowerECAMPageHyd =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -454,7 +452,7 @@ var canvas_lowerECAMPageHyd =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-press.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-press.nas
index b90db8c7..374b17c5 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-press.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-press.nas
@@ -18,7 +18,6 @@ var canvas_lowerECAMPagePress =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
obj["PRESS-Sys-2"].hide();
@@ -83,8 +82,7 @@ var canvas_lowerECAMPagePress =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -126,7 +124,7 @@ var canvas_lowerECAMPagePress =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-sts.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-sts.nas
index 3adb3e3d..5d70a21d 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-sts.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-sts.nas
@@ -18,7 +18,6 @@ var canvas_lowerECAMPageSts =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
@@ -26,8 +25,7 @@ var canvas_lowerECAMPageSts =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -70,7 +68,7 @@ var canvas_lowerECAMPageSts =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-wheel.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-wheel.nas
index 7899159e..d06b463a 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-wheel.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-wheel.nas
@@ -18,7 +18,6 @@ var canvas_lowerECAMPageWheel =
obj[key] = obj.group.getElementById(key);
};
- obj.units = acconfig_weight_kgs.getValue();
# init
obj["leftuplock"].hide();
@@ -588,8 +587,7 @@ var canvas_lowerECAMPageWheel =
];
obj.updateItemsBottom = [
- props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
- obj.units = val;
+ props.UpdateManager.FromHashValue("acconfigUnits", 1, func(val) {
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
@@ -637,7 +635,7 @@ var canvas_lowerECAMPageWheel =
},
updateBottom: func(notification) {
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
- if (me.units) {
+ if (notification.acconfigUnits) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
diff --git a/Models/Instruments/Lower-ECAM/res/eng.svg b/Models/Instruments/Lower-ECAM/res/eng.svg
index d58d7bb8..348edb17 100644
--- a/Models/Instruments/Lower-ECAM/res/eng.svg
+++ b/Models/Instruments/Lower-ECAM/res/eng.svg
@@ -5,7 +5,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
- inkscape:version="1.1 (c68e22c387, 2021-05-23)"
+ inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="eng.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
@@ -22,7 +22,6 @@
image/svg+xml
-
@@ -38,12 +37,12 @@
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
- inkscape:window-height="986"
+ inkscape:window-height="974"
id="namedview371"
showgrid="true"
- inkscape:zoom="1"
- inkscape:cx="594.5"
- inkscape:cy="330"
+ inkscape:zoom="2"
+ inkscape:cx="930"
+ inkscape:cy="390.5"
inkscape:window-x="-11"
inkscape:window-y="-11"
inkscape:window-maximized="1"
@@ -373,7 +372,7 @@
sodipodi:role="line">0