1
0
Fork 0

Bleed page

This commit is contained in:
legoboyvdlp R 2021-07-18 20:58:09 +01:00
parent 677a57510d
commit 0b0fc0b928
4 changed files with 402 additions and 709 deletions

View file

@ -23,6 +23,328 @@ 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);
} else {
obj["BLEED-XFEED"].setRotation(90 * D2R);
}
} 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) {
obj["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(val.BleedPreCoolerPSI1)));
if (val.BleedPreCoolerPSI1 < 4 or val.BleedPreCoolerPSI1 > 57) {
obj["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-1-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", "XX"));
obj["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedBMC2Working","BleedPreCoolerPSI2"], nil, func(val) {
if (val.BleedBMC2Working) {
obj["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(val.BleedPreCoolerPSI2)));
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) {
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) {
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) {
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) {
obj["BLEED-Ram-Air"].setRotation(0);
if (val.gear1Wow) {
obj["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
obj["BLEED-Ram-Air"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-Cross"].setColorFill(0.7333,0.3803,0);
} else {
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"].show();
} else {
obj["BLEED-Ram-Air"].setRotation(45 * D2R);
obj["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
obj["BLEED-Ram-Air"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-Cross"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-connection"].show();
}
if (val.flowCtlValve1 == 0 and val.flowCtlValve2 == 0) {
if (val.gear1Wow or val.RamAirValve != 1) {
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);
} else {
obj["BLEED-cond-1"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-cond-2"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-cond-3"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-cond-1"].setColor(0.0509,0.7529,0.2941);
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(["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);
}
} 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.displayedGForce = 0;
@ -62,10 +384,16 @@ var canvas_lowerECAMPageBleed =
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["Bulk","BulkLine","BulkLbl","Exit1L","Exit1R","Cabin1Left","Cabin1LeftLbl","Cabin1LeftLine","Cabin1LeftSlide","Cabin1Right","Cabin1RightLbl","Cabin1RightLine","Cabin1RightSlide","Cabin2Left","Cabin2LeftLbl",
"Cabin2LeftLine","Cabin2LeftSlide","Cabin2Right","Cabin2RightLbl","Cabin2RightLine","Cabin2RightSlide","Cabin3Left","Cabin3LeftLbl","Cabin3LeftLine","Cabin3LeftSlide","Cabin3Right","Cabin3RightLbl","Cabin3RightLine","Cabin3RightSlide","AvionicsLine1",
"AvionicsLbl1","AvionicsLine2","AvionicsLbl2","Cargo1Line","Cargo1Lbl","Cargo1Door","Cargo2Line","Cargo2Lbl","Cargo2Door","ExitLSlide","ExitLLine","ExitLLbl","ExitRSlide","ExitRLine","ExitRLbl","Cabin4Left","Cabin4LeftLbl","Cabin4LeftLine",
"Cabin4LeftSlide","Cabin4Right","Cabin4RightLbl","Cabin4RightLine","Cabin4RightSlide","DOOROXY-REGUL-LO-PR"];},
return["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit", "BLEED-XFEED", "BLEED-Ram-Air", "BLEED-Ram-Air-Cross", "BLEED-APU-CIRCLE", "BLEED-HP-Valve-1", "BLEED-XFEED-Cross",
"BLEED-APU-LINES","BLEED-ENG-1", "BLEED-HP-Valve-2", "BLEED-ENG-2", "BLEED-Precooler-1-Inlet-Press", "BLEED-Precooler-1-Outlet-Temp",
"BLEED-Precooler-2-Inlet-Press", "BLEED-Precooler-2-Outlet-Temp", "BLEED-ENG-1-label", "BLEED-ENG-2-label",
"BLEED-GND", "BLEED-Pack-1-Flow-Valve", "BLEED-Pack-2-Flow-Valve", "BLEED-Pack-1-Out-Temp","BLEED-APU-connectionTop",
"BLEED-Pack-1-Comp-Out-Temp", "BLEED-Pack-1-Packflow-needle", "BLEED-Pack-1-Bypass-needle", "BLEED-Pack-2-Out-Temp",
"BLEED-Pack-2-Bypass-needle", "BLEED-Pack-2-Comp-Out-Temp", "BLEED-Pack-2-Packflow-needle", "BLEED-Anti-Ice-Left",
"BLEED-Anti-Ice-Right", "BLEED-HP-2-connection", "BLEED-HP-1-connection", "BLEED-ANTI-ICE-ARROW-LEFT", "BLEED-ANTI-ICE-ARROW-RIGHT",
"BLEED-xbleedLeft","BLEED-xbleedCenter","BLEED-xbleedRight","BLEED-cond-1","BLEED-cond-2","BLEED-cond-3","BLEED-Ram-Air-connection","BLEED-ENG-1-Cross","BLEED-ENG-2-Cross",
"BLEED-Pack-1-Flow-Valve-Cross","BLEED-Pack-2-Flow-Valve-Cross"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
@ -140,6 +468,37 @@ var canvas_lowerECAMPageBleed =
};
var input = {
ApuBleedNotOn: "/systems/pneumatics/warnings/apu-bleed-not-on",
BleedBMC1Working: "/systems/pneumatics/indicating/bmc1-working",
BleedBMC2Working: "/systems/pneumatics/indicating/bmc2-working",
BleedCrossbleedCmd: "/systems/pneumatics/valves/crossbleed-valve-cmd",
BleedCrossbleed: "/systems/pneumatics/valves/crossbleed-valve",
BleedHPValve1: "/systems/pneumatics/valves/engine-1-hp-valve",
BleedHPValve2: "/systems/pneumatics/valves/engine-2-hp-valve",
BleedHPValve1Cmd: "/systems/pneumatics/valves/engine-1-hp-valve-cmd",
BleedHPValve2Cmd: "/systems/pneumatics/valves/engine-2-hp-valve-cmd",
BleedPRVValve1Cmd: "/controls/pneumatics/switches/bleed-1",
BleedPRVValve2Cmd: "/controls/pneumatics/switches/bleed-2",
BleedPRVValve1: "/systems/pneumatics/valves/engine-1-prv-valve",
BleedPRVValve2: "/systems/pneumatics/valves/engine-2-prv-valve",
BleedPreCoolerPSI1: "/systems/pneumatics/psi/engine-1-psi",
BleedPreCoolerPSI2: "/systems/pneumatics/psi/engine-2-psi",
BleedPreCoolerTemp1: "/systems/pneumatics/precooler/temp-1",
BleedPreCoolerTemp2: "/systems/pneumatics/precooler/temp-2",
BleedPreCoolerOvht1: "/systems/pneumatics/precooler/ovht-1",
BleedPreCoolerOvht2: "/systems/pneumatics/precooler/ovht-2",
Pack1Bypass: "/systems/pneumatics/pack-1-bypass",
Pack2Bypass: "/systems/pneumatics/pack-2-bypass",
Pack1FlowOutput: "/ECAM/Lower/pack-1-flow-output",
Pack2FlowOutput: "/ECAM/Lower/pack-2-flow-output",
Pack1OutTemp: "/systems/air-conditioning/packs/pack-1-output-temp",
Pack2OutTemp: "/systems/air-conditioning/packs/pack-2-output-temp",
Pack1OutletTemp: "/systems/air-conditioning/packs/pack-1-outlet-temp",
Pack2OutletTemp: "/systems/air-conditioning/packs/pack-2-outlet-temp",
Pack1Switch: "/controls/pneumatics/switches/pack-1",
Pack2Switch: "/controls/pneumatics/switches/pack-2",
RamAirValve: "/systems/air-conditioning/valves/ram-air",
IceWingSw: "/controls/ice-protection/wing",
};
foreach (var name; keys(input)) {

View file

@ -21,6 +21,14 @@ var canvas_lowerECAMPageElec =
obj.units = acconfig_weight_kgs.getValue();
# init
obj["IDG1-LOPR"].hide();
obj["IDG2-LOPR"].hide();
obj["Shed-label"].hide();
obj["IDG2-RISE-label"].hide();
obj["IDG2-RISE-Value"].hide();
obj["IDG1-RISE-label"].hide();
obj["IDG1-RISE-Value"].hide();
obj.update_items = [
];
@ -62,10 +70,14 @@ var canvas_lowerECAMPageElec =
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["Bulk","BulkLine","BulkLbl","Exit1L","Exit1R","Cabin1Left","Cabin1LeftLbl","Cabin1LeftLine","Cabin1LeftSlide","Cabin1Right","Cabin1RightLbl","Cabin1RightLine","Cabin1RightSlide","Cabin2Left","Cabin2LeftLbl",
"Cabin2LeftLine","Cabin2LeftSlide","Cabin2Right","Cabin2RightLbl","Cabin2RightLine","Cabin2RightSlide","Cabin3Left","Cabin3LeftLbl","Cabin3LeftLine","Cabin3LeftSlide","Cabin3Right","Cabin3RightLbl","Cabin3RightLine","Cabin3RightSlide","AvionicsLine1",
"AvionicsLbl1","AvionicsLine2","AvionicsLbl2","Cargo1Line","Cargo1Lbl","Cargo1Door","Cargo2Line","Cargo2Lbl","Cargo2Door","ExitLSlide","ExitLLine","ExitLLbl","ExitRSlide","ExitRLine","ExitRLbl","Cabin4Left","Cabin4LeftLbl","Cabin4LeftLine",
"Cabin4LeftSlide","Cabin4Right","Cabin4RightLbl","Cabin4RightLine","Cabin4RightSlide","DOOROXY-REGUL-LO-PR"];},
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit","BAT1-label","Bat1Volt","Bat1Ampere","BAT2-label","Bat2Volt","Bat2Ampere","BAT1-charge","BAT1-discharge","BAT2-charge","BAT2-discharge","ELEC-Line-DC1-DCBAT","ELEC-Line-DC1-DCESS","ELEC-Line-DC2-DCBAT",
"ELEC-Line-DC1-DCESS_DCBAT","ELEC-Line-DC2-DCESS_DCBAT","ELEC-Line-TR1-DC1","ELEC-Line-TR2-DC2","Shed-label","ELEC-Line-ESSTR-DCESS","TR1-label","TR1Volt","TR1Ampere","TR2-label","TR2Volt","TR2Ampere","EMERGEN-group","EmergenVolt","EmergenHz",
"ELEC-Line-Emergen-ESSTR","EMERGEN-Label-off","Emergen-Label","EMERGEN-out","ELEC-Line-ACESS-TRESS","ELEC-Line-AC1-TR1","ELEC-Line-AC2-TR2","ELEC-Line-AC1-ACESS","ELEC-Line-AC2-ACESS","ACESS-SHED","ACESS","AC1-in","AC2-in","ELEC-Line-GEN1-AC1","ELEC-Line-GEN2-AC2",
"ELEC-Line-APU-AC1","ELEC-Line-APU-EXT","ELEC-Line-EXT-AC2","APU-out","EXT-out","EXTPWR-group","ExtVolt","ExtHz","APU-content","APU-border","APUGentext","APUGenLoad","APUGenVolt","APUGenHz","APUGEN-off","GEN1-label","Gen1Load","Gen1Volt","Gen1Hz",
"GEN2-label","Gen2Load","GEN2-off","Gen2Volt","Gen2Hz","ELEC-IDG-1-label","ELEC-IDG-1-num-label","ELEC-IDG-1-Temp","IDG1-LOPR","IDG1-DISC","IDG1-RISE-Value","IDG1-RISE-label","GalleyShed","ELEC-IDG-2-Temp","ELEC-IDG-2-label","ELEC-IDG-2-num-label","IDG2-RISE-label","IDG2-RISE-Value","IDG2-LOPR",
"IDG2-DISC","ESSTR-group","ESSTR","ESSTR-Volt","ESSTR-Ampere","BAT1-content","BAT2-content","BAT1-OFF","BAT2-OFF","GEN1-content","GEN2-content","GEN-1-num-label","GEN-2-num-label","GEN1-off","GEN2-off","GEN1-num-label","GEN2-num-label","EXTPWR-label",
"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"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{

View file

@ -76,25 +76,19 @@ var final_deg = props.globals.getNode("", 1);
var temperature_degc = props.globals.getNode("/environment/temperature-degc", 1);
var tank3_content_lbs = props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs", 1);
var ir2_knob = props.globals.getNode("/controls/adirs/ir[1]/knob", 1);
var apuBleedNotOn = props.globals.getNode("/systems/pneumatics/warnings/apu-bleed-not-on", 1);
var apuBleedNotOn = props.globals.getNode("", 1);
var apu_valve = props.globals.getNode("/systems/pneumatics/valves/apu-bleed-valve-cmd", 1);
var apu_valve_state = props.globals.getNode("/systems/pneumatics/valves/apu-bleed-valve", 1);
var xbleedcmd = props.globals.getNode("/systems/pneumatics/valves/crossbleed-valve-cmd", 1);
var xbleed = props.globals.getNode("/systems/pneumatics/valves/crossbleed-valve", 1);
var xbleedstate = nil;
var hp_valve1_state = props.globals.getNode("/systems/pneumatics/valves/engine-1-hp-valve", 1);
var hp_valve2_state = props.globals.getNode("/systems/pneumatics/valves/engine-2-hp-valve", 1);
var hp_valve1 = props.globals.getNode("/systems/pneumatics/valves/engine-1-hp-valve-cmd", 1);
var hp_valve2 = props.globals.getNode("/systems/pneumatics/valves/engine-2-hp-valve-cmd", 1);
var eng_valve1 = props.globals.getNode("/systems/pneumatics/valves/engine-1-prv-valve", 1);
var eng_valve2 = props.globals.getNode("/systems/pneumatics/valves/engine-2-prv-valve", 1);
var precooler1_psi = props.globals.getNode("/systems/pneumatics/psi/engine-1-psi", 1);
var precooler2_psi = props.globals.getNode("/systems/pneumatics/psi/engine-2-psi", 1);
var precooler1_temp = props.globals.getNode("/systems/pneumatics/precooler/temp-1", 1);
var precooler2_temp = props.globals.getNode("/systems/pneumatics/precooler/temp-2", 1);
var precooler1_ovht = props.globals.getNode("/systems/pneumatics/precooler/ovht-1", 1);
var precooler2_ovht = props.globals.getNode("/systems/pneumatics/precooler/ovht-2", 1);
var bmc1working = props.globals.getNode("/systems/pneumatics/indicating/bmc1-working", 1);
var bmc1working = props.globals.getNode("", 1);
var bmc2working = props.globals.getNode("/systems/pneumatics/indicating/bmc2-working", 1);
var bmc1 = 0;
var bmc2 = 0;
@ -142,650 +136,7 @@ var press_vs_norm = props.globals.getNode("", 1);
var cabinalt = props.globals.getNode("", 1);
var gear0_wow = props.globals.getNode("/gear/gear[0]/wow", 1);
# Create Nodes:
var canvas_lowerECAM_base = {
init: func(canvas_group, file) {
var font_mapper = func(family, weight) {
return "LiberationFonts/LiberationSans-Regular.ttf";
};
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
var svg_keys = me.getKeys();
foreach(var key; svg_keys) {
me[key] = canvas_group.getElementById(key);
}
me.page = canvas_group;
return me;
},
getKeys: func() {
return [];
},
update: func() {
var elapsedtime = pts.Sim.Time.elapsedSec.getValue();
if (systems.ELEC.Bus.ac2.getValue() >= 110 and lighting_du4.getValue() > 0.01) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= elapsedtime) {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_test.page.show();
lowerECAM_test.update();
} else {
lowerECAM_test.page.hide();
page = ecam_page.getValue();
if (page == "apu") {
lowerECAM_apu.page.show();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_apu.update();
} else if (page == "bleed") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.show();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_bleed.update();
} else if (page == "cond") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.show();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_cond.update();
} else if (page == "cruise") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.show();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_crz.update();
} else if (page == "door") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.show();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_door.update();
} else if (page == "elec") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.show();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_elec.update();
} else if (page == "eng") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.show();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_eng.update();
} else if (page == "fctl") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.show();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_fctl.update();
} else if (page == "fuel") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.show();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_fuel.update();
} else if (page == "press") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.show();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_press.update();
} else if (page == "sts") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.show();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
lowerECAM_status.update();
} else if (page == "hyd") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.show();
lowerECAM_wheel.page.hide();
lowerECAM_hyd.update();
} else if (page == "wheel") {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.show();
lowerECAM_wheel.update();
} else {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
}
}
} else {
lowerECAM_test.page.hide();
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide();
lowerECAM_crz.page.hide();
lowerECAM_door.page.hide();
lowerECAM_elec.page.hide();
lowerECAM_eng.page.hide();
lowerECAM_fctl.page.hide();
lowerECAM_fuel.page.hide();
lowerECAM_press.page.hide();
lowerECAM_status.page.hide();
lowerECAM_hyd.page.hide();
lowerECAM_wheel.page.hide();
}
},
updateBottomStatus: func() {
},
};
var canvas_lowerECAM_bleed = {
new: func(canvas_group, file) {
var m = {parents: [canvas_lowerECAM_bleed, canvas_lowerECAM_base]};
m.init(canvas_group, file);
return m;
},
getKeys: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit", "BLEED-XFEED", "BLEED-Ram-Air", "BLEED-APU-CIRCLE", "BLEED-HP-Valve-1",
"BLEED-APU-LINES","BLEED-ENG-1", "BLEED-HP-Valve-2", "BLEED-ENG-2", "BLEED-Precooler-1-Inlet-Press", "BLEED-Precooler-1-Outlet-Temp",
"BLEED-Precooler-2-Inlet-Press", "BLEED-Precooler-2-Outlet-Temp", "BLEED-ENG-1-label", "BLEED-ENG-2-label",
"BLEED-GND", "BLEED-Pack-1-Flow-Valve", "BLEED-Pack-2-Flow-Valve", "BLEED-Pack-1-Out-Temp","BLEED-APU-connectionTop",
"BLEED-Pack-1-Comp-Out-Temp", "BLEED-Pack-1-Packflow-needle", "BLEED-Pack-1-Bypass-needle", "BLEED-Pack-2-Out-Temp",
"BLEED-Pack-2-Bypass-needle", "BLEED-Pack-2-Comp-Out-Temp", "BLEED-Pack-2-Packflow-needle", "BLEED-Anti-Ice-Left",
"BLEED-Anti-Ice-Right", "BLEED-HP-2-connection", "BLEED-HP-1-connection", "BLEED-ANTI-ICE-ARROW-LEFT", "BLEED-ANTI-ICE-ARROW-RIGHT",
"BLEED-xbleedLeft","BLEED-xbleedCenter","BLEED-xbleedRight","BLEED-cond-1","BLEED-cond-2","BLEED-cond-3","BLEED-Ram-Air-connection"];
},
update: func() {
# X BLEED
xbleedstate = xbleed.getValue();
xbleedcmdstate = xbleedcmd.getBoolValue();
if (xbleedcmdstate != xbleedstate) {
me["BLEED-XFEED"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-XFEED"].setColor(0.0509,0.7529,0.2941);
}
if (xbleedcmdstate == xbleedstate) {
if (xbleedcmdstate) {
me["BLEED-XFEED"].setRotation(0);
} else {
me["BLEED-XFEED"].setRotation(90 * D2R);
}
} else {
me["BLEED-XFEED"].setRotation(45 * D2R);
}
if (xbleedstate == 1) {
me["BLEED-xbleedCenter"].show();
me["BLEED-xbleedRight"].show();
} else {
me["BLEED-xbleedCenter"].hide();
me["BLEED-xbleedRight"].hide();
}
# HP valve 1
hp_valve_state = hp_valve1_state.getValue();
if (hp_valve_state == 1) {
me["BLEED-HP-Valve-1"].setRotation(90 * D2R);
me["BLEED-HP-1-connection"].show();
} else {
me["BLEED-HP-Valve-1"].setRotation(0);
me["BLEED-HP-1-connection"].hide();
}
if (hp_valve_state == hp_valve1.getValue()) {
me["BLEED-HP-Valve-1"].setColor(0.0509,0.7529,0.2941);
} else {
me["BLEED-HP-Valve-1"].setColor(0.7333,0.3803,0);
}
# HP valve 2
hp_valve_state = hp_valve2_state.getValue();
if (hp_valve_state == 1) {
me["BLEED-HP-Valve-2"].setRotation(90 * D2R);
me["BLEED-HP-2-connection"].show();
} else {
me["BLEED-HP-Valve-2"].setRotation(0);
me["BLEED-HP-2-connection"].hide();
}
if (hp_valve_state == hp_valve2.getValue()) {
me["BLEED-HP-Valve-2"].setColor(0.0509,0.7529,0.2941);
} else {
me["BLEED-HP-Valve-2"].setColor(0.7333,0.3803,0);
}
# ENG BLEED valve 1
eng_valve_state = systems.PNEU.Switch.bleed1.getValue();
bleed_valve_cur = eng_valve1.getValue();
if (bleed_valve_cur == 0) {
me["BLEED-ENG-1"].setRotation(0);
} else {
me["BLEED-ENG-1"].setRotation(90 * D2R);
}
if (eng_valve_state == bleed_valve_cur) {
me["BLEED-ENG-1"].setColor(0.0509,0.7529,0.2941);
} else {
me["BLEED-ENG-1"].setColor(0.7333,0.3803,0);
}
# APU BLEED valve
var apu_valve_state2 = apu_valve_state.getValue();
if (systems.APUNodes.Controls.master.getValue()) {
me["BLEED-APU-LINES"].show();
if (apu_valve_state2 == 1) {
me["BLEED-APU-CIRCLE"].setRotation(0);
me["BLEED-APU-connectionTop"].show();
me["BLEED-xbleedLeft"].show();
} else {
me["BLEED-APU-CIRCLE"].setRotation(90 * D2R);
me["BLEED-APU-connectionTop"].hide();
if (xbleed.getValue() != 1) {
me["BLEED-xbleedLeft"].hide();
} else {
me["BLEED-xbleedLeft"].show();
}
}
if (apuBleedNotOn.getValue() != 1) {
me["BLEED-APU-CIRCLE"].setColor(0.0509,0.7529,0.2941);
} else {
me["BLEED-APU-CIRCLE"].setColor(0.7333,0.3803,0);
}
} else {
if (xbleed.getValue() != 1) {
me["BLEED-xbleedLeft"].hide();
} else {
me["BLEED-xbleedLeft"].show();
}
me["BLEED-APU-LINES"].hide();
me["BLEED-APU-connectionTop"].hide();
}
# ENG BLEED valve 2
eng_valve_state = systems.PNEU.Switch.bleed2.getValue();
bleed_valve_cur = eng_valve2.getValue();
if (bleed_valve_cur == 0) {
me["BLEED-ENG-2"].setRotation(0);
} else {
me["BLEED-ENG-2"].setRotation(90 * D2R);
}
if (eng_valve_state == bleed_valve_cur) {
me["BLEED-ENG-2"].setColor(0.0509,0.7529,0.2941);
} else {
me["BLEED-ENG-2"].setColor(0.7333,0.3803,0);
}
# Precooler inlet 1
bmc1 = bmc1working.getValue();
bmc2 = bmc2working.getValue();
if (bmc1) {
var precooler_psi = precooler1_psi.getValue();
me["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
if (precooler_psi < 4 or precooler_psi > 57) {
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-Inlet-Press"].setText(sprintf("%s", "XX"));
me["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
}
# Precooler inlet 2
if (bmc2) {
var precooler_psi = precooler2_psi.getValue();
me["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
if (precooler_psi < 4 or precooler_psi > 57) {
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-Inlet-Press"].setText(sprintf("%s", "XX"));
me["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
}
# Precooler outlet 1
if (bmc1) {
var precooler_temp = precooler1_temp.getValue();
me["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (systems.PNEU.Switch.bleed1.getValue() and (precooler_temp < 150 or precooler1_ovht.getValue())) {
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", "XX"));
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
# Precooler outlet 2
if (bmc2) {
var precooler_temp = precooler2_temp.getValue();
me["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (systems.PNEU.Switch.bleed2.getValue() and (precooler_temp < 150 or precooler2_ovht.getValue())) {
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", "XX"));
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
# GND air
if (pts.Gear.wow[1].getValue()) {
me["BLEED-GND"].show();
} else {
me["BLEED-GND"].hide();
}
# WING ANTI ICE
if (switch_wing_aice.getValue()) {
me["BLEED-Anti-Ice-Left"].show();
me["BLEED-Anti-Ice-Right"].show();
} else {
me["BLEED-Anti-Ice-Left"].hide();
me["BLEED-Anti-Ice-Right"].hide();
}
# ENG 1 label
if (pts.Engines.Engine.n2Actual[0].getValue() >= 59) {
me["BLEED-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
} else {
me["BLEED-ENG-1-label"].setColor(0.7333,0.3803,0);
}
# ENG 2 label
if (pts.Engines.Engine.n2Actual[1].getValue() >= 59) {
me["BLEED-ENG-2-label"].setColor(0.8078,0.8039,0.8078);
} else {
me["BLEED-ENG-2-label"].setColor(0.7333,0.3803,0);
}
# PACK 1 -----------------------------------------
packValveState = systems.PNEU.Valves.pack1.getValue();
me["BLEED-Pack-1-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack1OutTemp.getValue(), 5)));
me["BLEED-Pack-1-Comp-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack1OutletTemp.getValue(), 5)));
if (systems.PNEU.Packs.pack1OutTemp.getValue() > 90) {
me["BLEED-Pack-1-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-1-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
# `-50` cause the middel position from where we move the needle is at 50
me["BLEED-Pack-1-Bypass-needle"].setRotation((pack1_bypass.getValue() - 50) * D2R);
if (systems.PNEU.Packs.pack1OutletTemp.getValue() > 230) {
me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
me["BLEED-Pack-1-Packflow-needle"].setRotation(systems.PNEU.Packs.packFlow1.getValue() * D2R);
if (packValveState == 0) {
me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.7333,0.3803,0);
me["BLEED-Pack-1-Flow-Valve"].setRotation(90 * D2R);
} else {
me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
me["BLEED-Pack-1-Flow-Valve"].setRotation(0);
}
if (packValveState == systems.PNEU.Switch.pack1.getValue()) {
me["BLEED-Pack-1-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
} else {
me["BLEED-Pack-1-Flow-Valve"].setColor(0.7333,0.3803,0);
}
# PACK 2 -----------------------------------------
packValveState = systems.PNEU.Valves.pack2.getValue();
me["BLEED-Pack-2-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack2OutTemp.getValue(), 5)));
me["BLEED-Pack-2-Comp-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack2OutletTemp.getValue(), 5)));
if (systems.PNEU.Packs.pack2OutTemp.getValue() > 90) {
me["BLEED-Pack-2-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-2-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
me["BLEED-Pack-2-Bypass-needle"].setRotation((pack2_bypass.getValue() - 50) * D2R);
if (systems.PNEU.Packs.pack2OutletTemp.getValue() > 230) {
me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
me["BLEED-Pack-2-Packflow-needle"].setRotation(systems.PNEU.Packs.packFlow2.getValue() * D2R);
if (packValveState == 0) {
me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.7333,0.3803,0);
me["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R);
} else {
me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
me["BLEED-Pack-2-Flow-Valve"].setRotation(0);
}
if (packValveState == systems.PNEU.Switch.pack2.getValue()) {
me["BLEED-Pack-2-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
} else {
me["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0);
}
# Ram Air
ramAirState = systems.PNEU.Valves.ramAir.getValue();
if (ramAirState == 0) {
me["BLEED-Ram-Air"].setRotation(90 * D2R);
me["BLEED-Ram-Air"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941);
me["BLEED-Ram-Air-connection"].hide();
} elsif (ramAirState) {
me["BLEED-Ram-Air"].setRotation(0);
if (pts.Gear.wow[1].getValue()) {
me["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
me["BLEED-Ram-Air"].setColorFill(0.7333,0.3803,0);
} else {
me["BLEED-Ram-Air"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941);
}
me["BLEED-Ram-Air-connection"].show();
} else {
me["BLEED-Ram-Air"].setRotation(45 * D2R);
me["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
me["BLEED-Ram-Air"].setColorFill(0.7333,0.3803,0);
me["BLEED-Ram-Air-connection"].show();
}
# Triangles
if (systems.PNEU.Valves.pack1.getValue() == 0 and systems.PNEU.Valves.pack2.getValue() == 0) {
if (pts.Gear.wow[1].getValue() or ramAirState != 1) {
me["BLEED-cond-1"].setColor(0.7333,0.3803,0);
me["BLEED-cond-2"].setColor(0.7333,0.3803,0);
me["BLEED-cond-3"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-cond-1"].setColor(0.0509,0.7529,0.2941);
me["BLEED-cond-2"].setColor(0.0509,0.7529,0.2941);
me["BLEED-cond-3"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-cond-1"].setColor(0.0509,0.7529,0.2941);
me["BLEED-cond-2"].setColor(0.0509,0.7529,0.2941);
me["BLEED-cond-3"].setColor(0.0509,0.7529,0.2941);
}
me.updateBottomStatus();
},
};
var canvas_lowerECAM_elec = {
new: func(canvas_group, file) {
var m = {parents: [canvas_lowerECAM_elec, canvas_lowerECAM_base]};
m.init(canvas_group, file);
return m;
},
getKeys: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit","BAT1-label","Bat1Volt","Bat1Ampere","BAT2-label","Bat2Volt","Bat2Ampere","BAT1-charge","BAT1-discharge","BAT2-charge","BAT2-discharge","ELEC-Line-DC1-DCBAT","ELEC-Line-DC1-DCESS","ELEC-Line-DC2-DCBAT",
"ELEC-Line-DC1-DCESS_DCBAT","ELEC-Line-DC2-DCESS_DCBAT","ELEC-Line-TR1-DC1","ELEC-Line-TR2-DC2","Shed-label","ELEC-Line-ESSTR-DCESS","TR1-label","TR1Volt","TR1Ampere","TR2-label","TR2Volt","TR2Ampere","EMERGEN-group","EmergenVolt","EmergenHz",
"ELEC-Line-Emergen-ESSTR","EMERGEN-Label-off","Emergen-Label","EMERGEN-out","ELEC-Line-ACESS-TRESS","ELEC-Line-AC1-TR1","ELEC-Line-AC2-TR2","ELEC-Line-AC1-ACESS","ELEC-Line-AC2-ACESS","ACESS-SHED","ACESS","AC1-in","AC2-in","ELEC-Line-GEN1-AC1","ELEC-Line-GEN2-AC2",
"ELEC-Line-APU-AC1","ELEC-Line-APU-EXT","ELEC-Line-EXT-AC2","APU-out","EXT-out","EXTPWR-group","ExtVolt","ExtHz","APU-content","APU-border","APUGentext","APUGenLoad","APUGenVolt","APUGenHz","APUGEN-off","GEN1-label","Gen1Load","Gen1Volt","Gen1Hz",
"GEN2-label","Gen2Load","GEN2-off","Gen2Volt","Gen2Hz","ELEC-IDG-1-label","ELEC-IDG-1-num-label","ELEC-IDG-1-Temp","IDG1-LOPR","IDG1-DISC","IDG1-RISE-Value","IDG1-RISE-label","GalleyShed","ELEC-IDG-2-Temp","ELEC-IDG-2-label","ELEC-IDG-2-num-label","IDG2-RISE-label","IDG2-RISE-Value","IDG2-LOPR",
"IDG2-DISC","ESSTR-group","ESSTR","ESSTR-Volt","ESSTR-Ampere","BAT1-content","BAT2-content","BAT1-OFF","BAT2-OFF","GEN1-content","GEN2-content","GEN-1-num-label","GEN-2-num-label","GEN1-off","GEN2-off","GEN1-num-label","GEN2-num-label","EXTPWR-label",
"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"];
},
update: func() {
# BAT1
if (systems.ELEC.Switch.bat1.getValue() == 0) {
@ -1429,41 +780,6 @@ var canvas_lowerECAM_elec = {
}
# hide not yet implemented items
me["IDG1-LOPR"].hide();
me["IDG2-LOPR"].hide();
me["Shed-label"].hide();
me["IDG2-RISE-label"].hide();
me["IDG2-RISE-Value"].hide();
me["IDG1-RISE-label"].hide();
me["IDG1-RISE-Value"].hide();
me.updateBottomStatus();
},
};
var canvas_lowerECAM_eng = {
new: func(canvas_group, file) {
var m = {parents: [canvas_lowerECAM_eng, canvas_lowerECAM_base]};
m.init(canvas_group, file);
return m;
},
getKeys: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit",];
},
update: func() {
# Oil Quantity
# Oil Pressure
# Fuel Used
if (acconfig_weight_kgs.getValue()) {
} else {
}
me.updateBottomStatus();
},
};
};

View file

@ -42,8 +42,8 @@
id="namedview371"
showgrid="true"
inkscape:zoom="0.73868665"
inkscape:cx="272.22904"
inkscape:cy="280.96379"
inkscape:cx="201.82373"
inkscape:cy="930.76571"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -67,8 +67,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-XFEED-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2" />
</g>
<text
xml:space="preserve"
@ -189,8 +190,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-7"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-ENG-1-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-7" />
</g>
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.35079527;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -231,8 +233,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-Ram-Air-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3" />
</g>
<rect
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1.99221587;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -389,8 +392,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3-6-9"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-Pack-1-Flow-Valve-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3-6-9" />
</g>
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.32549167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -421,8 +425,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3-6-9-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-Pack-2-Flow-Valve-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3-6-9-2" />
</g>
<g
id="BLEED-Pack1"
@ -867,8 +872,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-7-7"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-ENG-2-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-7-7" />
</g>
<g
id="BLEED-HP-Valve-2"

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB