Merge branch 'dev' into new-flightplan
This commit is contained in:
commit
2fcdb1c0f1
22 changed files with 2312 additions and 1436 deletions
|
@ -4766,9 +4766,10 @@
|
|||
<file>Aircraft/A320-family/AircraftConfig/acconfig.nas</file>
|
||||
</acconfig>
|
||||
<effects>
|
||||
<file>Aircraft/A320-family/Nasal/Effects/icing.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/Effects/light-manager.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/Effects/thunder-effects.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/Effects/icing.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/Effects/tyresmoke.nas</file>
|
||||
</effects>
|
||||
<systems>
|
||||
<file>Aircraft/A320-family/Nasal/Systems/APU.nas</file>
|
||||
|
@ -4785,7 +4786,6 @@
|
|||
<file>Aircraft/A320-family/Nasal/Systems/ground_services.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/Systems/payload.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/Panels/clock.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/Systems/tyresmoke.nas</file>
|
||||
</systems>
|
||||
<ecam>
|
||||
<file>Aircraft/A320-family/Nasal/ECAM/SystemDisplay.nas</file>
|
||||
|
|
|
@ -22,7 +22,7 @@ var spinning = maketimer(0.05, func {
|
|||
|
||||
var failReset = func {
|
||||
systems.ELEC.resetFail();
|
||||
systems.PNEU.resetFail();
|
||||
systems.PNEU.resetFailures();
|
||||
fbw.FBW.resetFail();
|
||||
systems.HYD.resetFail();
|
||||
}
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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(["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["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(["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["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.engOilQT2 * 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,21 @@ var canvas_lowerECAMPageCruise =
|
|||
update_item.update(notification);
|
||||
}
|
||||
|
||||
if (notification.dc1 >= 25) {
|
||||
me["Oil1"].setText(me.quantity[0]);
|
||||
me["Oil1"].setColor(0.0509,0.7529,0.2941);
|
||||
} else {
|
||||
me["Oil1"].setText("XX");
|
||||
me["Oil1"].setColor(0.7333,0.3803,0);
|
||||
}
|
||||
if (notification.dc2 >= 25) {
|
||||
me["Oil2"].setText(me.quantity[1]);
|
||||
me["Oil2"].setColor(0.0509,0.7529,0.2941);
|
||||
} else {
|
||||
me["Oil2"].setText("XX");
|
||||
me["Oil2"].setColor(0.7333,0.3803,0);
|
||||
}
|
||||
|
||||
me.updateBottom(notification);
|
||||
},
|
||||
updatePower: func() {
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -23,116 +23,84 @@ 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) + 90) * 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 + 90) * D2R);
|
||||
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.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) + 90) * 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 + 90) * D2R);
|
||||
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) {
|
||||
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 + 90) * 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 + 90) * 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 +138,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","OilQT1-XX","OilQT2-XX"];
|
||||
},
|
||||
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 +190,78 @@ var canvas_lowerECAMPageEng =
|
|||
update_item.update(notification);
|
||||
}
|
||||
|
||||
if (notification.dc1 >= 25) {
|
||||
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) {
|
||||
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"].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");
|
||||
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-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) {
|
||||
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"].hide();
|
||||
me["OilQT2-XX"].show();
|
||||
me["OilPSI2"].setColor(0.7333,0.3803,0);
|
||||
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 +303,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",
|
||||
};
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
@ -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.8284271"
|
||||
inkscape:cx="372.64527"
|
||||
inkscape:cy="402.69731"
|
||||
inkscape:window-x="-11"
|
||||
inkscape:window-y="-11"
|
||||
inkscape:window-maximized="1"
|
||||
|
@ -373,7 +372,7 @@
|
|||
sodipodi:role="line">0</tspan></text>
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#0dc04b;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4642"
|
||||
id="OilQT1-decimalpt"
|
||||
width="3.2"
|
||||
height="3.2"
|
||||
x="315.07367"
|
||||
|
@ -419,7 +418,7 @@
|
|||
x="733.11786"
|
||||
height="3.2"
|
||||
width="3.2"
|
||||
id="rect4805"
|
||||
id="OilQT2-decimalpt"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#0dc04b;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<text
|
||||
inkscape:label="#text5149"
|
||||
|
@ -497,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" />
|
||||
<path
|
||||
inkscape:transform-center-x="74.153195"
|
||||
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 233.55623,340.27736 9.47635,0"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:3.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 233.55623,340.27736 h 9.47635"
|
||||
id="path4336"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
inkscape:transform-center-x="-74.153195"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:3.46754003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 391.33897,340.34361 -9.47635,0"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:3.46754;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 391.33897,340.34361 h -9.47635"
|
||||
id="path4338"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
|
@ -534,8 +533,8 @@
|
|||
inkscape:label="#g4340"
|
||||
id="OilQT2-scaletick">
|
||||
<path
|
||||
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 0,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"
|
||||
d="m 312.4476,261.18529 v 9.47635"
|
||||
id="path4224"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc"
|
||||
|
@ -544,15 +543,15 @@
|
|||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4226"
|
||||
d="m 233.55623,340.27736 9.47635,0"
|
||||
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 233.55623,340.27736 h 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"
|
||||
inkscape:transform-center-x="74.153195" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4229"
|
||||
d="m 391.33897,340.34361 -9.47635,0"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:3.46754003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 391.33897,340.34361 h -9.47635"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:3.46754;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:transform-center-x="-74.153195" />
|
||||
</g>
|
||||
<path
|
||||
|
@ -806,4 +805,26 @@
|
|||
x="745.15948"
|
||||
id="tspan997"
|
||||
sodipodi:role="line">22</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.75px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="693.62469"
|
||||
y="305.87512"
|
||||
id="OilQT2-XX"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan2983"
|
||||
style="font-size:40px;fill:#bb6100;fill-opacity:1;stroke-width:0.75px"
|
||||
x="693.62469"
|
||||
y="305.87512">XX</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.75px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="275.57779"
|
||||
y="305.87521"
|
||||
id="OilQT1-XX"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan8538"
|
||||
style="font-size:40px;fill:#bb6100;fill-opacity:1;stroke-width:0.75px"
|
||||
x="275.57779"
|
||||
y="305.87521">XX</tspan></text>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 45 KiB |
|
@ -687,23 +687,18 @@ var canvas_pfd = {
|
|||
}),
|
||||
props.UpdateManager.FromHashList(["altimeterHpa","altimeterInhg","altimeterInhgMode"], 0.005, func(val) {
|
||||
if (val.altimeterInhgMode == 0) {
|
||||
obj["QNH_setting"].setText(sprintf("%4.0f", val.altimeterHpa));
|
||||
obj["QNH_setting"].setText(sprintf("%4d", val.altimeterHpa));
|
||||
} else {
|
||||
obj["QNH_setting"].setText(sprintf("%2.2f", val.altimeterInhg));
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashList(["altimeterStd","altitudeAutopilot"], 1, func(val) {
|
||||
if (val.altimeterStd == 1) {
|
||||
if (val.altitudeAutopilot < 10000) {
|
||||
obj["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ val.altitudeAutopilot / 100));
|
||||
obj["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ val.altitudeAutopilot / 100));
|
||||
} else {
|
||||
obj["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ val.altitudeAutopilot / 100));
|
||||
obj["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ val.altitudeAutopilot / 100));
|
||||
}
|
||||
obj["ALT_digit_UP"].setText(sprintf("FL%3d", val.altitudeAutopilot / 100));
|
||||
obj["ALT_digit_DN"].setText(sprintf("FL%3d", val.altitudeAutopilot / 100));
|
||||
} else {
|
||||
obj["ALT_digit_UP"].setText(sprintf("%5.0f", val.altitudeAutopilot));
|
||||
obj["ALT_digit_DN"].setText(sprintf("%5.0f", val.altitudeAutopilot));
|
||||
obj["ALT_digit_UP"].setText(sprintf("%5d", val.altitudeAutopilot));
|
||||
obj["ALT_digit_DN"].setText(sprintf("%5d", val.altitudeAutopilot));
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("managedSpd", 1, func(val) {
|
||||
|
@ -1230,20 +1225,21 @@ var canvas_pfd = {
|
|||
obj["ALT_three"].setText(sprintf("%03d", abs(obj.middleAltText)));
|
||||
obj["ALT_two"].setText(sprintf("%03d", abs(obj.middleAltText - 5)));
|
||||
obj["ALT_one"].setText(sprintf("%03d", abs(obj.middleAltText - 10)));
|
||||
|
||||
if (val.altitudePFD < 0) {
|
||||
obj["ALT_neg"].show();
|
||||
} else {
|
||||
obj["ALT_neg"].hide();
|
||||
}
|
||||
} else {
|
||||
obj["ALT_neg"].hide();
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashList(["altitudePFD","altError"], 0.1, func(val) {
|
||||
if (!val.altError) {
|
||||
obj.altOffset = val.altitudePFD / 500 - int(val.altitudePFD / 500);
|
||||
obj.middleAltOffset = nil;
|
||||
obj["ALT_tapes"].show();
|
||||
|
||||
if (val.altitudePFD < 0) {
|
||||
obj["ALT_neg"].show();
|
||||
obj["ALT_tenthousands"].hide();
|
||||
} else {
|
||||
obj["ALT_neg"].hide();
|
||||
obj["ALT_tenthousands"].show();
|
||||
}
|
||||
|
||||
if (obj.altOffset > 0.5) {
|
||||
obj.middleAltOffset = -(obj.altOffset - 1) * 243.3424;
|
||||
|
@ -1253,12 +1249,29 @@ var canvas_pfd = {
|
|||
|
||||
obj["ALT_scale"].setTranslation(0, -obj.middleAltOffset);
|
||||
obj["ALT_scale"].update();
|
||||
obj["ALT_tens"].setTranslation(0, num(right(sprintf("%02d", val.altitudePFD), 2)) * 1.392);
|
||||
|
||||
obj.altAbs = abs(val.altitudePFD);
|
||||
|
||||
if (obj.altAbs < 9900) { # Prepare to show the zero at 10000
|
||||
obj["ALT_thousands_zero"].hide();
|
||||
} else {
|
||||
obj["ALT_thousands_zero"].show();
|
||||
}
|
||||
|
||||
obj.altTenThousands = num(right(sprintf("%05d", obj.altAbs), 5)) / 100; # Unlikely it would be above 99999 but lets account for it anyways
|
||||
obj["ALT_tenthousands"].setTranslation(0, genevaAltTenThousands(obj.altTenThousands) * 51.61);
|
||||
|
||||
obj.altThousands = num(right(sprintf("%04d", obj.altAbs), 4)) / 100;
|
||||
obj["ALT_thousands"].setTranslation(0, genevaAltThousands(obj.altThousands) * 51.61);
|
||||
|
||||
obj.altHundreds = num(right(sprintf("%03d", obj.altAbs), 3)) / 100;
|
||||
obj["ALT_hundreds"].setTranslation(0, genevaAltHundreds(obj.altHundreds) * 51.61);
|
||||
|
||||
obj["ALT_tens"].setTranslation(0, num(right(sprintf("%02d", obj.altAbs), 2)) * 1.498);
|
||||
} else {
|
||||
obj["ALT_tapes"].hide();
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("altitudeDigits", 1, func(val) {
|
||||
obj["ALT_digits"].setText(sprintf("%d", val));
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("altitudeDifference", 0.1, func(val) {
|
||||
obj["ALT_target"].setTranslation(0, (val / 100) * -48.66856);
|
||||
}),
|
||||
|
@ -1315,11 +1328,11 @@ var canvas_pfd = {
|
|||
"FMA_fd","FMA_athr","FMA_man_box","FMA_flx_box","FMA_thrust_box","FMA_pitch_box","FMA_pitcharm_box","FMA_roll_box","FMA_rollarm_box","FMA_combined_box","FMA_catmode_box","FMA_cattype_box","FMA_cat_box","FMA_dh_box","FMA_ap_box","FMA_fd_box",
|
||||
"FMA_athr_box","FMA_Middle1","FMA_Middle2","ALPHA_MAX","ALPHA_PROT","ALPHA_SW","ALPHA_bars","VLS_min","ASI_max","ASI_scale","ASI_target","ASI_mach","ASI_trend_up","ASI_trend_down","ASI_digit_UP","ASI_digit_DN","ASI_decimal_UP",
|
||||
"ASI_decimal_DN","ASI_index","ASI_error","ASI_group","ASI_frame","AI_center","AI_bank","AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading",
|
||||
"AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash","ALT_box","ALT_box_amber","ALT_scale","ALT_target","ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP",
|
||||
"ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting","QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer",
|
||||
"HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame","TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend",
|
||||
"ILS_HDG_R","ILS_HDG_L","ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd",
|
||||
"Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_buss_ref","ASI_buss_ref_blue"];
|
||||
"AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash","ALT_box","ALT_box_amber","ALT_scale","ALT_target","ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_tens","ALT_digit_UP","ALT_tapes","ALT_hundreds",
|
||||
"ALT_thousands","ALT_thousands_zero","ALT_tenthousands","ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting","QNH_std","QNH_box",
|
||||
"LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer","HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame","TRK_pointer","machError",
|
||||
"ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend","ILS_HDG_R","ILS_HDG_L","ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground",
|
||||
"ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd","Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_buss_ref","ASI_buss_ref_blue"];
|
||||
},
|
||||
getKeysTest: func() {
|
||||
return ["Test_white","Test_text"];
|
||||
|
@ -1441,9 +1454,9 @@ var canvas_pfd = {
|
|||
}
|
||||
|
||||
if (fmgc.FMGCInternal.maxspeed <= 30) {
|
||||
notification.ASImax = 0 - me.ASI;
|
||||
notification.ASImax = 0 - notification.ASI;
|
||||
} else if (fmgc.FMGCInternal.maxspeed >= 420) {
|
||||
notification.ASImax = 390 - me.ASI;
|
||||
notification.ASImax = 390 - notification.ASI;
|
||||
} else {
|
||||
notification.ASImax = fmgc.FMGCInternal.maxspeed - 30 - notification.ASI;
|
||||
}
|
||||
|
@ -1658,6 +1671,7 @@ var canvas_pfd = {
|
|||
notification.ASItrendIsShown = 0;
|
||||
notification.Ctrgt = 0;
|
||||
notification.flapMaxSpeed = 0;
|
||||
notification.fmgcTakeoffState = nil;
|
||||
notification.Ftrgt = 0;
|
||||
notification.Strgt = 0;
|
||||
notification.showV1 = 0;
|
||||
|
@ -1690,7 +1704,6 @@ var canvas_pfd = {
|
|||
if (dmc.DMController.DMCs[me.number].outputs[1] != nil) {
|
||||
notification.altError = 0;
|
||||
notification.altitudePFD = dmc.DMController.DMCs[me.number].outputs[1].getValue();
|
||||
notification.altitudeDigits = dmc.DMController.DMCs[me.number].outputs[3].getValue();
|
||||
notification.altitudeDifference = dmc.DMController.DMCs[me.number].outputs[7].getValue();
|
||||
|
||||
if (!ecam.altAlertFlash and !ecam.altAlertSteady) {
|
||||
|
@ -1775,7 +1788,6 @@ var canvas_pfd = {
|
|||
} else {
|
||||
notification.altError = 1;
|
||||
notification.altitudePFD = -9999;
|
||||
notification.altitudeDigits = -9999;
|
||||
notification.altitudeDifference = -9999;
|
||||
}
|
||||
|
||||
|
@ -2240,7 +2252,6 @@ foreach (var name; keys(input)) {
|
|||
|
||||
|
||||
# Power
|
||||
|
||||
setlistener("/systems/electrical/bus/ac-ess", func() {
|
||||
if (A320PFD1.MainScreen != nil) { A320PFD1.MainScreen.powerTransient() }
|
||||
}, 0, 0);
|
||||
|
@ -2258,6 +2269,26 @@ var roundaboutAlt = func(x) {
|
|||
return (x * 0.2 - int(x * 0.2)) < 0.5 ? 5 * int(x * 0.2) : 5 + 5 * int(x * 0.2);
|
||||
};
|
||||
|
||||
var genevaAltTenThousands = func(input) {
|
||||
var m = math.floor(input / 100);
|
||||
var s = math.max(0, (math.mod(input, 1) - 0.8) * 5);
|
||||
if (math.mod(input / 10, 1) < 0.9 or math.mod(input / 100, 1) < 0.9) s = 0;
|
||||
return m + s;
|
||||
}
|
||||
|
||||
var genevaAltThousands = func(input) {
|
||||
var m = math.floor(input / 10);
|
||||
var s = math.max(0, (math.mod(input, 1) - 0.8) * 5);
|
||||
if (math.mod(input / 10, 1) < 0.9) s = 0;
|
||||
return m + s;
|
||||
}
|
||||
|
||||
var genevaAltHundreds = func(input) {
|
||||
var m = math.floor(input);
|
||||
var s = math.max(0, (math.mod(input, 1) - 0.8) * 5);
|
||||
return m + s;
|
||||
}
|
||||
|
||||
var _fontSizeHDGTempVar = nil;
|
||||
|
||||
var fontSizeHDG = func(input) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 401 KiB |
|
@ -10,26 +10,26 @@ var tyresmoke_2 = aircraft.tyresmoke.new(2, 0, 0.8, 0);
|
|||
setlistener("/gear/gear[0]/position-norm", func {
|
||||
if (pts.Gear.position[0].getValue()){
|
||||
run_tyresmoke0 = 1;
|
||||
}else{
|
||||
} else {
|
||||
run_tyresmoke0 = 0;
|
||||
}
|
||||
},1,0);
|
||||
}, 1, 0);
|
||||
|
||||
setlistener("/gear/gear[1]/position-norm", func {
|
||||
if (pts.Gear.position[1].getValue()){
|
||||
run_tyresmoke1 = 1;
|
||||
}else{
|
||||
} else {
|
||||
run_tyresmoke1 = 0;
|
||||
}
|
||||
},1,0);
|
||||
}, 1, 0);
|
||||
|
||||
setlistener("/gear/gear[2]/position-norm", func {
|
||||
if (pts.Gear.position[2].getValue()){
|
||||
run_tyresmoke2 = 1;
|
||||
}else{
|
||||
} else {
|
||||
run_tyresmoke2 = 0;
|
||||
}
|
||||
},1,0);
|
||||
}, 1, 0);
|
||||
|
||||
#============================ Rain ===================================
|
||||
aircraft.rain.init();
|
||||
|
@ -44,7 +44,7 @@ var tyresmoke_and_rain = func {
|
|||
tyresmoke_2.update();
|
||||
aircraft.rain.update();
|
||||
settimer(tyresmoke_and_rain, 0);
|
||||
}# end tyresmoke_and_rain
|
||||
}
|
||||
|
||||
# == fire it up ===
|
||||
tyresmoke_and_rain();
|
|
@ -193,7 +193,7 @@ var ELEC = {
|
|||
me.Fail.tr2Fault.setBoolValue(0);
|
||||
},
|
||||
loop: func() {
|
||||
# Empty
|
||||
# Empty, required for Emesary
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ var outflowpos = nil;
|
|||
var targetvs = nil;
|
||||
var eng1_starter = nil;
|
||||
var eng2_starter = nil;
|
||||
|
||||
|
||||
# Main class
|
||||
var PNEU = {
|
||||
Fail: {
|
||||
|
@ -76,8 +76,8 @@ var PNEU = {
|
|||
packFlow: props.globals.getNode("/controls/pneumatics/switches/pack-flow"),
|
||||
ramAir: props.globals.getNode("/controls/pneumatics/switches/ram-air"),
|
||||
tempAft: props.globals.getNode("/controls/pneumatics/switches/temp-cabin-aft"),
|
||||
tempFwd: props.globals.getNode("/controls/pneumatics/switches/temp-cabin-fwd"),
|
||||
tempCockpit: props.globals.getNode("/controls/pneumatics/switches/temp-cockpit"),
|
||||
tempFwd: props.globals.getNode("/controls/pneumatics/switches/temp-cabin-fwd"),
|
||||
xbleed: props.globals.getNode("/controls/pneumatics/switches/x-bleed"),
|
||||
},
|
||||
Warnings: {
|
||||
|
@ -104,7 +104,22 @@ var PNEU = {
|
|||
},
|
||||
pressMode: props.globals.getNode("/systems/pressurization/mode", 1),
|
||||
init: func() {
|
||||
me.resetFail();
|
||||
me.resetFailures();
|
||||
me.Switch.apu.setBoolValue(0);
|
||||
me.Switch.bleed1.setBoolValue(1);
|
||||
me.Switch.bleed2.setBoolValue(1);
|
||||
me.Switch.blower.setBoolValue(0);
|
||||
me.Switch.cabinFans.setBoolValue(1);
|
||||
me.Switch.extract.setBoolValue(0);
|
||||
me.Switch.hotAir.setBoolValue(1);
|
||||
me.Switch.pack1.setBoolValue(0);
|
||||
me.Switch.pack2.setBoolValue(0);
|
||||
me.Switch.packFlow.setValue(1);
|
||||
me.Switch.ramAir.setBoolValue(0);
|
||||
me.Switch.tempAft.setValue(0.5);
|
||||
me.Switch.tempCockpit.setValue(0.5);
|
||||
me.Switch.tempFwd.setValue(0.5);
|
||||
me.Switch.xbleed.setValue(1);
|
||||
|
||||
# Legacy pressurization system
|
||||
setprop("/systems/pressurization/mode", "GN");
|
||||
|
@ -143,7 +158,7 @@ var PNEU = {
|
|||
setprop("/controls/oxygen/passenger-mask-deploy-man", 0);
|
||||
setprop("/controls/oxygen/passenger-mask-reset", 0); # this is the TMR RESET pb on the maintenance panel, needs 3D model
|
||||
},
|
||||
resetFail: func() {
|
||||
resetFailures: func() {
|
||||
me.Fail.apu.setBoolValue(0);
|
||||
me.Fail.bleed1.setBoolValue(0);
|
||||
me.Fail.bleed2.setBoolValue(0);
|
||||
|
|
|
@ -1 +1 @@
|
|||
51
|
||||
52
|
Loading…
Add table
Reference in a new issue