1
0
Fork 0

Merge branch 'dev' into pfdReworks

This commit is contained in:
Jonathan Redpath 2022-04-28 15:31:48 +01:00
commit e0821f57db
17 changed files with 1078 additions and 980 deletions

View file

@ -50,7 +50,7 @@ var canvas_IESI = {
obj.AI_horizon_rot = obj["AI_horizon"].createTransform();
obj._aiCenter = obj["AI_center"].getCenter();
obj._cachedInhg = nil;
obj._cachedInhg = -999;
obj._cachedMode = nil;
obj._canReset = 0;
obj._excessMotionInInit = 0;
@ -62,10 +62,10 @@ var canvas_IESI = {
obj._roll = 0;
obj.update_items = [
props.UpdateManager.FromHashValue("airspeed", nil, func(val) {
props.UpdateManager.FromHashValue("airspeed", 0.1, func(val) {
obj["ASI_scale"].setTranslation(0, math.clamp(val - 30, 0, 490) * 8.295);
}),
props.UpdateManager.FromHashList(["altitude","altitude_ind"], nil, func(val) {
props.UpdateManager.FromHashList(["altitude","altitude_ind"], 0.5, func(val) {
val.altitude = math.clamp(val.altitude, -2000, 50000);
if (val.altitude < 0) {
obj["negText"].show();
@ -103,7 +103,7 @@ var canvas_IESI = {
obj.altTens = num(right(sprintf("%02d", val.altitude), 2));
obj["ALT_tens"].setTranslation(0, obj.altTens * 3.16);
}),
props.UpdateManager.FromHashValue("showMach", nil, func(val) {
props.UpdateManager.FromHashValue("showMach", 1, func(val) {
if (val) {
obj["ASI_mach_decimal"].show();
obj["ASI_mach"].show();
@ -112,22 +112,18 @@ var canvas_IESI = {
obj["ASI_mach"].hide();
}
}),
props.UpdateManager.FromHashValue("mach", nil, func(val) {
if (val >= 0.999) {
obj["ASI_mach"].setText("99");
} else {
obj["ASI_mach"].setText(sprintf("%2.0f", val * 100));
}
props.UpdateManager.FromHashValue("mach", 0.001, func(val) {
obj["ASI_mach"].setText(sprintf("%2.0f", math.clamp(val * 100, 0, 99)));
}),
props.UpdateManager.FromHashValue("pitch", nil, func(val) {
props.UpdateManager.FromHashValue("pitch", 0.025, func(val) {
obj.AI_horizon_trans.setTranslation(0, val * 16.74);
}),
props.UpdateManager.FromHashValue("roll", nil, func(val) {
props.UpdateManager.FromHashValue("roll", 0.025, func(val) {
obj._roll = -val * D2R;
obj.AI_horizon_rot.setRotation(obj._roll, obj._aiCenter);
obj["AI_bank"].setRotation(obj._roll);
}),
props.UpdateManager.FromHashValue("skid", nil, func(val) {
props.UpdateManager.FromHashValue("skid", 0.1, func(val) {
if (abs(val) >= 84.99) {
obj["AI_slipskid"].hide();
} else {
@ -146,7 +142,7 @@ var canvas_IESI = {
me._powerResult = me.updatePower(notification);
if (me._powerResult == 0) { return; }
if (notification.qnh_inhg != me._cachedInhg or notification.altimeter_mode != me._cachedMode) {
if (math.abs(notification.qnh_inhg - me._cachedInhg) > 0.005 or notification.altimeter_mode != me._cachedMode) {
me._cachedInhg = notification.qnh_inhg;
me._cachedMode = notification.altimeter_mode;
me.updateQNH(notification);

View file

@ -26,46 +26,15 @@ var canvas_lowerECAMPageApu =
# init
obj["APUGenOff"].hide();
obj.apuADRState = 0;
obj.apuBleedPsi = 0.0;
obj.apuEgt = 0.0;
obj.apuOilLevelLow = 0;
obj.showApuParams = 0;
obj.update_items = [
props.UpdateManager.FromHashValue("apuFlap",1, func(val) {
if (val) {
obj["APUFlapOpen"].show();
} else {
obj["APUFlapOpen"].hide();
}
}),
props.UpdateManager.FromHashValue("apuNeedleRot",0.1, func(val) {
obj["APUN-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("apuEgtRot",0.1, func(val) {
obj["APUEGT-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("apuAvailable", nil, func(val) {
if (val) {
obj["APUAvail"].show();
} else {
obj["APUAvail"].hide();
}
}),
props.UpdateManager.FromHashList(["apuRpm","apuEgt","apuMaster","apuGenPB"], nil, func(val) {
if (val.apuRpm > 0.001) {
obj["APUN"].setColor(0.0509,0.7529,0.2941);
obj["APUN"].setText(sprintf("%s", math.round(val.apuRpm)));
obj["APUN-needle"].show();
obj["APUEGT"].setColor(0.0509,0.7529,0.2941);
obj["APUEGT"].setText(sprintf("%s", math.round(val.apuEgt, 5)));
obj["APUEGT-needle"].show();
} else {
obj["APUN"].setColor(0.7333,0.3803,0);
obj["APUN"].setText(sprintf("%s", "XX"));
obj["APUN-needle"].hide();
obj["APUEGT"].setColor(0.7333,0.3803,0);
obj["APUEGT"].setText(sprintf("%s", "XX"));
obj["APUEGT-needle"].hide();
}
if (val.apuMaster or val.apuRpm >= 94.9) {
props.UpdateManager.FromHashList(["apuAvailable","apuMaster","apuGenPB"], nil, func(val) {
if (val.apuMaster or val.apuAvailable) {
obj["APUGenbox"].show();
if (val.apuGenPB) {
obj["APUGenOff"].hide();
@ -104,70 +73,29 @@ var canvas_lowerECAMPageApu =
obj["APUfuelLO"].hide();
}
}),
props.UpdateManager.FromHashList(["apuRpm","apuOilLevel","gear0Wow"], nil, func(val) {
if (val.apuRpm >= 94.9 and val.gear0Wow and val.apuOilLevel < 3.69) {
obj["APU-low-oil"].show();
} else {
obj["APU-low-oil"].hide();
}
props.UpdateManager.FromHashValue("apuAdr", 0.5, func(val) {
obj.apuADRState = val;
}),
props.UpdateManager.FromHashList(["apuAdr","apuPsi","apuRpm"], nil, func(val) {
if (val.apuAdr and val.apuRpm > 0.001) {
obj["APUBleedPSI"].setColor(0.0509,0.7529,0.2941);
obj["APUBleedPSI"].setText(sprintf("%s", math.round(val.apuPsi)));
} else {
obj["APUBleedPSI"].setColor(0.7333,0.3803,0);
obj["APUBleedPSI"].setText(sprintf("%s", "XX"));
}
}),
props.UpdateManager.FromHashValue("apuLoad", 0.1, func(val) {
obj["APUGenLoad"].setText(sprintf("%s", math.round(val)));
if (val <= 100) {
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenHz"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuHertz", 1, func(val) {
if (val == 0) {
obj["APUGenHz"].setText(sprintf("XX"));
} else {
obj["APUGenHz"].setText(sprintf("%s", math.round(val)));
}
if (val >= 390 and val <= 410) {
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenHz"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuVolt", 0.1, func(val) {
obj["APUGenVolt"].setText(sprintf("%s", math.round(val)));
if (val >= 110 and val <= 120) {
obj["APUGenVolt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenVolt"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuGLC", nil, func(val) {
props.UpdateManager.FromHashValue("apuAvailable", nil, func(val) {
if (val) {
obj["APUGenOnline"].show();
obj["APUAvail"].show();
} else {
obj["APUGenOnline"].hide();
obj["APUAvail"].hide();
}
}),
props.UpdateManager.FromHashList(["apuBleedValvePos","apuBleedValveCmd"], nil, func(val) {
if (val.apuBleedValvePos == 1) {
props.UpdateManager.FromHashValue("apuBleedValvePos", 0.1, func(val) {
if (val >= 0.9) {
obj["APUBleedValve"].setRotation(90 * D2R);
obj["APUBleedOnline"].show();
} else {
obj["APUBleedValve"].setRotation(0);
obj["APUBleedOnline"].hide();
}
if (val.apuBleedValveCmd == val.apuBleedValvePos) {
}),
props.UpdateManager.FromHashValue("apuBleedValvePositionsMatch", 1, func(val) {
if (val) {
obj["APUBleedValveCrossBar"].setColor(0.0509,0.7529,0.2941);
obj["APUBleedValveCrossBar"].setColorFill(0.0509,0.7529,0.2941);
obj["APUBleedValve"].setColor(0.0509,0.7529,0.2941);
@ -177,9 +105,95 @@ var canvas_lowerECAMPageApu =
obj["APUBleedValve"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuEgt", 0.05, func(val) {
obj.apuEgt = sprintf("%s", math.clamp(math.round(val, 5), 0, 9995));
}),
props.UpdateManager.FromHashValue("apuEgtRot", 0.1, func(val) {
obj["APUEGT-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("apuFlap", 1, func(val) {
if (val) {
obj["APUFlapOpen"].show();
} else {
obj["APUFlapOpen"].hide();
}
}),
props.UpdateManager.FromHashValue("apuGLC", nil, func(val) {
if (val) {
obj["APUGenOnline"].show();
} else {
obj["APUGenOnline"].hide();
}
}),
props.UpdateManager.FromHashValue("apuHertz", 0.5, func(val) {
obj["APUGenHz"].setText(sprintf("%s", math.round(val)));
if (val >= 390 and val <= 410) {
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenHz"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuLoad", 0.5, func(val) {
obj["APUGenLoad"].setText(sprintf("%s", math.round(val)));
if (val <= 100) {
obj["APUGenLoad"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenLoad"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuNeedleRot", 0.1, func(val) {
obj["APUN-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("apuOilLevel", 0.05, func(val) {
if (val < 3.7) {
obj.apuOilLevelLow = 1;
} else {
obj.apuOilLevelLow = 0;
}
}),
props.UpdateManager.FromHashValue("apuPsi", 0.5, func(val) {
obj.apuBleedPsi = sprintf("%s", math.round(val));
}),
props.UpdateManager.FromHashValue("apuRpm", 0.5, func(val) {
if (val >= 0.5) {
if (val >= 107) {
obj["APUN"].setColor(1,0,0);
obj["APUN-needle"].setColor(1,0,0);
} elsif (val >= 102) {
obj["APUN"].setColor(0.7333,0.3803,0);
obj["APUN-needle"].setColor(0.7333,0.3803,0);
} else {
obj["APUN"].setColor(0.0509,0.7529,0.2941);
obj["APUN-needle"].setColor(0.0509,0.7529,0.2941);
}
obj["APUEGT"].setColor(0.0509,0.7529,0.2941);
obj["APUN-needle"].show();
obj["APUEGT-needle"].show();
obj["APUN"].setText(sprintf("%s", math.round(val)));
obj.showApuParams = 1;
} else {
obj["APUN"].setColor(0.7333,0.3803,0);
obj["APUEGT"].setColor(0.7333,0.3803,0);
obj["APUN-needle"].hide();
obj["APUEGT-needle"].hide();
obj["APUN"].setText("XX");
obj.showApuParams = 0;
}
}),
props.UpdateManager.FromHashValue("apuVolt", 0.5, func(val) {
obj["APUGenVolt"].setText(sprintf("%s", math.round(val)));
if (val >= 110 and val <= 120) {
obj["APUGenVolt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenVolt"].setColor(0.7333,0.3803,0);
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -189,26 +203,28 @@ var canvas_lowerECAMPageApu =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -219,11 +235,6 @@ var canvas_lowerECAMPageApu =
return ["APUN-needle","APUEGT-needle","APUN","APUEGT","APUAvail","APUFlapOpen","APUBleedValve","APUBleedOnline","APUBleedValveCrossBar","APUGenOnline","APUGenOff","APUGentext","APUGenLoad","APUGenbox","APUGenVolt","APUGenHz","APUBleedPSI","APUfuelLO","APU-low-oil","text3724","text3728","text3732"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -237,20 +248,25 @@ var canvas_lowerECAMPageApu =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();
@ -263,11 +279,37 @@ var canvas_lowerECAMPageApu =
return;
}
if ((notification.apuBleedValveCmd >= 0.95 and notification.apuBleedValvePos) or (notification.apuBleedValveCmd <= 0.05 and !notification.apuBleedValvePos)) {
notification.apuBleedValvePositionsMatch = 1;
} else {
notification.apuBleedValvePositionsMatch = 0;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
if (me.showApuParams) {
me["APUEGT"].setText(me.apuEgt);
} else {
me["APUEGT"].setText("XX");
}
if (notification.apuAvailable and notification.gear0Wow and me.apuOilLevelLow) {
me["APU-low-oil"].show();
} else {
me["APU-low-oil"].hide();
}
if (me.apuADRState and me.showApuParams) {
me["APUBleedPSI"].setColor(0.0509,0.7529,0.2941);
me["APUBleedPSI"].setText(me.apuBleedPsi);
} else {
me["APUBleedPSI"].setColor(0.7333,0.3803,0);
me["APUBleedPSI"].setText("XX");
}
me.updateBottom(notification);
},
updatePower: func() {

View file

@ -23,281 +23,50 @@ var canvas_lowerECAMPageBleed =
# init
obj.update_items = [
props.UpdateManager.FromHashList(["BleedCrossbleedCmd","BleedCrossbleed"], nil, func(val) {
if (val.BleedCrossbleedCmd != val.BleedCrossbleed) {
obj["BLEED-XFEED"].setColor(0.7333,0.3803,0);
obj["BLEED-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
} else {
obj["BLEED-XFEED"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-XFEED-Cross"].setColorFill(0.0509,0.7529,0.2941);
}
if (val.BleedCrossbleedCmd == val.BleedCrossbleed) {
if (val.BleedCrossbleedCmd) {
obj["BLEED-XFEED"].setRotation(0);
props.UpdateManager.FromHashList(["BleedCrossbleed","apuMaster","apuBleedValvePos"], 0.1, func(val) {
if (val.apuMaster) {
if (val.apuBleedValvePos >= 0.9) {
obj["BLEED-APU-CIRCLE"].setRotation(0);
obj["BLEED-APU-connectionTop"].show();
obj["BLEED-xbleedLeft"].show();
} else {
obj["BLEED-XFEED"].setRotation(90 * D2R);
obj["BLEED-APU-CIRCLE"].setRotation(90 * D2R);
obj["BLEED-APU-connectionTop"].hide();
if (val.BleedCrossbleed < 0.9) {
obj["BLEED-xbleedLeft"].hide();
} else {
obj["BLEED-xbleedLeft"].show();
}
}
} else {
obj["BLEED-XFEED"].setRotation(45 * D2R);
}
if (val.BleedCrossbleed == 1) {
obj["BLEED-xbleedCenter"].show();
obj["BLEED-xbleedRight"].show();
} else {
obj["BLEED-xbleedCenter"].hide();
obj["BLEED-xbleedRight"].hide();
}
}),
props.UpdateManager.FromHashList(["BleedHPValve1","BleedHPValve1Cmd"], nil, func(val) {
if (val.BleedHPValve1Cmd == 1) {
obj["BLEED-HP-Valve-1"].setRotation(90 * D2R);
obj["BLEED-HP-1-connection"].show();
} else {
obj["BLEED-HP-Valve-1"].setRotation(0);
obj["BLEED-HP-1-connection"].hide();
}
if (val.BleedHPValve1Cmd == val.BleedHPValve1) {
obj["BLEED-HP-Valve-1"].setColor(0.0509,0.7529,0.2941);
} else {
obj["BLEED-HP-Valve-1"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedHPValve2","BleedHPValve2Cmd"], nil, func(val) {
if (val.BleedHPValve2Cmd == 1) {
obj["BLEED-HP-Valve-2"].setRotation(90 * D2R);
obj["BLEED-HP-2-connection"].show();
} else {
obj["BLEED-HP-Valve-2"].setRotation(0);
obj["BLEED-HP-2-connection"].hide();
}
if (val.BleedHPValve2Cmd == val.BleedHPValve2) {
obj["BLEED-HP-Valve-2"].setColor(0.0509,0.7529,0.2941);
} else {
obj["BLEED-HP-Valve-2"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedPRVValve1Cmd","BleedPRVValve1"], nil, func(val) {
if (val.BleedPRVValve1 == 0) {
obj["BLEED-ENG-1"].setRotation(0);
} else {
obj["BLEED-ENG-1"].setRotation(90 * D2R);
}
if (val.BleedPRVValve1Cmd == val.BleedPRVValve1) {
obj["BLEED-ENG-1"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-ENG-1-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-ENG-1"].setColor(0.7333,0.3803,0);
obj["BLEED-ENG-1-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedPRVValve2Cmd","BleedPRVValve2"], nil, func(val) {
if (val.BleedPRVValve2 == 0) {
obj["BLEED-ENG-2"].setRotation(0);
} else {
obj["BLEED-ENG-2"].setRotation(90 * D2R);
}
if (val.BleedPRVValve2Cmd == val.BleedPRVValve2) {
obj["BLEED-ENG-2"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-ENG-2-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-ENG-2"].setColor(0.7333,0.3803,0);
obj["BLEED-ENG-2-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("gear1Wow", nil, func(val) {
if (val) {
obj["BLEED-GND"].show();
} else {
obj["BLEED-GND"].hide();
}
}),
props.UpdateManager.FromHashValue("IceWingSw", nil, func(val) {
if (val) {
obj["BLEED-Anti-Ice-Left"].show();
obj["BLEED-Anti-Ice-Right"].show();
} else {
obj["BLEED-Anti-Ice-Left"].hide();
obj["BLEED-Anti-Ice-Right"].hide();
}
}),
props.UpdateManager.FromHashValue("N2_actual_1", nil, func(val) {
if (val >= 59) {
obj["BLEED-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["BLEED-ENG-1-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("N2_actual_2", nil, func(val) {
if (val >= 59) {
obj["BLEED-ENG-2-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["BLEED-ENG-2-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedBMC1Working","BleedPreCoolerPSI1"], nil, func(val) {
if (val.BleedBMC1Working) {
if (val.BleedPreCoolerPSI1 >= 98) {
obj["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", 98));
if (val.BleedCrossbleed < 0.9) {
obj["BLEED-xbleedLeft"].hide();
} else {
obj["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(val.BleedPreCoolerPSI1,2)));
obj["BLEED-xbleedLeft"].show();
}
if (val.BleedPreCoolerPSI1 < 4 or val.BleedPreCoolerPSI1 > 57) {
obj["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["ApuBleedNotOn","apuMaster"], 1, func(val) {
if (val.apuMaster) {
obj["BLEED-APU-LINES"].show();
if (val.ApuBleedNotOn != 1) {
obj["BLEED-APU-CIRCLE"].setColor(0.0509,0.7529,0.2941);
} else {
obj["BLEED-Precooler-1-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-APU-CIRCLE"].setColor(0.7333,0.3803,0);
}
} else {
obj["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", "XX"));
obj["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
obj["BLEED-APU-LINES"].hide();
obj["BLEED-APU-connectionTop"].hide();
}
}),
props.UpdateManager.FromHashList(["BleedBMC2Working","BleedPreCoolerPSI2"], nil, func(val) {
if (val.BleedBMC2Working) {
if (val.BleedPreCoolerPSI2 >= 98) {
obj["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", 98));
} else {
obj["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(val.BleedPreCoolerPSI2,2)));
}
if (val.BleedPreCoolerPSI2 < 4 or val.BleedPreCoolerPSI2 > 57) {
obj["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-2-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", "XX"));
obj["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedBMC1Working","BleedPreCoolerTemp1","BleedPRVValve1Cmd","BleedPreCoolerOvht1"], nil, func(val) {
if (val.BleedBMC1Working) {
if (val.BleedPreCoolerTemp1 >= 510) {
obj["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", 510));
} else {
obj["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", math.round(val.BleedPreCoolerTemp1, 5)));
}
if (val.BleedPRVValve1Cmd and (val.BleedPreCoolerTemp1 < 150 or val.BleedPreCoolerOvht1)) {
obj["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-1-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", "XX"));
obj["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedBMC2Working","BleedPreCoolerTemp2","BleedPRVValve2Cmd","BleedPreCoolerOvht2"], nil, func(val) {
if (val.BleedBMC2Working) {
if (val.BleedPreCoolerTemp2 >= 510) {
obj["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", 510));
} else {
obj["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", math.round(val.BleedPreCoolerTemp2, 5)));
}
if (val.BleedPRVValve2Cmd and (val.BleedPreCoolerTemp2 < 150 or val.BleedPreCoolerOvht2)) {
obj["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-2-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", "XX"));
obj["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("Pack1Bypass", 1, func(val) {
obj["BLEED-Pack-1-Bypass-needle"].setRotation((val - 50) * D2R);
}),
props.UpdateManager.FromHashValue("Pack2Bypass", 1, func(val) {
obj["BLEED-Pack-2-Bypass-needle"].setRotation((val - 50) * D2R);
}),
props.UpdateManager.FromHashValue("Pack1OutTemp", 0.25, func(val) {
obj["BLEED-Pack-1-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 90) {
obj["BLEED-Pack-1-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-1-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack2OutTemp", 0.25, func(val) {
obj["BLEED-Pack-2-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 90) {
obj["BLEED-Pack-2-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-2-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack1OutletTemp", 0.25, func(val) {
obj["BLEED-Pack-1-Comp-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 230) {
obj["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack2OutletTemp", 0.25, func(val) {
obj["BLEED-Pack-2-Comp-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 230) {
obj["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack1FlowOutput", 0.5, func(val) {
obj["BLEED-Pack-1-Packflow-needle"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("Pack2FlowOutput", 0.5, func(val) {
obj["BLEED-Pack-2-Packflow-needle"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashList(["Pack1Switch","flowCtlValve1"], nil, func(val) {
if (val.flowCtlValve1 == 0) {
obj["BLEED-Pack-1-Packflow-needle"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Pack-1-Flow-Valve"].setRotation(90 * D2R);
} else {
obj["BLEED-Pack-1-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Pack-1-Flow-Valve"].setRotation(0);
}
if (val.flowCtlValve1 == val.Pack1Switch) {
obj["BLEED-Pack-1-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-1-Flow-Valve-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-Pack-1-Flow-Valve"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-1-Flow-Valve-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["Pack2Switch","flowCtlValve2"], nil, func(val) {
if (val.flowCtlValve2 == 0) {
obj["BLEED-Pack-2-Packflow-needle"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R);
} else {
obj["BLEED-Pack-2-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Pack-2-Flow-Valve"].setRotation(0);
}
if (val.flowCtlValve2 == val.Pack2Switch) {
obj["BLEED-Pack-2-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-2-Flow-Valve-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-2-Flow-Valve-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["flowCtlValve1","flowCtlValve2","RamAirValve","gear1Wow"], nil, func(val) {
if (val.RamAirValve == 0) {
props.UpdateManager.FromHashList(["flowCtlValve1","flowCtlValve2","RamAirValve","gear1Wow"], 0.1, func(val) {
if (val.RamAirValve <= 0.1) {
obj["BLEED-Ram-Air"].setRotation(90 * D2R);
obj["BLEED-Ram-Air"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air-Cross"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air-connection"].hide();
} elsif (val.RamAirValve) {
} elsif (val.RamAirValve >= 0.9) {
obj["BLEED-Ram-Air"].setRotation(0);
if (val.gear1Wow) {
obj["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
@ -323,8 +92,8 @@ var canvas_lowerECAMPageBleed =
obj["BLEED-Ram-Air-connection"].show();
}
if (val.flowCtlValve1 == 0 and val.flowCtlValve2 == 0) {
if (val.gear1Wow or val.RamAirValve != 1) {
if (val.flowCtlValve1 <= 0.1 and val.flowCtlValve2 <= 0.1) {
if (val.gear1Wow or val.RamAirValve < 0.9) {
obj["BLEED-cond-1"].setColor(0.7333,0.3803,0);
obj["BLEED-cond-2"].setColor(0.7333,0.3803,0);
obj["BLEED-cond-3"].setColor(0.7333,0.3803,0);
@ -338,57 +107,266 @@ var canvas_lowerECAMPageBleed =
obj["BLEED-cond-2"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-cond-3"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["BleedCrossbleedCmd","BleedCrossbleedPositionMatch"], nil, func(val) {
if (val.BleedCrossbleedPositionMatch) {
obj["BLEED-XFEED"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-XFEED-Cross"].setColorFill(0.0509,0.7529,0.2941);
if (val.BleedCrossbleedCmd) {
obj["BLEED-XFEED"].setRotation(0);
} else {
obj["BLEED-XFEED"].setRotation(90 * D2R);
}
} else {
obj["BLEED-XFEED"].setColor(0.7333,0.3803,0);
obj["BLEED-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
obj["BLEED-XFEED"].setRotation(45 * D2R);
}
}),
props.UpdateManager.FromHashValue("BleedCrossbleed", 0.1, func(val) {
if (val >= 0.9) {
obj["BLEED-xbleedCenter"].show();
obj["BLEED-xbleedRight"].show();
} else {
obj["BLEED-xbleedCenter"].hide();
obj["BLEED-xbleedRight"].hide();
}
}),
props.UpdateManager.FromHashValue("BleedHPValve1Cmd", 1, func(val) {
if (val) {
obj["BLEED-HP-Valve-1"].setRotation(90 * D2R);
obj["BLEED-HP-1-connection"].show();
} else {
obj["BLEED-HP-Valve-1"].setRotation(0);
obj["BLEED-HP-1-connection"].hide();
}
}),
props.UpdateManager.FromHashValue("BleedHPValve2Cmd", 1, func(val) {
if (val) {
obj["BLEED-HP-Valve-1"].setRotation(90 * D2R);
obj["BLEED-HP-1-connection"].show();
} else {
obj["BLEED-HP-Valve-1"].setRotation(0);
obj["BLEED-HP-1-connection"].hide();
}
}),
props.UpdateManager.FromHashValue("bleedHPValve1PositionMatch", 1, func(val) {
if (val) {
obj["BLEED-HP-Valve-1"].setColor(0.0509,0.7529,0.2941);
} else {
obj["BLEED-HP-Valve-1"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("bleedHPValve2PositionMatch", 1, func(val) {
if (val) {
obj["BLEED-HP-Valve-2"].setColor(0.0509,0.7529,0.2941);
} else {
obj["BLEED-HP-Valve-2"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("BleedPreCoolerPSI1", 1, func(val) {
obj.bleedPrecoolerInlet1Pressure = sprintf("%s", math.clamp(math.round(val, 2), -99, 98));
if (val.flowCtlValve1 == 0) {
if (val < 4 or val > 57) {
obj.bleedPrecoolerInlet1PressureOut = 1;
} else {
obj.bleedPrecoolerInlet1PressureOut = 0;
}
}),
props.UpdateManager.FromHashValue("BleedPreCoolerPSI2", 1, func(val) {
obj.bleedPrecoolerInlet2Pressure = sprintf("%s", math.clamp(math.round(val, 2), -99, 98));
if (val < 4 or val > 57) {
obj.bleedPrecoolerInlet2PressureOut = 1;
} else {
obj.bleedPrecoolerInlet2PressureOut = 0;
}
}),
props.UpdateManager.FromHashValue("BleedPreCoolerTemp1", 0.5, func(val) {
obj.bleedPrecoolerTemp1 = sprintf("%s", math.clamp(math.round(val, 5), -999, 510));
}),
props.UpdateManager.FromHashValue("BleedPreCoolerTemp2", 0.5, func(val) {
obj.bleedPrecoolerTemp2 = sprintf("%s", math.clamp(math.round(val, 5), -999, 510));
}),
props.UpdateManager.FromHashList(["BleedBMC1Working","bleedPrecoolerTemp1Lo","BleedPRVValve1Cmd","BleedPreCoolerOvht1"], nil, func(val) {
if (val.BleedBMC1Working) {
if (val.BleedPRVValve1Cmd and (val.bleedPrecoolerTemp1Lo or val.BleedPreCoolerOvht1)) {
obj["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-1-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedBMC2Working","bleedPrecoolerTemp2Lo","BleedPRVValve2Cmd","BleedPreCoolerOvht2"], nil, func(val) {
if (val.BleedBMC2Working) {
if (val.BleedPRVValve2Cmd and (val.bleedPrecoolerTemp2Lo or val.BleedPreCoolerOvht2)) {
obj["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-2-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("Pack1Bypass", 1, func(val) {
obj["BLEED-Pack-1-Bypass-needle"].setRotation((val - 50) * D2R);
}),
props.UpdateManager.FromHashValue("Pack2Bypass", 1, func(val) {
obj["BLEED-Pack-2-Bypass-needle"].setRotation((val - 50) * D2R);
}),
props.UpdateManager.FromHashValue("Pack1OutTemp", 0.5, func(val) {
obj["BLEED-Pack-1-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 90) {
obj["BLEED-Pack-1-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-1-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack2OutTemp", 0.5, func(val) {
obj["BLEED-Pack-2-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 90) {
obj["BLEED-Pack-2-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-2-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack1OutletTemp", 0.5, func(val) {
obj["BLEED-Pack-1-Comp-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 230) {
obj["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack2OutletTemp", 0.5, func(val) {
obj["BLEED-Pack-2-Comp-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 230) {
obj["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack1FlowOutput", 0.5, func(val) {
obj["BLEED-Pack-1-Packflow-needle"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("Pack2FlowOutput", 0.5, func(val) {
obj["BLEED-Pack-2-Packflow-needle"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("gear1Wow", 1, func(val) {
if (val) {
obj["BLEED-GND"].show();
} else {
obj["BLEED-GND"].hide();
}
}),
props.UpdateManager.FromHashValue("IceWingSw", 1, func(val) {
if (val) {
obj["BLEED-Anti-Ice-Left"].show();
obj["BLEED-Anti-Ice-Right"].show();
} else {
obj["BLEED-Anti-Ice-Left"].hide();
obj["BLEED-Anti-Ice-Right"].hide();
}
}),
props.UpdateManager.FromHashValue("N2_actual_1", 0.5, func(val) {
if (val >= 59) {
obj["BLEED-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["BLEED-ENG-1-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("N2_actual_2", 0.5, func(val) {
if (val >= 59) {
obj["BLEED-ENG-2-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["BLEED-ENG-2-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("flowCtlValve1", 0.1, func(val) {
if (val <= 0.1) {
obj["BLEED-Pack-1-Packflow-needle"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Pack-1-Flow-Valve"].setRotation(90 * D2R);
obj["BLEED-Pack-1-connection"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-1-connection"].setColorFill(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-1-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Pack-1-Flow-Valve"].setRotation(0);
obj["BLEED-Pack-1-connection"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-1-connection"].setColorFill(0.0509,0.7529,0.2941);
}
if (val.flowCtlValve2 == 0) {
}),
props.UpdateManager.FromHashValue("flowCtlValve2", 0.1, func(val) {
if (val <= 0.1) {
obj["BLEED-Pack-2-Packflow-needle"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R);
obj["BLEED-Pack-2-connection"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-2-connection"].setColorFill(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-2-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Pack-2-Flow-Valve"].setRotation(0);
obj["BLEED-Pack-2-connection"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-2-connection"].setColorFill(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["BleedCrossbleed","apuMaster","apuBleedValvePos","ApuBleedNotOn"], nil, func(val) {
if (val.apuMaster) {
obj["BLEED-APU-LINES"].show();
if (val.apuBleedValvePos == 1) {
obj["BLEED-APU-CIRCLE"].setRotation(0);
obj["BLEED-APU-connectionTop"].show();
obj["BLEED-xbleedLeft"].show();
} else {
obj["BLEED-APU-CIRCLE"].setRotation(90 * D2R);
obj["BLEED-APU-connectionTop"].hide();
if (val.BleedCrossbleed != 1) {
obj["BLEED-xbleedLeft"].hide();
} else {
obj["BLEED-xbleedLeft"].show();
}
}
if (val.ApuBleedNotOn != 1) {
obj["BLEED-APU-CIRCLE"].setColor(0.0509,0.7529,0.2941);
} else {
obj["BLEED-APU-CIRCLE"].setColor(0.7333,0.3803,0);
}
props.UpdateManager.FromHashValue("flowCtlValve1PositionMatch", 1, func(val) {
if (val) {
obj["BLEED-Pack-1-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-1-Flow-Valve-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
if (val.BleedCrossbleed != 1) {
obj["BLEED-xbleedLeft"].hide();
} else {
obj["BLEED-xbleedLeft"].show();
}
obj["BLEED-APU-LINES"].hide();
obj["BLEED-APU-connectionTop"].hide();
obj["BLEED-Pack-1-Flow-Valve"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-1-Flow-Valve-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("flowCtlValve2PositionMatch", 1, func(val) {
if (val) {
obj["BLEED-Pack-2-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-2-Flow-Valve-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-2-Flow-Valve-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("BleedPRVValve1", 0.1, func(val) {
if (val <= 0.1) {
obj["BLEED-ENG-1"].setRotation(0);
} else {
obj["BLEED-ENG-1"].setRotation(90 * D2R);
}
}),
props.UpdateManager.FromHashValue("BleedPRVValve2", 0.1, func(val) {
if (val <= 0.1) {
obj["BLEED-ENG-2"].setRotation(0);
} else {
obj["BLEED-ENG-2"].setRotation(90 * D2R);
}
}),
props.UpdateManager.FromHashValue("BleedPRVValve1PositionMatch", 1, func(val) {
if (val) {
obj["BLEED-ENG-1"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-ENG-1-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-ENG-1"].setColor(0.7333,0.3803,0);
obj["BLEED-ENG-1-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("BleedPRVValve2PositionMatch", 1, func(val) {
if (val) {
obj["BLEED-ENG-2"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-ENG-2-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-ENG-2"].setColor(0.7333,0.3803,0);
obj["BLEED-ENG-2-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -398,26 +376,28 @@ var canvas_lowerECAMPageBleed =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -436,11 +416,6 @@ var canvas_lowerECAMPageBleed =
"BLEED-Pack-1-Flow-Valve-Cross","BLEED-Pack-2-Flow-Valve-Cross","BLEED-Pack-1-connection","BLEED-Pack-2-connection"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -454,20 +429,25 @@ var canvas_lowerECAMPageBleed =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();
@ -480,11 +460,95 @@ var canvas_lowerECAMPageBleed =
return;
}
if ((notification.flowCtlValve1 >= 0.95 and notification.Pack1Switch) or (notification.flowCtlValve1 <= 0.05 and !notification.Pack1Switch)) {
notification.flowCtlValve1PositionMatch = 1;
} else {
notification.flowCtlValve1PositionMatch = 0;
}
if ((notification.flowCtlValve2 >= 0.95 and notification.Pack2Switch) or (notification.flowCtlValve2 <= 0.05 and !notification.Pack2Switch)) {
notification.flowCtlValve2PositionMatch = 1;
} else {
notification.flowCtlValve2PositionMatch = 0;
}
if ((notification.BleedPRVValve1 >= 0.95 and notification.BleedPRVValve1Cmd) or (notification.BleedPRVValve1 <= 0.05 and !notification.BleedPRVValve1Cmd)) {
notification.BleedPRVValve1PositionMatch = 1;
} else {
notification.BleedPRVValve1PositionMatch = 0;
}
if ((notification.BleedPRVValve2 >= 0.95 and notification.BleedPRVValve2Cmd) or (notification.BleedPRVValve2 <= 0.05 and !notification.BleedPRVValve2Cmd)) {
notification.BleedPRVValve2PositionMatch = 1;
} else {
notification.BleedPRVValve2PositionMatch = 0;
}
if ((notification.BleedHPValve1 >= 0.95 and notification.BleedHPValve1Cmd) or (notification.BleedHPValve1 <= 0.05 and !notification.BleedHPValve1Cmd)) {
notification.bleedHPValve1PositionMatch = 1;
} else {
notification.bleedHPValve1PositionMatch = 0;
}
if ((notification.BleedHPValve2 >= 0.95 and notification.BleedHPValve2Cmd) or (notification.BleedHPValve2 <= 0.05 and !notification.BleedHPValve2Cmd)) {
notification.bleedHPValve2PositionMatch = 1;
} else {
notification.bleedHPValve2PositionMatch = 0;
}
if ((notification.BleedCrossbleed >= 0.95 and notification.BleedCrossbleedCmd) or (notification.BleedCrossbleed <= 0.05 and !notification.BleedCrossbleedCmd)) {
notification.BleedCrossbleedPositionMatch = 1;
} else {
notification.BleedCrossbleedPositionMatch = 0;
}
if (notification.BleedPreCoolerTemp1 < 150) {
notification.bleedPrecoolerTemp1Lo = 1;
} else {
notification.bleedPrecoolerTemp1Lo = 0;
}
if (notification.BleedPreCoolerTemp2 < 150) {
notification.bleedPrecoolerTemp2Lo = 1;
} else {
notification.bleedPrecoolerTemp2Lo = 0;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
if (notification.BleedBMC1Working) {
me["BLEED-Precooler-1-Outlet-Temp"].setText(me.bleedPrecoolerTemp1);
me["BLEED-Precooler-1-Inlet-Press"].setText(me.bleedPrecoolerInlet1Pressure);
if (me.bleedPrecoolerInlet1PressureOut) {
me["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-1-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-Precooler-1-Outlet-Temp"].setText("XX");
me["BLEED-Precooler-1-Inlet-Press"].setText("XX");
me["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
}
if (notification.BleedBMC2Working) {
me["BLEED-Precooler-2-Outlet-Temp"].setText(me.bleedPrecoolerTemp2);
me["BLEED-Precooler-2-Inlet-Press"].setText(me.bleedPrecoolerInlet2Pressure);
if (me.bleedPrecoolerInlet2PressureOut) {
me["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-2-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-Precooler-2-Outlet-Temp"].setText("XX");
me["BLEED-Precooler-2-Inlet-Press"].setText("XX");
me["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
}
me.updateBottom(notification);
},
updatePower: func() {

View file

@ -55,28 +55,29 @@ var canvas_lowerECAMPageCond =
props.UpdateManager.FromHashValue("condTrimFwd", 0.01, func(val) {
obj["CONDTrimValveFWD"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashList(["condHotAirSwitch","condHotAirValve","condHotAirCmd"], nil, func(val) {
if (!val.condHotAirSwitch or (val.condHotAirCmd == 1 and val.condHotAirValve == 0)) {
props.UpdateManager.FromHashList(["condHotAirSwitch","condHotAirValve","condHotAirCmd"], 0.01, func(val) {
if (val.condHotAirValve <= 0.01) {
obj["CONDHotAirValve"].setRotation(90 * D2R);
obj["CONDHotAirValve"].setColor(0.7333,0.3803,0);
obj["CONDHotAirValveCross"].setColorFill(0.7333,0.3803,0);
} elsif (val.condHotAirCmd == 0 and val.condHotAirValve == 0) {
obj["CONDHotAirValve"].setRotation(90 * D2R);
obj["CONDHotAirValve"].setColor(0.0509,0.7529,0.2941);
obj["CONDHotAirValveCross"].setColorFill(0.0509,0.7529,0.2941);
} elsif (val.condHotAirCmd == 0 and val.condHotAirValve != 0) {
obj["CONDHotAirValve"].setRotation(0);
obj["CONDHotAirValve"].setColor(0.7333,0.3803,0);
obj["CONDHotAirValveCross"].setColorFill(0.7333,0.3803,0);
if (val.condHotAirCmd) {
obj["CONDHotAirValve"].setColor(0.7333,0.3803,0);
obj["CONDHotAirValveCross"].setColorFill(0.7333,0.3803,0);
} else {
obj["CONDHotAirValve"].setColor(0.0509,0.7529,0.2941);
obj["CONDHotAirValveCross"].setColorFill(0.0509,0.7529,0.2941);
}
} else {
obj["CONDHotAirValve"].setRotation(0);
obj["CONDHotAirValve"].setColor(0.0509,0.7529,0.2941);
obj["CONDHotAirValveCross"].setColorFill(0.0509,0.7529,0.2941);
if (val.condHotAirCmd) {
obj["CONDHotAirValve"].setColor(0.0509,0.7529,0.2941);
obj["CONDHotAirValveCross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["CONDHotAirValve"].setColor(0.7333,0.3803,0);
obj["CONDHotAirValveCross"].setColorFill(0.7333,0.3803,0);
}
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -86,27 +87,31 @@ var canvas_lowerECAMPageCond =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
obj.timer = maketimestamp();
obj.times = [];
return obj;
},
getKeysBottom: func() {
@ -117,11 +122,6 @@ var canvas_lowerECAMPageCond =
"CONDDuctTempAFT","CONDDuctTempFWD","CONDTempCKPT","CONDTempAFT","CONDTempFWD","CONDHotAirValveCross"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -135,22 +135,28 @@ var canvas_lowerECAMPageCond =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.timer.stamp();
me.updatePower();
if (me.test.getVisible() == 1) {
@ -167,6 +173,7 @@ var canvas_lowerECAMPageCond =
}
me.updateBottom(notification);
append(me.times, me.timer.elapsedUSec());
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {

View file

@ -77,13 +77,7 @@ var canvas_lowerECAMPageCruise =
}
}),
props.UpdateManager.FromHashValue("pressDelta", 0.05, func(val) {
if (val > 31.9) {
obj["deltaPSI"].setText(sprintf("%2.1f", 31.9));
} else if (val < -9.9) {
obj["deltaPSI"].setText(sprintf("%2.1f", -9.9));
} else {
obj["deltaPSI"].setText(sprintf("%2.1f", val));
}
obj["deltaPSI"].setText(sprintf("%2.1f", math.clamp(val, -9.9, 31.9)));
if (val < -0.4 or val > 8.5) {
obj["deltaPSI"].setColor(0.7333,0.3803,0);
@ -92,13 +86,7 @@ var canvas_lowerECAMPageCruise =
}
}),
props.UpdateManager.FromHashValue("pressVS", 25, func(val) {
if (val > 9950) {
obj["CABVS"].setText(sprintf("%4.0f", 9950));
} else if (val < -9950) {
obj["CABVS"].setText(sprintf("%4.0f", -9950));
} else {
obj["CABVS"].setText(sprintf("%-4.0f", math.round(val,50)));
}
obj["CABVS"].setText(sprintf("%-4.0f", math.clamp(math.round(val,50), -9950, 9950)));
if (val >= 25) {
obj["VS-Arrow-UP"].show();
@ -112,13 +100,7 @@ var canvas_lowerECAMPageCruise =
}
}),
props.UpdateManager.FromHashValue("pressAlt", 25, func(val) {
if (val > 32750) {
obj["CABALT"].setText(sprintf("%5.0f", 32750));
} else if (val < -9950) {
obj["CABALT"].setText(sprintf("%5.0f", -9950));
} else {
obj["CABALT"].setText(sprintf("%5.0f", math.round(val,50)));
}
obj["CABALT"].setText(sprintf("%5.0f", math.clamp(math.round(val,50), -9950, 32750)));
if (val > 9550) {
obj["CABALT"].setColor(1,0,0);
@ -137,7 +119,6 @@ var canvas_lowerECAMPageCruise =
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -147,26 +128,28 @@ var canvas_lowerECAMPageCruise =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -177,11 +160,6 @@ var canvas_lowerECAMPageCruise =
return["Oil1","Oil2","OilUnit","FUsed1","FUsed2","FUsed","VIB1N1","VIB1N2","VIB2N1","VIB2N2","deltaPSI","LDGELEV-AUTO","LDGELEV","CABVS","CABALT","VS-Arrow-UP","VS-Arrow-DN","CKPT-TEMP","FWD-TEMP","AFT-TEMP","Fused-weight-unit"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -195,20 +173,25 @@ var canvas_lowerECAMPageCruise =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();

View file

@ -49,8 +49,8 @@ var canvas_lowerECAMPageDoor =
obj.update_items = [
props.UpdateManager.FromHashValue("doorL1", nil, func(val) {
if (val > 0) {
props.UpdateManager.FromHashValue("doorL1", 0.1, func(val) {
if (val >= 0.1) {
obj["Cabin1Left"].show();
obj["Cabin1Left"].setColor(0.7333,0.3803,0);
obj["Cabin1Left"].setColorFill(0.7333,0.3803,0);
@ -65,8 +65,8 @@ var canvas_lowerECAMPageDoor =
obj["Cabin1LeftSlide"].show();
}
}),
props.UpdateManager.FromHashValue("doorL4", nil, func(val) {
if (val > 0) {
props.UpdateManager.FromHashValue("doorL4", 0.1, func(val) {
if (val >= 0.1) {
obj["Cabin4Left"].show();
obj["Cabin4Left"].setColor(0.7333,0.3803,0);
obj["Cabin4Left"].setColorFill(0.7333,0.3803,0);
@ -81,8 +81,8 @@ var canvas_lowerECAMPageDoor =
obj["Cabin4LeftSlide"].show();
}
}),
props.UpdateManager.FromHashValue("doorR1", nil, func(val) {
if (val > 0) {
props.UpdateManager.FromHashValue("doorR1", 0.1, func(val) {
if (val >= 0.1) {
obj["Cabin1Right"].show();
obj["Cabin1Right"].setColor(0.7333,0.3803,0);
obj["Cabin1Right"].setColorFill(0.7333,0.3803,0);
@ -97,8 +97,8 @@ var canvas_lowerECAMPageDoor =
obj["Cabin1RightSlide"].show();
}
}),
props.UpdateManager.FromHashValue("doorR4", nil, func(val) {
if (val > 0) {
props.UpdateManager.FromHashValue("doorR4", 0.1, func(val) {
if (val >= 0.1) {
obj["Cabin4Right"].show();
obj["Cabin4Right"].setColor(0.7333,0.3803,0);
obj["Cabin4Right"].setColorFill(0.7333,0.3803,0);
@ -113,8 +113,8 @@ var canvas_lowerECAMPageDoor =
obj["Cabin4RightSlide"].show();
}
}),
props.UpdateManager.FromHashValue("cargoAft", nil, func(val) {
if (val > 0) {
props.UpdateManager.FromHashValue("cargoAft", 0.1, func(val) {
if (val >= 0.1) {
obj["Cargo2Door"].setColor(0.7333,0.3803,0);
obj["Cargo2Door"].setColorFill(0.7333,0.3803,0);
obj["Cargo2Lbl"].show();
@ -126,8 +126,8 @@ var canvas_lowerECAMPageDoor =
obj["Cargo2Line"].hide();
}
}),
props.UpdateManager.FromHashValue("cargoBulk", nil, func(val) {
if (val > 0) {
props.UpdateManager.FromHashValue("cargoBulk", 0.1, func(val) {
if (val >= 0.1) {
obj["Bulk"].setColor(0.7333,0.3803,0);
obj["Bulk"].setColorFill(0.7333,0.3803,0);
obj["BulkLbl"].show();
@ -139,8 +139,8 @@ var canvas_lowerECAMPageDoor =
obj["BulkLine"].hide();
}
}),
props.UpdateManager.FromHashValue("cargoFwd", nil, func(val) {
if (val > 0) {
props.UpdateManager.FromHashValue("cargoFwd", 0.1, func(val) {
if (val >= 0.1) {
obj["Cargo1Door"].setColor(0.7333,0.3803,0);
obj["Cargo1Door"].setColorFill(0.7333,0.3803,0);
obj["Cargo1Lbl"].show();
@ -152,7 +152,7 @@ var canvas_lowerECAMPageDoor =
obj["Cargo1Line"].hide();
}
}),
props.UpdateManager.FromHashList(["oxyPB","oxyBottlePress","oxyBottleRegulLoPr"], nil, func(val) {
props.UpdateManager.FromHashList(["oxyPB","oxyBottlePress","oxyBottleRegulLoPr"], 1, func(val) {
if (val.oxyPB) {
if (val.oxyBottlePress < 300 or val.oxyBottleRegulLoPr) {
obj["DOOROXY-OxyIndicator"].setColor(0.7333,0.3803,0);
@ -170,14 +170,8 @@ var canvas_lowerECAMPageDoor =
}
obj["DOOROXY-PR"].setText(sprintf("%4.0f", math.round(val.oxyBottlePress, 10)));
}),
props.UpdateManager.FromHashValue("pressVS", nil, func(val) {
if (val > 9950) {
obj["DOOR-VS"].setText(sprintf("%+4.0f", 9950));
} else if (val < -9950) {
obj["DOOR-VS"].setText(sprintf("%+4.0f", -9950));
} else {
obj["DOOR-VS"].setText(sprintf("%+4.0f", math.round(val,50)));
}
props.UpdateManager.FromHashValue("pressVS", 25, func(val) {
obj["DOOR-VS"].setText(sprintf("%+4.0f", math.clamp(math.round(val,50), -9950, 9950)));
if (abs(val) > 2000) {
obj["DOOR-VS"].setColor(0.7333,0.3803,0);
@ -185,14 +179,14 @@ var canvas_lowerECAMPageDoor =
obj["DOOR-VS"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("FWCPhase", nil, func(val) {
props.UpdateManager.FromHashValue("FWCPhase", 1, func(val) {
if (val >= 5 and val <= 7) {
obj["DOOR-VS-Container"].show();
} else {
obj["DOOR-VS-Container"].hide();
}
}),
props.UpdateManager.FromHashValue("oxyBottleRegulLoPr", nil, func(val) {
props.UpdateManager.FromHashValue("oxyBottleRegulLoPr", 1, func(val) {
if (val) {
obj["DOOROXY-REGUL-LO-PR"].show();
} else {
@ -201,7 +195,6 @@ var canvas_lowerECAMPageDoor =
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -211,26 +204,28 @@ var canvas_lowerECAMPageDoor =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -244,11 +239,6 @@ var canvas_lowerECAMPageDoor =
"Cabin4LeftSlide","Cabin4Right","Cabin4RightLbl","Cabin4RightLine","Cabin4RightSlide","DOOROXY-REGUL-LO-PR","DOOROXY-PR","DOOROXY-OxyIndicator","DOOR-VS","DOOR-VS-Container"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -262,20 +252,25 @@ var canvas_lowerECAMPageDoor =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();

View file

@ -30,21 +30,17 @@ var canvas_lowerECAMPageElec =
obj["IDG1-RISE-Value"].hide();
obj.update_items = [
props.UpdateManager.FromHashValue("apuLoad", 0.1, func(val) {
props.UpdateManager.FromHashValue("apuLoad", 0.5, func(val) {
obj["APUGenLoad"].setText(sprintf("%s", math.round(val)));
if (val < 110) {
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
if (val <= 100) {
obj["APUGenLoad"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenHz"].setColor(0.7333,0.3803,0);
obj["APUGenLoad"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuHertz", 0.5, func(val) {
if (val == 0) {
obj["APUGenHz"].setText(sprintf("XX"));
} else {
obj["APUGenHz"].setText(sprintf("%s", math.round(val)));
}
obj["APUGenHz"].setText(sprintf("%s", math.round(val)));
if (val >= 390 and val <= 410) {
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
@ -52,7 +48,7 @@ var canvas_lowerECAMPageElec =
obj["APUGenHz"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuVolt", 0.1, func(val) {
props.UpdateManager.FromHashValue("apuVolt", 0.5, func(val) {
obj["APUGenVolt"].setText(sprintf("%s", math.round(val)));
if (val >= 110 and val <= 120) {
@ -61,7 +57,7 @@ var canvas_lowerECAMPageElec =
obj["APUGenVolt"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["apuMaster","apuVolt","apuLoad","apuHertz","apuGLC"], nil, func(val) {
props.UpdateManager.FromHashList(["apuMaster","apuVolt","apuLoad","apuHertz","apuGLC"], 0.5, func(val) {
if (val.apuMaster == 0) {
obj["APUGentext"].setColor(0.8078,0.8039,0.8078);
} else {
@ -74,7 +70,7 @@ var canvas_lowerECAMPageElec =
}
}
}),
props.UpdateManager.FromHashList(["apuMaster","apuGenPB"], nil, func(val) {
props.UpdateManager.FromHashList(["apuMaster","apuGenPB"], 1, func(val) {
if (val.apuMaster == 0) {
obj["APU-content"].hide();
obj["APUGEN-off"].hide();
@ -90,7 +86,7 @@ var canvas_lowerECAMPageElec =
}
}
}),
props.UpdateManager.FromHashValue("elecIDG1Disc", nil, func(val) {
props.UpdateManager.FromHashValue("elecIDG1Disc", 1, func(val) {
if (!val) {
obj["IDG1-DISC"].show();
obj["ELEC-IDG-1-label"].setColor(0.7333,0.3803,0);
@ -99,7 +95,7 @@ var canvas_lowerECAMPageElec =
obj["ELEC-IDG-1-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("elecIDG2Disc", nil, func(val) {
props.UpdateManager.FromHashValue("elecIDG2Disc", 1, func(val) {
if (!val) {
obj["IDG2-DISC"].show();
obj["ELEC-IDG-2-label"].setColor(0.7333,0.3803,0);
@ -108,7 +104,7 @@ var canvas_lowerECAMPageElec =
obj["ELEC-IDG-2-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("engine1Running", nil, func(val) {
props.UpdateManager.FromHashValue("engine1Running", 1, func(val) {
if (val == 0) {
obj["ELEC-IDG-1-num-label"].setColor(0.7333,0.3803,0);
obj["GEN1-num-label"].setColor(0.7333,0.3803,0);
@ -117,7 +113,7 @@ var canvas_lowerECAMPageElec =
obj["GEN1-num-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("engine2Running", nil, func(val) {
props.UpdateManager.FromHashValue("engine2Running", 1, func(val) {
if (val == 0) {
obj["ELEC-IDG-2-num-label"].setColor(0.7333,0.3803,0);
obj["GEN2-num-label"].setColor(0.7333,0.3803,0);
@ -165,14 +161,14 @@ var canvas_lowerECAMPageElec =
obj["ELEC-Line-AC2-TR2"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["elecGen1GLC","elecAcTie1"], nil, func(val) {
props.UpdateManager.FromHashList(["elecGen1GLC","elecAcTie1"], 1, func(val) {
if (val.elecGen1GLC or val.elecAcTie1) {
obj["AC1-in"].show();
} else {
obj["AC1-in"].hide();
}
}),
props.UpdateManager.FromHashList(["elecGen2GLC","elecAcTie2"], nil, func(val) {
props.UpdateManager.FromHashList(["elecGen2GLC","elecAcTie2"], 1, func(val) {
if (val.elecGen2GLC or val.elecAcTie2) {
obj["AC2-in"].show();
} else {
@ -193,14 +189,14 @@ var canvas_lowerECAMPageElec =
obj["ACESS-SHED"].show();
}
}),
props.UpdateManager.FromHashValue("ElecGalleyShed", nil, func(val) {
props.UpdateManager.FromHashValue("ElecGalleyShed", 1, func(val) {
if (val) {
obj["GalleyShed"].show();
} else {
obj["GalleyShed"].hide();
}
}),
props.UpdateManager.FromHashList(["elecBat1Switch","elecBat2Switch","dcBat"], nil, func(val) {
props.UpdateManager.FromHashList(["elecBat1Switch","elecBat2Switch","dcBat"], 0.5, func(val) {
if (val.elecBat1Switch or val.elecBat2Switch) {
obj["ELEC-DCBAT-label"].setText("DC BAT");
if (val.dcBat > 25) {
@ -213,7 +209,55 @@ var canvas_lowerECAMPageElec =
obj["ELEC-DCBAT-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["elecBat1Switch","elecBat1Volt","elecBat1Amp","elecBat1Direction","elecBat1Fault"], nil, func(val) {
props.UpdateManager.FromHashValue("elecBat1Volt", 0.5, func(val) {
obj["Bat1Volt"].setText(sprintf("%2.0f", val));
if (val >= 25 and val <= 31) {
obj["Bat1Volt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Bat1Volt"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["elecBat1Amp","elecBat1Direction"], 0.5, func(val) {
obj["Bat1Ampere"].setText(sprintf("%2.0f", val.elecBat1Amp));
if (val.elecBat1Amp > 5 and val.elecBat1Direction == 1) {
obj["Bat1Ampere"].setColor(0.7333,0.3803,0);
} else {
obj["Bat1Ampere"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["elecBat1Volt","elecBat1Amp","elecBat1Fault"], 0.5, func(val) {
if (val.elecBat1Fault or val.elecBat1Volt < 25 or val.elecBat1Volt > 31 or val.elecBat1Amp > 5) {
obj["BAT1-label"].setColor(0.7333,0.3803,0);
} else {
obj["BAT1-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("elecBat2Volt", 0.5, func(val) {
obj["Bat2Volt"].setText(sprintf("%2.0f", val));
if (val >= 25 and val <= 31) {
obj["Bat2Volt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Bat2Volt"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["elecBat2Amp","elecBat2Direction"], 0.5, func(val) {
obj["Bat2Ampere"].setText(sprintf("%2.0f", val.elecBat2Amp));
if (val.elecBat2Amp > 5 and val.elecBat2Direction == 1) {
obj["Bat2Ampere"].setColor(0.7333,0.3803,0);
} else {
obj["Bat2Ampere"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["elecBat2Volt","elecBat2Amp","elecBat2Fault"], 0.5, func(val) {
if (val.elecBat2Fault or val.elecBat2Volt < 25 or val.elecBat2Volt > 31 or val.elecBat2Amp > 5) {
obj["BAT2-label"].setColor(0.7333,0.3803,0);
} else {
obj["BAT2-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashList(["elecBat1Switch","elecBat1Direction"], 1, func(val) {
if (val.elecBat1Switch == 0) {
obj["BAT1-OFF"].show();
obj["BAT1-content"].hide();
@ -222,22 +266,7 @@ var canvas_lowerECAMPageElec =
} else {
obj["BAT1-OFF"].hide();
obj["BAT1-content"].show();
obj["Bat1Ampere"].setText(sprintf("%2.0f", val.elecBat1Amp));
obj["Bat1Volt"].setText(sprintf("%2.0f", val.elecBat1Volt));
if (val.elecBat1Volt >= 24.95 and val.elecBat1Volt <= 31.05) {
obj["Bat1Volt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Bat1Volt"].setColor(0.7333,0.3803,0);
}
if (val.elecBat1Amp > 5 and val.elecBat1Direction == 1) {
obj["Bat1Ampere"].setColor(0.7333,0.3803,0);
} else {
obj["Bat1Ampere"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecBat1Direction == 0) {
obj["BAT1-discharge"].hide();
obj["BAT1-charge"].hide();
@ -251,14 +280,8 @@ var canvas_lowerECAMPageElec =
}
}
}
if (val.elecBat1Fault or val.elecBat1Volt < 25 or val.elecBat1Volt > 31 or val.elecBat1Amp > 5) {
obj["BAT1-label"].setColor(0.7333,0.3803,0);
} else {
obj["BAT1-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashList(["elecBat2Switch","elecBat2Volt","elecBat2Amp","elecBat2Direction","elecBat2Fault"], nil, func(val) {
props.UpdateManager.FromHashList(["elecBat2Switch","elecBat2Direction"], 1, func(val) {
if (val.elecBat2Switch == 0) {
obj["BAT2-OFF"].show();
obj["BAT2-content"].hide();
@ -267,22 +290,7 @@ var canvas_lowerECAMPageElec =
} else {
obj["BAT2-OFF"].hide();
obj["BAT2-content"].show();
obj["Bat2Ampere"].setText(sprintf("%2.0f", val.elecBat2Amp));
obj["Bat2Volt"].setText(sprintf("%2.0f", val.elecBat2Volt));
if (val.elecBat2Volt >= 24.95 and val.elecBat2Volt <= 31.05) {
obj["Bat2Volt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Bat2Volt"].setColor(0.7333,0.3803,0);
}
if (val.elecBat2Amp > 5 and val.elecBat2Direction == 1) {
obj["Bat2Ampere"].setColor(0.7333,0.3803,0);
} else {
obj["Bat2Ampere"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecBat2Direction == 0) {
obj["BAT2-discharge"].hide();
obj["BAT2-charge"].hide();
@ -296,14 +304,8 @@ var canvas_lowerECAMPageElec =
}
}
}
if (val.elecBat2Fault or val.elecBat2Volt < 25 or val.elecBat2Volt > 31 or val.elecBat2Amp > 5) {
obj["BAT2-label"].setColor(0.7333,0.3803,0);
} else {
obj["BAT2-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashList(["elecTR1Amp","elecTR1Volt"], nil, func(val) {
props.UpdateManager.FromHashList(["elecTR1Amp","elecTR1Volt"], 0.5, func(val) {
obj["TR1Volt"].setText(sprintf("%s", math.round(val.elecTR1Volt)));
obj["TR1Ampere"].setText(sprintf("%s", math.round(val.elecTR1Amp)));
@ -325,7 +327,7 @@ var canvas_lowerECAMPageElec =
obj["TR1Ampere"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["elecTR2Amp","elecTR2Volt"], nil, func(val) {
props.UpdateManager.FromHashList(["elecTR2Amp","elecTR2Volt"], 0.5, func(val) {
obj["TR2Volt"].setText(sprintf("%s", math.round(val.elecTR2Volt)));
obj["TR2Ampere"].setText(sprintf("%s", math.round(val.elecTR2Amp)));
@ -347,41 +349,37 @@ var canvas_lowerECAMPageElec =
obj["TR2Ampere"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["elecExtHertz","elecExtVolt","elecGroundCart"], nil, func(val) {
if (val.elecGroundCart == 0) {
obj["EXTPWR-group"].hide();
props.UpdateManager.FromHashValue("elecExtHertz", 0.5, func(val) {
if (val > 410 or val < 390) {
obj["ExtHz"].setColor(0.7333,0.3803,0);
} else {
obj["EXTPWR-group"].show();
obj["ExtVolt"].setText(sprintf("%s", math.round(val.elecExtVolt)));
obj["ExtHz"].setText(sprintf("%s", math.round(val.elecExtHertz)));
if (val.elecExtHertz > 410 or val.elecExtHertz < 390 or val.elecExtVolt > 120 or val.elecExtVolt < 110) {
obj["EXTPWR-label"].setColor(0.7333,0.3803,0);
} else {
obj["EXTPWR-label"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecExtHertz > 410 or val.elecExtHertz < 390) {
obj["ExtHz"].setColor(0.7333,0.3803,0);
} else {
obj["ExtHz"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecExtVolt > 120 or val.elecExtVolt < 110) {
obj["ExtVolt"].setColor(0.7333,0.3803,0);
} else {
obj["ExtVolt"].setColor(0.0509,0.7529,0.2941);
}
obj["ExtHz"].setColor(0.0509,0.7529,0.2941);
}
obj.extPwrHertz = sprintf("%s", math.round(val));
}),
props.UpdateManager.FromHashValue("elecExtVolt", 0.5, func(val) {
if (val > 120 or val < 110) {
obj["ExtVolt"].setColor(0.7333,0.3803,0);
} else {
obj["ExtVolt"].setColor(0.0509,0.7529,0.2941);
}
obj.extPwrVoltage = sprintf("%s", math.round(val));
}),
props.UpdateManager.FromHashList(["elecExtHertz","elecExtVolt"], 0.5, func(val) {
if (val.elecExtHertz > 410 or val.elecExtHertz < 390 or val.elecExtVolt > 120 or val.elecExtVolt < 110) {
obj["EXTPWR-label"].setColor(0.7333,0.3803,0);
} else {
obj["EXTPWR-label"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("elecDCTie1", nil, func(val) {
props.UpdateManager.FromHashValue("elecDCTie1", 1, func(val) {
if (val) {
obj["ELEC-Line-DC1-DCESS_DCBAT"].show();
} else {
obj["ELEC-Line-DC1-DCESS_DCBAT"].hide();
}
}),
props.UpdateManager.FromHashValue("elecDCTie2", nil, func(val) {
props.UpdateManager.FromHashValue("elecDCTie2", 1, func(val) {
if (val) {
obj["ELEC-Line-DC2-DCESS_DCBAT"].show();
obj["ELEC-Line-DC2-DCBAT"].show();
@ -390,28 +388,28 @@ var canvas_lowerECAMPageElec =
obj["ELEC-Line-DC2-DCBAT"].hide();
}
}),
props.UpdateManager.FromHashValue("elecDCTie1", nil, func(val) {
props.UpdateManager.FromHashValue("elecDCTie1", 1, func(val) {
if (val) {
obj["ELEC-Line-DC1-DCBAT"].show();
} else {
obj["ELEC-Line-DC1-DCBAT"].hide();
}
}),
props.UpdateManager.FromHashValue("elecDcEssFeedBat", nil, func(val) {
props.UpdateManager.FromHashValue("elecDcEssFeedBat", 1, func(val) {
if (val) {
obj["ELEC-Line-DC1-DCESS"].show();
} else {
obj["ELEC-Line-DC1-DCESS"].hide();
}
}),
props.UpdateManager.FromHashValue("elecTrEssContact", nil, func(val) {
props.UpdateManager.FromHashValue("elecTrEssContact", 1, func(val) {
if (val) {
obj["ELEC-Line-ESSTR-DCESS"].show();
} else {
obj["ELEC-Line-ESSTR-DCESS"].hide();
}
}),
props.UpdateManager.FromHashList(["elecEmerGenVoltsRelay","elec15XE1"], nil, func(val) {
props.UpdateManager.FromHashList(["elecEmerGenVoltsRelay","elec15XE1"], 1, func(val) {
if (val.elecEmerGenVoltsRelay) {
if (val.elec15XE1) {
obj["EMERGEN-out"].show();
@ -424,7 +422,7 @@ var canvas_lowerECAMPageElec =
obj["ELEC-Line-Emergen-ESSTR"].hide();
}
}),
props.UpdateManager.FromHashList(["elecTREssAmp","elecTREssVolt","elecTrEssContact"], nil, func(val) {
props.UpdateManager.FromHashList(["elecTREssAmp","elecTREssVolt","elecTrEssContact"], 0.5, func(val) {
if (val.elecTrEssContact) {
obj["ESSTR-group"].show();
obj["ESSTR-Volt"].setText(sprintf("%s", math.round(val.elecTREssVolt)));
@ -451,8 +449,8 @@ var canvas_lowerECAMPageElec =
obj["ESSTR-group"].hide();
}
}),
props.UpdateManager.FromHashList(["elecEmerGenHertz","elecEmerGenVolts","elecEmerGenVoltsRelay"], nil, func(val) {
if (val.elecEmerGenVolts == 0) {
props.UpdateManager.FromHashList(["elecEmerGenHertz","elecEmerGenVolts","elecEmerGenVoltsRelay"], 0.5, func(val) {
if (val.elecEmerGenVolts < 110) {
obj["EMERGEN-group"].hide();
obj["ELEC-Line-Emergen-ESSTR"].hide();
obj["ELEC-Line-Emergen-ESSTR-off"].show();
@ -485,7 +483,7 @@ var canvas_lowerECAMPageElec =
}
}
}),
props.UpdateManager.FromHashList(["elecGen1Switch","elecGen1Hertz","elecGen1Volt","engine1Running","elecGen1Relay"], nil, func(val) {
props.UpdateManager.FromHashList(["elecGen1Switch","elecGen1Hertz","elecGen1Volt","engine1Running","elecGen1Relay"], 0.5, func(val) {
if (val.elecGen1Switch == 0) {
obj["GEN1-content"].hide();
obj["GEN1-off"].show();
@ -524,7 +522,7 @@ var canvas_lowerECAMPageElec =
}
}
}),
props.UpdateManager.FromHashList(["elecGen2Switch","elecGen2Hertz","elecGen2Volt","engine1Running","elecGen2Relay"], nil, func(val) {
props.UpdateManager.FromHashList(["elecGen2Switch","elecGen2Hertz","elecGen2Volt","engine1Running","elecGen2Relay"], 0.5, func(val) {
if (val.elecGen2Switch == 0) {
obj["GEN2-content"].hide();
obj["GEN2-off"].show();
@ -563,21 +561,21 @@ var canvas_lowerECAMPageElec =
}
}
}),
props.UpdateManager.FromHashList(["elecTR1Contact","elecAC1"], nil, func(val) {
if (val.elecTR1Contact) {
props.UpdateManager.FromHashValue("elecTR1Contact", 1, func(val) {
if (val) {
obj["ELEC-Line-TR1-DC1"].show();
} else {
obj["ELEC-Line-TR1-DC1"].hide();
}
}),
props.UpdateManager.FromHashList(["elecTR2Contact","elecAC2"], nil, func(val) {
if (val.elecTR2Contact) {
props.UpdateManager.FromHashValue("elecTR2Contact", 1, func(val) {
if (val) {
obj["ELEC-Line-TR2-DC2"].show();
} else {
obj["ELEC-Line-TR2-DC2"].hide();
}
}),
props.UpdateManager.FromHashList(["elecAcEssFeed1","elecAcEssFeed2","elecAC1","elecAC2"], nil, func(val) {
props.UpdateManager.FromHashList(["elecAcEssFeed1","elecAcEssFeed2","elecAC1","elecAC2"], 0.5, func(val) {
if (val.elecAcEssFeed1) {
if (val.elecAC1 >= 110) {
obj["ELEC-Line-AC1-ACESS"].show();
@ -597,49 +595,49 @@ var canvas_lowerECAMPageElec =
obj["ELEC-Line-AC2-ACESS"].hide();
}
}),
props.UpdateManager.FromHashList(["elecGen1Volt","elecGen1GLC"], nil, func(val) {
props.UpdateManager.FromHashList(["elecGen1Volt","elecGen1GLC"], 0.5, func(val) {
if (val.elecGen1Volt >= 110 and val.elecGen1GLC) {
obj["ELEC-Line-GEN1-AC1"].show();
} else {
obj["ELEC-Line-GEN1-AC1"].hide();
}
}),
props.UpdateManager.FromHashList(["elecGen2Volt","elecGen2GLC"], nil, func(val) {
props.UpdateManager.FromHashList(["elecGen2Volt","elecGen2GLC"], 0.5, func(val) {
if (val.elecGen2Volt >= 110 and val.elecGen2GLC) {
obj["ELEC-Line-GEN2-AC2"].show();
} else {
obj["ELEC-Line-GEN2-AC2"].hide();
}
}),
props.UpdateManager.FromHashValue("elecAcTie1", nil, func(val) {
props.UpdateManager.FromHashValue("elecAcTie1", 1, func(val) {
if (val) {
obj["ELEC-Line-APU-AC1"].show();
} else {
obj["ELEC-Line-APU-AC1"].hide();
}
}),
props.UpdateManager.FromHashValue("elecAcTie2", nil, func(val) {
props.UpdateManager.FromHashValue("elecAcTie2", 1, func(val) {
if (val) {
obj["ELEC-Line-EXT-AC2"].show();
} else {
obj["ELEC-Line-EXT-AC2"].hide();
}
}),
props.UpdateManager.FromHashList(["elecAcTie1","elecAcTie2","apuGLC","elecExtEPC"], nil, func(val) {
props.UpdateManager.FromHashList(["elecAcTie1","elecAcTie2","apuGLC","elecExtEPC"], 1, func(val) {
if ((val.apuGLC and val.elecAcTie2) or (val.elecExtEPC and val.elecAcTie1) or (val.elecAcTie1 and val.elecAcTie2)) {
obj["ELEC-Line-APU-EXT"].show();
} else {
obj["ELEC-Line-APU-EXT"].hide();
}
}),
props.UpdateManager.FromHashValue("elecExtEPC", nil, func(val) {
props.UpdateManager.FromHashValue("elecExtEPC", 1, func(val) {
if (val) {
obj["EXT-out"].show();
} else {
obj["EXT-out"].hide();
}
}),
props.UpdateManager.FromHashValue("apuGLC", nil, func(val) {
props.UpdateManager.FromHashValue("apuGLC", 1, func(val) {
if (val) {
obj["APU-out"].show();
} else {
@ -653,22 +651,21 @@ var canvas_lowerECAMPageElec =
obj["ELEC-Line-ACESS-TRESS"].hide();
}
}),
props.UpdateManager.FromHashValue("elec15XE2", nil, func(val) {
props.UpdateManager.FromHashValue("elec15XE2", 1, func(val) {
if (val) {
obj["STATINV-group"].show();
} else {
obj["STATINV-group"].hide();
}
}),
props.UpdateManager.FromHashValue("statInvVolts", 0.1, func(val) {
obj["StatVolt"].setText(sprintf("%s",math.round(val)));
props.UpdateManager.FromHashValue("statInvVolts", 0.5, func(val) {
obj["StatVolt"].setText(sprintf("%s", math.round(val)));
}),
props.UpdateManager.FromHashValue("statInvHertz", 0.5, func(val) {
obj["StatHz"].setText(sprintf("%s",math.round(val)));
obj["StatHz"].setText(sprintf("%s", math.round(val)));
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -678,26 +675,28 @@ var canvas_lowerECAMPageElec =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -714,11 +713,6 @@ var canvas_lowerECAMPageElec =
"ELEC-ACESS-SHED-label","ELEC-DCBAT-label","ELEC-DCESS-label","ELEC-DC2-label","ELEC-DC1-label","ELEC-AC1-label","ELEC-AC2-label","ELEC-ACESS-label","ELEC-Line-ESSTR-DCESS-off","ELEC-Line-Emergen-ESSTR-off","STATINV-group","StatVolt","StatHz"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -732,20 +726,25 @@ var canvas_lowerECAMPageElec =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();
@ -763,6 +762,14 @@ var canvas_lowerECAMPageElec =
update_item.update(notification);
}
if (notification.elecGroundCart == 0) {
me["EXTPWR-group"].hide();
} else {
me["EXTPWR-group"].show();
me["ExtVolt"].setText(me.extPwrVoltage);
me["ExtHz"].setText(me.extPwrHertz);
}
me.updateBottom(notification);
},
updatePower: func() {

View file

@ -130,7 +130,6 @@ var canvas_lowerECAMPageEng =
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -140,26 +139,28 @@ var canvas_lowerECAMPageEng =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -172,11 +173,6 @@ var canvas_lowerECAMPageEng =
"VIB-N1-1","VIB-N1-2","VIB-N2-1","VIB-N2-2"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -190,20 +186,25 @@ var canvas_lowerECAMPageEng =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();

View file

@ -23,7 +23,7 @@ var canvas_lowerECAMPageFctl =
# init
obj.update_items = [
props.UpdateManager.FromHashList(["green","elac1","elac2","sec2"], nil, func(val) {
props.UpdateManager.FromHashList(["green","elac1","elac2","sec2"], 1, func(val) {
if (val.green >= 1450) {
if (val.elac2 or val.sec2) {
obj["elevLgreen"].setColor(0.0509,0.7529,0.2941);
@ -53,7 +53,7 @@ var canvas_lowerECAMPageFctl =
obj["spdbrkgreen"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["yellow","elac2","sec2"], nil, func(val) {
props.UpdateManager.FromHashList(["yellow","elac2","sec2"], 1, func(val) {
if (val.yellow >= 1450) {
if (val.elac2 or val.sec2) {
obj["elevRyellow"].setColor(0.0509,0.7529,0.2941);
@ -70,7 +70,7 @@ var canvas_lowerECAMPageFctl =
obj["spdbrkyellow"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["blue","elac1","elac2","sec1"], nil, func(val) {
props.UpdateManager.FromHashList(["blue","elac1","elac2","sec1"], 1, func(val) {
if (val.blue >= 1500) {
if (val.elac1) {
obj["ailLblue"].setColor(0.0509,0.7529,0.2941);
@ -106,7 +106,7 @@ var canvas_lowerECAMPageFctl =
props.UpdateManager.FromHashValue("fctlAilR", 0.001, func(val) {
obj["ailR"].setTranslation(0, val * -100);
}),
props.UpdateManager.FromHashList(["blue","green","elac1","elac2"], nil, func(val) {
props.UpdateManager.FromHashList(["blue","green","elac1","elac2"], 1, func(val) {
if ((val.blue < 1500 or !val.elac1) and (val.green < 1500 or !val.elac2)) {
obj["ailL"].setColor(0.7333,0.3803,0);
} else {
@ -124,7 +124,7 @@ var canvas_lowerECAMPageFctl =
props.UpdateManager.FromHashValue("fctlElevR", 0.001, func(val) {
obj["elevR"].setTranslation(0, val * 100);
}),
props.UpdateManager.FromHashList(["blue","green","yellow","elac1","elac2","sec1","sec2"], nil, func(val) {
props.UpdateManager.FromHashList(["blue","green","yellow","elac1","elac2","sec1","sec2"], 1, func(val) {
if ((val.blue < 1500 or (!val.elac1 and !val.sec1)) and (val.green < 1500 or (!val.elac2 and !val.sec2))) {
obj["elevL"].setColor(0.7333,0.3803,0);
} else {
@ -149,7 +149,7 @@ var canvas_lowerECAMPageFctl =
obj["PTupdn"].hide();
}
}),
props.UpdateManager.FromHashValue("elac1", nil, func(val) {
props.UpdateManager.FromHashValue("elac1", 1, func(val) {
if (val) {
obj["elac1"].setColor(0.0509,0.7529,0.2941);
obj["path4249"].setColor(0.0509,0.7529,0.2941);
@ -158,7 +158,7 @@ var canvas_lowerECAMPageFctl =
obj["path4249"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("elac2", nil, func(val) {
props.UpdateManager.FromHashValue("elac2", 1, func(val) {
if (val) {
obj["elac2"].setColor(0.0509,0.7529,0.2941);
obj["path4249-3"].setColor(0.0509,0.7529,0.2941);
@ -167,7 +167,7 @@ var canvas_lowerECAMPageFctl =
obj["path4249-3"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("sec1", nil, func(val) {
props.UpdateManager.FromHashValue("sec1", 1, func(val) {
if (val) {
obj["sec1"].setColor(0.0509,0.7529,0.2941);
obj["path4249-3-6-7"].setColor(0.0509,0.7529,0.2941);
@ -176,7 +176,7 @@ var canvas_lowerECAMPageFctl =
obj["path4249-3-6-7"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("sec2", nil, func(val) {
props.UpdateManager.FromHashValue("sec2", 1, func(val) {
if (val) {
obj["sec2"].setColor(0.0509,0.7529,0.2941);
obj["path4249-3-6-7-5"].setColor(0.0509,0.7529,0.2941);
@ -185,7 +185,7 @@ var canvas_lowerECAMPageFctl =
obj["path4249-3-6-7-5"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("sec3", nil, func(val) {
props.UpdateManager.FromHashValue("sec3", 1, func(val) {
if (val) {
obj["sec3"].setColor(0.0509,0.7529,0.2941);
obj["path4249-3-6"].setColor(0.0509,0.7529,0.2941);
@ -217,7 +217,7 @@ var canvas_lowerECAMPageFctl =
props.UpdateManager.FromHashValue("fctlRudderTrim", 0.01, func(val) {
obj["rudderTrimInd"].setRotation(val * -0.024);
}),
props.UpdateManager.FromHashValue("fctlTHSJam", nil, func(val) {
props.UpdateManager.FromHashValue("fctlTHSJam", 1, func(val) {
if (val) {
obj["pitchTrimStatus"].setColor(0.7333,0.3803,0);
} else {
@ -314,7 +314,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler5Rex"].show();
}
}),
props.UpdateManager.FromHashList(["spoilerL1Failure","spoilerL1","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL1Failure","spoilerL1","green"], 1, func(val) {
if (val.spoilerL1Failure or val.green < 1500) {
obj["spoiler1Lex"].setColor(0.7333,0.3803,0);
obj["spoiler1Lrt"].setColor(0.7333,0.3803,0);
@ -329,7 +329,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler1Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL2Failure","spoilerL2","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL2Failure","spoilerL2","yellow"], 1, func(val) {
if (val.spoilerL2Failure or val.yellow < 1500) {
obj["spoiler2Lex"].setColor(0.7333,0.3803,0);
obj["spoiler2Lrt"].setColor(0.7333,0.3803,0);
@ -344,7 +344,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler2Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL3Failure","spoilerL3","blue"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL3Failure","spoilerL3","blue"], 1, func(val) {
if (val.spoilerL3Failure or val.blue < 1500) {
obj["spoiler3Lex"].setColor(0.7333,0.3803,0);
obj["spoiler3Lrt"].setColor(0.7333,0.3803,0);
@ -359,7 +359,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler3Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL4Failure","spoilerL4","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL4Failure","spoilerL4","yellow"], 1, func(val) {
if (val.spoilerL4Failure or val.yellow < 1500) {
obj["spoiler4Lex"].setColor(0.7333,0.3803,0);
obj["spoiler4Lrt"].setColor(0.7333,0.3803,0);
@ -374,7 +374,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler4Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL5Failure","spoilerL5","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL5Failure","spoilerL5","green"], 1, func(val) {
if (val.spoilerL5Failure or val.green < 1500) {
obj["spoiler5Lex"].setColor(0.7333,0.3803,0);
obj["spoiler5Lrt"].setColor(0.7333,0.3803,0);
@ -389,7 +389,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler5Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR1Failure","spoilerR1","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR1Failure","spoilerR1","green"], 1, func(val) {
if (val.spoilerR1Failure or val.green < 1500) {
obj["spoiler1Rex"].setColor(0.7333,0.3803,0);
obj["spoiler1Rrt"].setColor(0.7333,0.3803,0);
@ -404,7 +404,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler1Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR2Failure","spoilerR2","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR2Failure","spoilerR2","yellow"], 1, func(val) {
if (val.spoilerR2Failure or val.yellow < 1500) {
obj["spoiler2Rex"].setColor(0.7333,0.3803,0);
obj["spoiler2Rrt"].setColor(0.7333,0.3803,0);
@ -419,7 +419,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler2Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR3Failure","spoilerR3","blue"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR3Failure","spoilerR3","blue"], 1, func(val) {
if (val.spoilerR3Failure or val.blue < 1500) {
obj["spoiler3Rex"].setColor(0.7333,0.3803,0);
obj["spoiler3Rrt"].setColor(0.7333,0.3803,0);
@ -434,7 +434,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler3Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR4Failure","spoilerR4","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR4Failure","spoilerR4","yellow"], 1, func(val) {
if (val.spoilerR4Failure or val.yellow < 1500) {
obj["spoiler4Rex"].setColor(0.7333,0.3803,0);
obj["spoiler4Rrt"].setColor(0.7333,0.3803,0);
@ -449,7 +449,7 @@ var canvas_lowerECAMPageFctl =
obj["spoiler4Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR5Failure","spoilerR5","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR5Failure","spoilerR5","green"], 1, func(val) {
if (val.spoilerR5Failure or val.green < 1500) {
obj["spoiler5Rex"].setColor(0.7333,0.3803,0);
obj["spoiler5Rrt"].setColor(0.7333,0.3803,0);
@ -466,7 +466,6 @@ var canvas_lowerECAMPageFctl =
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -476,26 +475,28 @@ var canvas_lowerECAMPageFctl =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -509,11 +510,6 @@ var canvas_lowerECAMPageFctl =
"spoiler5Lf","ailLscale","ailRscale","path4249","path4249-3","path4249-3-6-7","path4249-3-6-7-5","path4249-3-6","pitchTrimStatus","rudderTrimInd"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -527,20 +523,25 @@ var canvas_lowerECAMPageFctl =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();

View file

@ -99,6 +99,13 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("fuelCenterQty", 0.25, func(val) {
if (obj.units) {
obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("fuelLeftInnerQty", 0.25, func(val) {
if (obj.units) {
obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
@ -113,17 +120,11 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashList(["fadecPower1","fadecPower2","fadecPowerStart","fuelflow_1","fuelflow_2"], nil, func(val) {
if (val.fadecPower1 or val.fadecPower2 or val.fadecPowerStart) {
obj["FUEL-Flow-per-min"].setColor(0.0509,0.7529,0.2941);
if (obj.units) {
obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round(((val.fuelflow_1 + val.fuelflow_2) * LBS2KGS) / 60, 10)));
} else {
obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round((val.fuelflow_1 + val.fuelflow_2) / 60, 10)));
}
props.UpdateManager.FromHashList(["fuelflow_1","fuelflow_2"], nil, func(val) {
if (obj.units) {
obj.fuelFlowPerMinute = sprintf("%s", math.round(((val.fuelflow_1 + val.fuelflow_2) * LBS2KGS) / 60, 10));
} else {
obj["FUEL-Flow-per-min"].setColor(0.7333,0.3803,0);
obj["FUEL-Flow-per-min"].setText("XX");
obj.fuelFlowPerMinute = sprintf("%s", math.round((val.fuelflow_1 + val.fuelflow_2) / 60, 10));
}
}),
props.UpdateManager.FromHashValue("N1_actual_1", 0.05, func(val) {
@ -144,7 +145,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-ENG-2-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("fuelLeftSwitch1", nil, func(val) {
props.UpdateManager.FromHashValue("fuelLeftSwitch1", 1, func(val) {
if (val) {
obj["FUEL-Pump-Left-1-Open"].show();
obj["FUEL-Pump-Left-1-Closed"].hide();
@ -163,7 +164,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Pump-Left-1-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelLeftSwitch2", nil, func(val) {
props.UpdateManager.FromHashValue("fuelLeftSwitch2", 1, func(val) {
if (val) {
obj["FUEL-Pump-Left-2-Open"].show();
obj["FUEL-Pump-Left-2-Closed"].hide();
@ -182,7 +183,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Pump-Left-2-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelCenterSwitch1", nil, func(val) {
props.UpdateManager.FromHashValue("fuelCenterSwitch1", 1, func(val) {
if (val) {
obj["FUEL-Pump-Center-1-Open"].show();
obj["FUEL-Pump-Center-1-Closed"].hide();
@ -201,7 +202,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Pump-Center-1-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelCenterSwitch2", nil, func(val) {
props.UpdateManager.FromHashValue("fuelCenterSwitch2", 1, func(val) {
if (val) {
obj["FUEL-Pump-Center-2-Open"].show();
obj["FUEL-Pump-Center-2-Closed"].hide();
@ -220,7 +221,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Pump-Center-2-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelRightSwitch1", nil, func(val) {
props.UpdateManager.FromHashValue("fuelRightSwitch1", 1, func(val) {
if (val) {
obj["FUEL-Pump-Right-1-Open"].show();
obj["FUEL-Pump-Right-1-Closed"].hide();
@ -239,7 +240,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Pump-Right-1-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelRightSwitch2", nil, func(val) {
props.UpdateManager.FromHashValue("fuelRightSwitch2", 1, func(val) {
if (val) {
obj["FUEL-Pump-Right-2-Open"].show();
obj["FUEL-Pump-Right-2-Closed"].hide();
@ -258,15 +259,15 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Pump-Right-2-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["fuelCenterSwitch1","fuelCenterSwitch2"], nil, func(val) {
props.UpdateManager.FromHashList(["fuelCenterSwitch1","fuelCenterSwitch2"], 1, func(val) {
if (!val.fuelCenterSwitch1 and !val.fuelCenterSwitch2) {
obj["FUEL-Center-blocked"].show();
} else {
obj["FUEL-Center-blocked"].hide();
}
}),
props.UpdateManager.FromHashList(["fuelCrossfeedValve","fuelCrossfeedSwitch"], nil, func(val) {
if (val.fuelCrossfeedValve == 1) {
props.UpdateManager.FromHashList(["fuelCrossfeedValve","fuelCrossfeedSwitch"], 0.1, func(val) {
if (val.fuelCrossfeedValve >= 0.9) {
obj["FUEL-XFEED"].setRotation(0);
obj["FUEL-XFEED-pipes"].show();
if (val.fuelCrossfeedSwitch) {
@ -278,7 +279,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-XFEED"].setColorFill(0.7333,0.3803,0);
obj["FUEL-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
}
} elsif (val.fuelCrossfeedValve == 0) {
} elsif (val.fuelCrossfeedValve <= 0.1) {
obj["FUEL-XFEED"].setRotation(90 * D2R);
obj["FUEL-XFEED-pipes"].hide();
if (!val.fuelCrossfeedSwitch) {
@ -298,9 +299,9 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["fuelEngine1Valve","engineCutoff1"], nil, func(val) {
if (val.fuelEngine1Valve) {
if (val.fuelEngine1Valve == 1) {
props.UpdateManager.FromHashList(["fuelEngine1Valve","engineCutoff1"], 0.1, func(val) {
if (val.fuelEngine1Valve > 0.1) {
if (val.fuelEngine1Valve >= 0.9) {
obj["FUEL-ENG-Master-1"].setRotation(0);
} else {
obj["FUEL-ENG-Master-1"].setRotation(45 * D2R);
@ -327,9 +328,9 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-ENG-1-pipe"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["fuelEngine2Valve","engineCutoff2"], nil, func(val) {
if (val.fuelEngine2Valve) {
if (val.fuelEngine2Valve == 1) {
props.UpdateManager.FromHashList(["fuelEngine2Valve","engineCutoff2"], 0.1, func(val) {
if (val.fuelEngine2Valve > 0.1) {
if (val.fuelEngine1Valve >= 0.9) {
obj["FUEL-ENG-Master-2"].setRotation(0);
} else {
obj["FUEL-ENG-Master-2"].setRotation(45 * D2R);
@ -356,11 +357,11 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-ENG-2-pipe"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelTransferValve1", nil, func(val) {
if (val == 0) {
props.UpdateManager.FromHashValue("fuelTransferValve1", 0.1, func(val) {
if (val <= 0.1) {
obj["FUEL-Left-Transfer"].hide();
} else {
if (val == 1) {
if (val >= 0.9) {
obj["FUEL-Left-Transfer"].setColor(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Left-Transfer"].setColor(0.7333,0.3803,0);
@ -368,11 +369,11 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Left-Transfer"].show();
}
}),
props.UpdateManager.FromHashValue("fuelTransferValve2", nil, func(val) {
if (val == 0) {
props.UpdateManager.FromHashValue("fuelTransferValve2", 0.1, func(val) {
if (val <= 0.1) {
obj["FUEL-Right-Transfer"].hide();
} else {
if (val == 1) {
if (val >= 0.9) {
obj["FUEL-Right-Transfer"].setColor(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Right-Transfer"].setColor(0.7333,0.3803,0);
@ -387,7 +388,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-On-Board"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("fuelTempLeftOuter", 0.25, func(val) {
props.UpdateManager.FromHashValue("fuelTempLeftOuter", 0.5, func(val) {
obj["FUEL-Left-Outer-temp"].setText(sprintf("%s", math.round(val)));
if (val > 55 or val < -40) {
obj["FUEL-Left-Outer-temp"].setColor(0.7333,0.3803,0);
@ -395,7 +396,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Left-Outer-temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("fuelTempLeftInner", 0.25, func(val) {
props.UpdateManager.FromHashValue("fuelTempLeftInner", 0.5, func(val) {
obj["FUEL-Left-Inner-temp"].setText(sprintf("%s", math.round(val)));
if (val > 45 or val < -40) {
obj["FUEL-Left-Inner-temp"].setColor(0.7333,0.3803,0);
@ -403,7 +404,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Left-Inner-temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("fuelTempRightInner", 0.25, func(val) {
props.UpdateManager.FromHashValue("fuelTempRightInner", 0.5, func(val) {
obj["FUEL-Right-Inner-temp"].setText(sprintf("%s", math.round(val)));
if (val > 45 or val < -40) {
obj["FUEL-Right-Inner-temp"].setColor(0.7333,0.3803,0);
@ -411,7 +412,7 @@ var canvas_lowerECAMPageFuel =
obj["FUEL-Right-Inner-temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("fuelTempRightOuter", 0.25, func(val) {
props.UpdateManager.FromHashValue("fuelTempRightOuter", 0.5, func(val) {
obj["FUEL-Right-Outer-temp"].setText(sprintf("%s", math.round(val)));
if (val > 55 or val < -40) {
obj["FUEL-Right-Outer-temp"].setColor(0.7333,0.3803,0);
@ -450,7 +451,6 @@ var canvas_lowerECAMPageFuel =
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -460,26 +460,28 @@ var canvas_lowerECAMPageFuel =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -495,11 +497,6 @@ var canvas_lowerECAMPageFuel =
"Fused-weight-unit","FFlow-weight-unit","FOB-weight-unit","FUEL-ENG-Master-1-Cross","FUEL-ENG-Master-2-Cross","FUEL-Pump-Left-1-Square","FUEL-Pump-Left-2-Square","FUEL-Pump-Center-1-Square","FUEL-Pump-Center-2-Square","FUEL-Pump-Right-1-Square","FUEL-Pump-Right-2-Square"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -513,20 +510,25 @@ var canvas_lowerECAMPageFuel =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();
@ -544,6 +546,14 @@ var canvas_lowerECAMPageFuel =
update_item.update(notification);
}
if (notification.fadecPower1 or notification.fadecPower2 or notification.fadecPowerStart) {
me["FUEL-Flow-per-min"].setColor(0.0509,0.7529,0.2941);
me["FUEL-Flow-per-min"].setText(me.fuelFlowPerMinute);
} else {
me["FUEL-Flow-per-min"].setColor(0.7333,0.3803,0);
me["FUEL-Flow-per-min"].setText("XX");
}
me.updateBottom(notification);
},
updatePower: func() {

View file

@ -63,7 +63,7 @@ var canvas_lowerECAMPageHyd =
obj["Blue-label"].setColor(0.7333,0.3803,0);
}
} else {
obj["Press-Blue"].setText(sprintf("%s", "XX"));
obj["Press-Blue"].setText("XX");
obj["Blue-Line"].setColor(0.7333,0.3803,0);
obj["Blue-Line"].setColorFill(0.7333,0.3803,0);
obj["Blue-Line-Top"].setColorFill(0.7333,0.3803,0);
@ -101,7 +101,7 @@ var canvas_lowerECAMPageHyd =
obj["Yellow-label"].setColor(0.7333,0.3803,0);
}
} else {
obj["Press-Yellow"].setText(sprintf("%s", "XX"));
obj["Press-Yellow"].setText("XX");
obj["Yellow-Line"].setColor(0.7333,0.3803,0);
obj["Yellow-Line"].setColorFill(0.7333,0.3803,0);
obj["Yellow-Line-Top"].setColorFill(0.7333,0.3803,0);
@ -140,7 +140,7 @@ var canvas_lowerECAMPageHyd =
obj["Green-label"].setColor(0.7333,0.3803,0);
}
} else {
obj["Press-Green"].setText(sprintf("%s", "XX"));
obj["Press-Green"].setText("XX");
obj["Green-Line"].setColor(0.7333,0.3803,0);
obj["Green-Line"].setColorFill(0.7333,0.3803,0);
obj["Green-Line-Top"].setColorFill(0.7333,0.3803,0);
@ -165,63 +165,63 @@ var canvas_lowerECAMPageHyd =
obj["Pump-Yellow-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("hydBlueResvLoPrs", nil, func(val) {
props.UpdateManager.FromHashValue("hydBlueResvLoPrs", 1, func(val) {
if (val) {
obj["LO-AIR-PRESS-Blue"].show();
} else {
obj["LO-AIR-PRESS-Blue"].hide();
}
}),
props.UpdateManager.FromHashValue("hydGreenResvLoPrs", nil, func(val) {
props.UpdateManager.FromHashValue("hydGreenResvLoPrs", 1, func(val) {
if (val) {
obj["LO-AIR-PRESS-Green"].show();
} else {
obj["LO-AIR-PRESS-Green"].hide();
}
}),
props.UpdateManager.FromHashValue("hydYellowResvLoPrs", nil, func(val) {
props.UpdateManager.FromHashValue("hydYellowResvLoPrs", 1, func(val) {
if (val) {
obj["LO-AIR-PRESS-Yellow"].show();
} else {
obj["LO-AIR-PRESS-Yellow"].hide();
}
}),
props.UpdateManager.FromHashValue("hydYellowElecPumpOvht", nil, func(val) {
props.UpdateManager.FromHashValue("hydYellowElecPumpOvht", 1, func(val) {
if (val) {
obj["ELEC-OVHT-Yellow"].show();
} else {
obj["ELEC-OVHT-Yellow"].hide();
}
}),
props.UpdateManager.FromHashValue("hydBlueElecPumpOvht", nil, func(val) {
props.UpdateManager.FromHashValue("hydBlueElecPumpOvht", 1, func(val) {
if (val) {
obj["ELEC-OVHT-Blue"].show();
} else {
obj["ELEC-OVHT-Blue"].hide();
}
}),
props.UpdateManager.FromHashValue("hydBlueResvOvht", nil, func(val) {
props.UpdateManager.FromHashValue("hydBlueResvOvht", 1, func(val) {
if (val) {
obj["OVHT-Blue"].show();
} else {
obj["OVHT-Blue"].hide();
}
}),
props.UpdateManager.FromHashValue("hydGreenResvOvht", nil, func(val) {
props.UpdateManager.FromHashValue("hydGreenResvOvht", 1, func(val) {
if (val) {
obj["OVHT-Green"].show();
} else {
obj["OVHT-Green"].hide();
}
}),
props.UpdateManager.FromHashValue("hydYellowResvOvht", nil, func(val) {
props.UpdateManager.FromHashValue("hydYellowResvOvht", 1, func(val) {
if (val) {
obj["OVHT-Yellow"].show();
} else {
obj["OVHT-Yellow"].hide();
}
}),
props.UpdateManager.FromHashValue("hydRATPosition", nil, func(val) {
props.UpdateManager.FromHashValue("hydRATPosition", 1, func(val) {
if (val) {
obj["RAT-stowed"].hide();
obj["RAT-not-stowed"].show();
@ -230,8 +230,8 @@ var canvas_lowerECAMPageHyd =
obj["RAT-not-stowed"].hide();
}
}),
props.UpdateManager.FromHashValue("hydGreenFireValve", nil, func(val) {
if (val != 0) {
props.UpdateManager.FromHashValue("hydGreenFireValve", 0.1, func(val) {
if (val >= 0.1) {
obj["Fire-Valve-Green"].setColor(0.7333,0.3803,0);
obj["Fire-Valve-Green-Cross"].setColorFill(0.7333,0.3803,0);
obj["Fire-Valve-Green"].setRotation(90 * D2R);
@ -241,8 +241,8 @@ var canvas_lowerECAMPageHyd =
obj["Fire-Valve-Green"].setRotation(0);
}
}),
props.UpdateManager.FromHashValue("hydYellowFireValve", nil, func(val) {
if (val != 0) {
props.UpdateManager.FromHashValue("hydYellowFireValve", 0.1, func(val) {
if (val >= 0.1) {
obj["Fire-Valve-Yellow"].setColor(0.7333,0.3803,0);
obj["Fire-Valve-Yellow-Cross"].setColorFill(0.7333,0.3803,0);
obj["Fire-Valve-Yellow"].setRotation(90 * D2R);
@ -266,7 +266,7 @@ var canvas_lowerECAMPageHyd =
obj["ELEC-Yellow-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["yellow","hydYellowElecPumpSwitch"], nil, func(val) {
props.UpdateManager.FromHashList(["yellow","hydYellowElecPumpSwitch"], 1, func(val) {
if (!val.hydYellowElecPumpSwitch) {
obj["ELEC-Yellow-on"].hide();
obj["ELEC-Yellow-off"].show();
@ -280,7 +280,7 @@ var canvas_lowerECAMPageHyd =
}
}
}),
props.UpdateManager.FromHashList(["blue","hydBlueElecPumpSwitch"], nil, func(val) {
props.UpdateManager.FromHashList(["blue","hydBlueElecPumpSwitch"], 1, func(val) {
if (val.hydBlueElecPumpSwitch) {
obj["Pump-Blue-off"].hide();
if (val.blue > 1450) {
@ -302,7 +302,7 @@ var canvas_lowerECAMPageHyd =
obj["Pump-Blue"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["yellow","hydYellowEDPPumpSwitch"], nil, func(val) {
props.UpdateManager.FromHashList(["yellow","hydYellowEDPPumpSwitch"], 1, func(val) {
if (val.hydYellowEDPPumpSwitch) {
obj["Pump-Yellow-off"].hide();
if (val.yellow > 1450) {
@ -324,7 +324,7 @@ var canvas_lowerECAMPageHyd =
obj["Pump-Yellow"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["green","hydGreenEDPPumpSwitch"], nil, func(val) {
props.UpdateManager.FromHashList(["green","hydGreenEDPPumpSwitch"], 1, func(val) {
if (val.hydGreenEDPPumpSwitch) {
obj["Pump-Green-off"].hide();
if (val.green > 1450) {
@ -345,7 +345,7 @@ var canvas_lowerECAMPageHyd =
obj["Pump-Green"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["hydPTUSwitch","hydPTUDiff","hydPTUActive","hydPTUFault"], nil, func(val) {
props.UpdateManager.FromHashList(["hydPTUSwitch","hydPTUDiff","hydPTUActive","hydPTUFault"], 1, func(val) {
if (val.hydPTUSwitch and !val.hydPTUFault) {
obj["PTU-connection"].setColor(0.0509,0.7529,0.2941);
@ -409,7 +409,6 @@ var canvas_lowerECAMPageHyd =
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -419,26 +418,28 @@ var canvas_lowerECAMPageHyd =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -452,11 +453,6 @@ var canvas_lowerECAMPageHyd =
"LO-AIR-PRESS-Yellow","LO-AIR-PRESS-Blue","OVHT-Green","OVHT-Blue","OVHT-Yellow","Quantity-Indicator-Green","Quantity-Indicator-Blue","Quantity-Indicator-Yellow","Green-label","Blue-label","Yellow-label","Fire-Valve-Yellow-Cross","Fire-Valve-Green-Cross","path5561","path5561-4","path5561-5"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -470,20 +466,25 @@ var canvas_lowerECAMPageHyd =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();

View file

@ -27,13 +27,7 @@ var canvas_lowerECAMPagePress =
obj.update_items = [
props.UpdateManager.FromHashValue("pressDelta", 0.05, func(val) {
if (val > 31.9) {
obj["PRESS-deltaP"].setText(sprintf("%2.1f", 31.9));
} else if (val < -9.9) {
obj["PRESS-deltaP"].setText(sprintf("%2.1f", -9.9));
} else {
obj["PRESS-deltaP"].setText(sprintf("%2.1f", val));
}
obj["PRESS-deltaP"].setText(sprintf("%2.1f", math.clamp(val, -9.9, 31.9)));
if (val < -0.4 or val > 8.5) {
obj["PRESS-deltaP"].setColor(0.7333,0.3803,0);
@ -42,13 +36,7 @@ var canvas_lowerECAMPagePress =
}
}),
props.UpdateManager.FromHashValue("pressVS", 25, func(val) {
if (val > 9950) {
obj["PRESS-Cab-VS"].setText(sprintf("%4.0f", 9950));
} else if (val < -9950) {
obj["PRESS-Cab-VS"].setText(sprintf("%4.0f", -9950));
} else {
obj["PRESS-Cab-VS"].setText(sprintf("%-4.0f", math.round(val,50)));
}
obj["PRESS-Cab-VS"].setText(sprintf("%-4.0f", math.clamp(math.round(val,50), -9950, 9950)));
if (abs(val) > 2000) {
obj["PRESS-Cab-VS"].setColor(0.7333,0.3803,0);
@ -57,13 +45,7 @@ var canvas_lowerECAMPagePress =
}
}),
props.UpdateManager.FromHashValue("pressAlt", 25, func(val) {
if (val > 32750) {
obj["PRESS-Cab-Alt"].setText(sprintf("%5.0f", 32750));
} else if (val < -9950) {
obj["PRESS-Cab-Alt"].setText(sprintf("%5.0f", -9950));
} else {
obj["PRESS-Cab-Alt"].setText(sprintf("%5.0f", math.round(val,50)));
}
obj["PRESS-Cab-Alt"].setText(sprintf("%5.0f", math.clamp(math.round(val,50), -9950, 32750)));
if (val > 9550) {
obj["PRESS-Cab-Alt"].setColor(1,0,0);
@ -80,8 +62,8 @@ var canvas_lowerECAMPagePress =
obj["PRESS-Sys-1"].hide();
}
}),
props.UpdateManager.FromHashList(["flowCtlValve1","engine1State"], nil, func(val) {
if (val.flowCtlValve1 == 0 and val.engine1State == 3) {
props.UpdateManager.FromHashList(["flowCtlValve1","engine1State"], 0.1, func(val) {
if (val.flowCtlValve1 <= 0.1 and val.engine1State == 3) {
obj["PRESS-Pack-1-Triangle"].setColor(0.7333,0.3803,0);
obj["PRESS-Pack-1"].setColor(0.7333,0.3803,0);
} else {
@ -89,8 +71,8 @@ var canvas_lowerECAMPagePress =
obj["PRESS-Pack-1"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashList(["flowCtlValve2","engine2State"], nil, func(val) {
if (val.flowCtlValve2 == 0 and val.engine2State == 3) {
props.UpdateManager.FromHashList(["flowCtlValve2","engine2State"], 0.1, func(val) {
if (val.flowCtlValve2 <= 0.1 and val.engine2State == 3) {
obj["PRESS-Pack-2-Triangle"].setColor(0.7333,0.3803,0);
obj["PRESS-Pack-2"].setColor(0.7333,0.3803,0);
} else {
@ -100,7 +82,6 @@ var canvas_lowerECAMPagePress =
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -110,26 +91,28 @@ var canvas_lowerECAMPagePress =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -142,11 +125,6 @@ var canvas_lowerECAMPagePress =
"PRESS-Pack-1","PRESS-Pack-2"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -160,20 +138,25 @@ var canvas_lowerECAMPagePress =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();

View file

@ -25,7 +25,6 @@ var canvas_lowerECAMPageSts =
obj.update_items = [
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -35,26 +34,28 @@ var canvas_lowerECAMPageSts =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -65,13 +66,9 @@ var canvas_lowerECAMPageSts =
return["Bulk","BulkLine","BulkLbl","Exit1L","Exit1R","Cabin1Left","Cabin1LeftLbl","Cabin1LeftLine","Cabin1LeftSlide","Cabin1Right","Cabin1RightLbl","Cabin1RightLine","Cabin1RightSlide","Cabin2Left","Cabin2LeftLbl",
"Cabin2LeftLine","Cabin2LeftSlide","Cabin2Right","Cabin2RightLbl","Cabin2RightLine","Cabin2RightSlide","Cabin3Left","Cabin3LeftLbl","Cabin3LeftLine","Cabin3LeftSlide","Cabin3Right","Cabin3RightLbl","Cabin3RightLine","Cabin3RightSlide","AvionicsLine1",
"AvionicsLbl1","AvionicsLine2","AvionicsLbl2","Cargo1Line","Cargo1Lbl","Cargo1Door","Cargo2Line","Cargo2Lbl","Cargo2Door","ExitLSlide","ExitLLine","ExitLLbl","ExitRSlide","ExitRLine","ExitRLbl","Cabin4Left","Cabin4LeftLbl","Cabin4LeftLine",
"Cabin4LeftSlide","Cabin4Right","Cabin4RightLbl","Cabin4RightLine","Cabin4RightSlide","DOOROXY-REGUL-LO-PR"];},
"Cabin4LeftSlide","Cabin4Right","Cabin4RightLbl","Cabin4RightLine","Cabin4RightSlide","DOOROXY-REGUL-LO-PR"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -85,20 +82,25 @@ var canvas_lowerECAMPageSts =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();

View file

@ -33,16 +33,16 @@ var canvas_lowerECAMPageWheel =
obj.update_items = [
props.UpdateManager.FromHashList(["gearPosNorm","gearPosNorm1","gearPosNorm2","gearLever"], nil, func(val) {
if (val.gearLever and (val.gearPosNorm != 1 or val.gearPosNorm1 != 1 or val.gearPosNorm2 != 1)) {
props.UpdateManager.FromHashList(["gearPosNorm","gearPosNorm1","gearPosNorm2","gearLever"], 0.01, func(val) {
if (val.gearLever and (val.gearPosNorm <= 0.99 or val.gearPosNorm1 <= 0.99 or val.gearPosNorm2 <= 0.99)) {
obj["lgctltext"].show();
} elsif (!val.gearLever and (val.gearPosNorm != 0 or val.gearPosNorm1 != 0 or val.gearPosNorm2 != 0)) {
} elsif (!val.gearLever and (val.gearPosNorm >= 0.01 or val.gearPosNorm1 >= 0.01 or val.gearPosNorm2 >= 0.01)) {
obj["lgctltext"].show();
} else {
obj["lgctltext"].hide();
}
}),
props.UpdateManager.FromHashValue("gearPosNorm", nil, func(val) {
props.UpdateManager.FromHashValue("gearPosNorm", 0.01, func(val) {
if (val < 0.2) {
obj["Triangle-Nose1"].hide();
obj["Triangle-Nose2"].hide();
@ -51,7 +51,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Nose2"].show();
}
if (val == 1) {
if (val >= 0.99) {
obj["Triangle-Nose1"].setColor(0.0509,0.7529,0.2941);
obj["Triangle-Nose2"].setColor(0.0509,0.7529,0.2941);
} else {
@ -59,7 +59,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Nose2"].setColor(1,0,0);
}
}),
props.UpdateManager.FromHashValue("gearPosNorm1", nil, func(val) {
props.UpdateManager.FromHashValue("gearPosNorm1", 0.01, func(val) {
if (val < 0.2) {
obj["Triangle-Left1"].hide();
obj["Triangle-Left2"].hide();
@ -68,7 +68,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Left2"].show();
}
if (val == 1) {
if (val >= 0.99) {
obj["Triangle-Left1"].setColor(0.0509,0.7529,0.2941);
obj["Triangle-Left2"].setColor(0.0509,0.7529,0.2941);
} else {
@ -76,7 +76,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Left2"].setColor(1,0,0);
}
}),
props.UpdateManager.FromHashValue("gearPosNorm2", nil, func(val) {
props.UpdateManager.FromHashValue("gearPosNorm2", 0.01, func(val) {
if (val < 0.2) {
obj["Triangle-Right1"].hide();
obj["Triangle-Right2"].hide();
@ -85,7 +85,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Right2"].show();
}
if (val == 1) {
if (val >= 0.99) {
obj["Triangle-Right1"].setColor(0.0509,0.7529,0.2941);
obj["Triangle-Right2"].setColor(0.0509,0.7529,0.2941);
} else {
@ -93,7 +93,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Right2"].setColor(1,0,0);
}
}),
props.UpdateManager.FromHashList(["yellow","green","NWSSwitch","brakesMode","val.accumPressPsiPressPsi","leftBrakeFCS","rightBrakeFCS"], nil, func(val) {
props.UpdateManager.FromHashList(["yellow","green","accumPressPsi","brakesMode","NWSSwitch"], 1, func(val) {
if (val.NWSSwitch and val.yellow >= 1500) {
obj["NWStext"].hide();
obj["NWS"].hide();
@ -125,18 +125,6 @@ var canvas_lowerECAMPageWheel =
obj["BSCU2"].hide();
}
if (val.green >= 1500) {
obj["normbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["normbrkhyd"].setColor(0.7333,0.3803,0);
}
if (val.yellow >= 1500) {
obj["altnbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["altnbrkhyd"].setColor(0.7333,0.3803,0);
}
if (!val.NWSSwitch or val.green < 1500) {
obj["NORMbrk"].show();
obj["normbrk-rect"].show();
@ -161,7 +149,7 @@ var canvas_lowerECAMPageWheel =
obj["ALTNbrk"].setColor(0.0509,0.7529,0.2941);
}
}
if (val.brakesMode == 2 and val.accumPressPsi < 200 and val.yellow < 1500) {
obj["accuonlyarrow"].hide();
obj["accuonly"].hide();
@ -185,7 +173,22 @@ var canvas_lowerECAMPageWheel =
obj["brakearrow"].hide();
obj["accupress_text"].hide();
}
}),
props.UpdateManager.FromHashValue("green", 1, func(val) {
if (val >= 1500) {
obj["normbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["normbrkhyd"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("yellow", 1, func(val) {
if (val >= 1500) {
obj["altnbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["altnbrkhyd"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["brakesMode","leftBrakeFCS","rightBrakeFCS"], 0.1, func(val) {
if (val.brakesMode == 1) {
obj["releaseL1"].hide();
obj["releaseL2"].hide();
@ -196,7 +199,7 @@ var canvas_lowerECAMPageWheel =
obj["releaseR3"].hide();
obj["releaseR4"].hide();
} else { # Display if the brakes are released and in alternate braking
if (val.leftBrakeFCS == 0) {
if (val.leftBrakeFCS <= 0.1) {
obj["releaseL1"].show();
obj["releaseL2"].show();
obj["releaseL3"].show();
@ -208,7 +211,7 @@ var canvas_lowerECAMPageWheel =
obj["releaseL4"].hide();
}
if (val.rightBrakeFCS == 0) {
if (val.rightBrakeFCS <= 0.1) {
obj["releaseR1"].show();
obj["releaseR2"].show();
obj["releaseR3"].show();
@ -221,7 +224,7 @@ var canvas_lowerECAMPageWheel =
}
}
}),
props.UpdateManager.FromHashList(["brakeAutobrkMode","NWSSwitch"], nil, func(val) {
props.UpdateManager.FromHashList(["brakeAutobrkMode","NWSSwitch"], 1, func(val) {
if (val.brakeAutobrkMode == 0) {
obj["autobrkind"].hide();
} elsif (val.brakeAutobrkMode == 1) {
@ -319,15 +322,15 @@ var canvas_lowerECAMPageWheel =
props.UpdateManager.FromHashValue("wheelRightDoor", 0.5, func(val) {
obj["rightdoor"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("wheelLeftDoorPos", 0.01, func(val) {
if (val == 0) {
props.UpdateManager.FromHashValue("wheelLeftDoorPos", 0.1, func(val) {
if (val <= 0.1) {
obj["leftdoor"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["leftdoor"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("wheelNoseDoorPos", 0.01, func(val) {
if (val == 0) {
props.UpdateManager.FromHashValue("wheelNoseDoorPos", 0.1, func(val) {
if (val <= 0.1) {
obj["nosegeardoorL"].setColorFill(0.0509,0.7529,0.2941);
obj["nosegeardoorR"].setColorFill(0.0509,0.7529,0.2941);
} else {
@ -335,8 +338,8 @@ var canvas_lowerECAMPageWheel =
obj["nosegeardoorR"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("wheelRightDoorPos", 0.01, func(val) {
if (val == 0) {
props.UpdateManager.FromHashValue("wheelRightDoorPos", 0.1, func(val) {
if (val <= 0.1) {
obj["rightdoor"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["rightdoor"].setColorFill(0.7333,0.3803,0);
@ -432,7 +435,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler5Rex"].show();
}
}),
props.UpdateManager.FromHashList(["spoilerL1Failure","spoilerL1","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL1Failure","spoilerL1","green"], 0.5, func(val) {
if (val.spoilerL1Failure or val.green < 1500) {
obj["spoiler1Lex"].setColor(0.7333,0.3803,0);
obj["spoiler1Lrt"].setColor(0.7333,0.3803,0);
@ -447,7 +450,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler1Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL2Failure","spoilerL2","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL2Failure","spoilerL2","yellow"], 0.5, func(val) {
if (val.spoilerL2Failure or val.yellow < 1500) {
obj["spoiler2Lex"].setColor(0.7333,0.3803,0);
obj["spoiler2Lrt"].setColor(0.7333,0.3803,0);
@ -462,7 +465,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler2Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL3Failure","spoilerL3","blue"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL3Failure","spoilerL3","blue"], 0.5, func(val) {
if (val.spoilerL3Failure or val.blue < 1500) {
obj["spoiler3Lex"].setColor(0.7333,0.3803,0);
obj["spoiler3Lrt"].setColor(0.7333,0.3803,0);
@ -477,7 +480,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler3Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL4Failure","spoilerL4","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL4Failure","spoilerL4","yellow"], 0.5, func(val) {
if (val.spoilerL4Failure or val.yellow < 1500) {
obj["spoiler4Lex"].setColor(0.7333,0.3803,0);
obj["spoiler4Lrt"].setColor(0.7333,0.3803,0);
@ -492,7 +495,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler4Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL5Failure","spoilerL5","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL5Failure","spoilerL5","green"], 0.5, func(val) {
if (val.spoilerL5Failure or val.green < 1500) {
obj["spoiler5Lex"].setColor(0.7333,0.3803,0);
obj["spoiler5Lrt"].setColor(0.7333,0.3803,0);
@ -507,7 +510,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler5Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR1Failure","spoilerR1","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR1Failure","spoilerR1","green"], 0.5, func(val) {
if (val.spoilerR1Failure or val.green < 1500) {
obj["spoiler1Rex"].setColor(0.7333,0.3803,0);
obj["spoiler1Rrt"].setColor(0.7333,0.3803,0);
@ -522,7 +525,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler1Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR2Failure","spoilerR2","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR2Failure","spoilerR2","yellow"], 0.5, func(val) {
if (val.spoilerR2Failure or val.yellow < 1500) {
obj["spoiler2Rex"].setColor(0.7333,0.3803,0);
obj["spoiler2Rrt"].setColor(0.7333,0.3803,0);
@ -537,7 +540,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler2Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR3Failure","spoilerR3","blue"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR3Failure","spoilerR3","blue"], 0.5, func(val) {
if (val.spoilerR3Failure or val.blue < 1500) {
obj["spoiler3Rex"].setColor(0.7333,0.3803,0);
obj["spoiler3Rrt"].setColor(0.7333,0.3803,0);
@ -552,7 +555,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler3Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR4Failure","spoilerR4","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR4Failure","spoilerR4","yellow"], 0.5, func(val) {
if (val.spoilerR4Failure or val.yellow < 1500) {
obj["spoiler4Rex"].setColor(0.7333,0.3803,0);
obj["spoiler4Rrt"].setColor(0.7333,0.3803,0);
@ -567,7 +570,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler4Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR5Failure","spoilerR5","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR5Failure","spoilerR5","green"], 0.5, func(val) {
if (val.spoilerR5Failure or val.green < 1500) {
obj["spoiler5Rex"].setColor(0.7333,0.3803,0);
obj["spoiler5Rrt"].setColor(0.7333,0.3803,0);
@ -584,7 +587,6 @@ var canvas_lowerECAMPageWheel =
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@ -594,26 +596,28 @@ var canvas_lowerECAMPageWheel =
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
props.UpdateManager.FromHashValue("hour", 1, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
props.UpdateManager.FromHashValue("minute", 1, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
if (val) {
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
props.UpdateManager.FromHashValue("satTemp", 0.5, func(val) {
obj["SAT"].setText(sprintf("%+2.0f", val));
}),
props.UpdateManager.FromHashValue("tatTemp", 0.5, func(val) {
obj["TAT"].setText(sprintf("%+2.0f", val));
}),
];
return obj;
},
@ -632,11 +636,6 @@ var canvas_lowerECAMPageWheel =
"releaseL3","releaseL4","releaseR3","releaseR4"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
@ -650,20 +649,25 @@ var canvas_lowerECAMPageWheel =
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
notification.satTemp = dmc.DMController.DMCs[1].outputs[4].getValue();
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setText("XX");
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
notification.tatTemp = dmc.DMController.DMCs[1].outputs[5].getValue();
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setText("XX");
me["TAT"].setColor(0.7333,0.3803,0);
}
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
},
update: func(notification) {
me.updatePower();

View file

@ -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="wheel.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.8101934"
inkscape:cx="932.77328"
inkscape:cy="542.48348"
inkscape:zoom="0.9050967"
inkscape:cx="483.92619"
inkscape:cy="964.53782"
inkscape:window-x="-11"
inkscape:window-y="-11"
inkscape:window-maximized="1"
@ -323,13 +322,13 @@
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="434.00464"
x="420.50464"
y="552.28931"
id="antiskidtext"
inkscape:label="#text4269"><tspan
sodipodi:role="line"
id="tspan4271"
x="434.00464"
x="420.50464"
y="552.28931"
style="font-size:32px;line-height:1.25">ANTI SKID</tspan></text>
<text

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View file

@ -167,10 +167,10 @@ var canvas_upperECAM = {
obj["FlapDots"].hide();
}
}),
props.UpdateManager.FromHashValue("flexTemp", 1, func(val) {
props.UpdateManager.FromHashValue("flexTemp", 0.5, func(val) {
obj["FlxLimTemp"].setText(sprintf("%2.0d",val));
}),
props.UpdateManager.FromHashValue("slatLocked", nil, func(val) {
props.UpdateManager.FromHashValue("slatLocked", 1, func(val) {
if (val) {
if (slatLockGoing == 0) {
slatLockGoing = 1;
@ -185,10 +185,10 @@ var canvas_upperECAM = {
];
obj.update_items_fadec_powered_n1 = [
props.UpdateManager.FromHashValue("N1_1", 0.01, func(val) {
props.UpdateManager.FromHashValue("N1_1", 0.1, func(val) {
obj["N11-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("N1_2", 0.01, func(val) {
props.UpdateManager.FromHashValue("N1_2", 0.1, func(val) {
obj["N12-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("N1_actual_1", 0.025, func(val) {
@ -199,23 +199,23 @@ var canvas_upperECAM = {
obj["N12"].setText(sprintf("%s", math.floor(val + 0.05)));
obj["N12-decimal"].setText(sprintf("%s", int(10 * math.mod(val + 0.05, 1))));
}),
props.UpdateManager.FromHashValue("N1_lim", 0.01, func(val) {
props.UpdateManager.FromHashValue("N1_lim", 0.1, func(val) {
obj["N11-ylim"].setRotation((val + 90) * D2R);
obj["N12-ylim"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("N1thr_1", 0.01, func(val) {
props.UpdateManager.FromHashValue("N1thr_1", 0.1, func(val) {
obj["N11-thr"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("N1thr_2", 0.01, func(val) {
props.UpdateManager.FromHashValue("N1thr_2", 0.1, func(val) {
obj["N12-thr"].setRotation((val + 90) * D2R);
}),
];
obj.update_items_fadec_powered_epr = [
props.UpdateManager.FromHashValue("EPR_1", 0.0001, func(val) {
props.UpdateManager.FromHashValue("EPR_1", 0.1, func(val) {
obj["EPR1-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("EPR_2", 0.0001, func(val) {
props.UpdateManager.FromHashValue("EPR_2", 0.1, func(val) {
obj["EPR2-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("EPR_actual_1", 0.0001, func(val) {
@ -228,14 +228,14 @@ var canvas_upperECAM = {
obj["EPR2"].setText(sprintf("%1.0f", math.floor(epr2)));
obj["EPR2-decimal"].setText(sprintf("%03d", (epr2 - int(epr2)) * 1000));
}),
props.UpdateManager.FromHashValue("EPR_lim", 0.0001, func(val) {
props.UpdateManager.FromHashValue("EPR_lim", 0.1, func(val) {
obj["EPR1-ylim"].setRotation((val + 90) * D2R);
obj["EPR2-ylim"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("EPRthr_1", 0.0001, func(val) {
props.UpdateManager.FromHashValue("EPRthr_1", 0.1, func(val) {
obj["EPR1-thr"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("EPRthr_2", 0.0001, func(val) {
props.UpdateManager.FromHashValue("EPRthr_2", 0.1, func(val) {
obj["EPR2-thr"].setRotation((val + 90) * D2R);
}),
];
@ -330,7 +330,7 @@ var canvas_upperECAM = {
obj["FlxLimTemp"].hide();
}
}),
props.UpdateManager.FromHashList(["eng1_n1", "N1_mode_1"], nil, func(val) {
props.UpdateManager.FromHashList(["eng1_n1", "N1_mode_1"], 1, func(val) {
if (val.eng1_n1 and val.N1_mode_1) {
obj["N11-thr"].show();
obj["N11-ylim"].hide(); # Keep it hidden, since N1 mode limit calculation is not done yet
@ -339,7 +339,7 @@ var canvas_upperECAM = {
obj["N11-ylim"].hide();
}
}),
props.UpdateManager.FromHashList(["eng2_n1", "N1_mode_2"], nil, func(val) {
props.UpdateManager.FromHashList(["eng2_n1", "N1_mode_2"], 1, func(val) {
if (val.eng2_n1 == 1 and val.N1_mode_2) {
obj["N12-thr"].show();
obj["N12-ylim"].hide(); # Keep it hidden, since N1 mode limit calculation is not done yet
@ -354,13 +354,13 @@ var canvas_upperECAM = {
props.UpdateManager.FromHashValue("egt_1", 0.5, func(val) {
obj["EGT1"].setText(sprintf("%s", math.round(val)));
}),
props.UpdateManager.FromHashValue("egt_1_needle", 0.01, func(val) {
props.UpdateManager.FromHashValue("egt_1_needle", 0.1, func(val) {
obj["EGT1-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("egt_2", 0.5, func(val) {
obj["EGT2"].setText(sprintf("%s", math.round(val)));
}),
props.UpdateManager.FromHashValue("egt_2_needle", 0.01, func(val) {
props.UpdateManager.FromHashValue("egt_2_needle", 0.1, func(val) {
obj["EGT2-needle"].setRotation((val + 90) * D2R);
}),
];

View file

@ -545,6 +545,9 @@
<switch name="/systems/air-conditioning/valves/hot-air-power">
<default value="0"/>
<test logic="OR" value="0">
/systems/failures/pneumatics/hot-air-valve eq 1
</test>
<test logic="OR" value="0.5"> <!-- ?? unsure about power src, use pack controllers -->
/systems/electrical/bus/ac-1 ge 110
/systems/electrical/bus/ac-2 ge 110