2017-07-30 04:41:20 +00:00
|
|
|
# A3XX Upper ECAM Canvas
|
|
|
|
# Joshua Davidson (it0uchpods)
|
|
|
|
|
2017-11-16 19:29:08 +00:00
|
|
|
##############################################
|
|
|
|
# Copyright (c) Joshua Davidson (it0uchpods) #
|
|
|
|
##############################################
|
2017-07-30 04:41:20 +00:00
|
|
|
|
2017-08-01 02:13:46 +00:00
|
|
|
var upperECAM_cfm_eis2 = nil;
|
2017-07-30 04:41:20 +00:00
|
|
|
var upperECAM_iae_eis2 = nil;
|
2017-11-20 22:03:07 +00:00
|
|
|
var upperECAM_test = nil;
|
2017-07-30 04:41:20 +00:00
|
|
|
var upperECAM_display = nil;
|
2017-11-20 22:03:07 +00:00
|
|
|
var elapsedtime = 0;
|
2017-07-30 16:57:23 +00:00
|
|
|
setprop("/engines/engine[0]/fuel-flow_actual", 0);
|
|
|
|
setprop("/engines/engine[1]/fuel-flow_actual", 0);
|
2017-07-30 04:41:20 +00:00
|
|
|
setprop("/ECAM/Upper/EPR[0]", 0);
|
|
|
|
setprop("/ECAM/Upper/EPR[1]", 0);
|
|
|
|
setprop("/ECAM/Upper/EPRthr[0]", 0);
|
2017-07-30 16:57:23 +00:00
|
|
|
setprop("/ECAM/Upper/EPRthr[1]", 0);
|
|
|
|
setprop("/ECAM/Upper/EPRylim", 0);
|
2017-07-30 04:41:20 +00:00
|
|
|
setprop("/ECAM/Upper/EGT[0]", 0);
|
|
|
|
setprop("/ECAM/Upper/EGT[1]", 0);
|
|
|
|
setprop("/ECAM/Upper/N1[0]", 0);
|
|
|
|
setprop("/ECAM/Upper/N1[1]", 0);
|
2017-07-30 16:57:23 +00:00
|
|
|
setprop("/ECAM/Upper/N1thr[0]", 0);
|
|
|
|
setprop("/ECAM/Upper/N1thr[1]", 0);
|
|
|
|
setprop("/ECAM/Upper/N1ylim", 0);
|
2017-11-20 22:03:07 +00:00
|
|
|
setprop("/instrumentation/du/du3-test", 0);
|
|
|
|
setprop("/instrumentation/du/du3-test-time", 0);
|
2017-07-30 04:41:20 +00:00
|
|
|
|
|
|
|
var canvas_upperECAM_base = {
|
|
|
|
init: func(canvas_group, file) {
|
|
|
|
var font_mapper = func(family, weight) {
|
|
|
|
return "LiberationFonts/LiberationSans-Regular.ttf";
|
|
|
|
};
|
|
|
|
|
2017-11-20 22:03:07 +00:00
|
|
|
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
|
2017-07-30 04:41:20 +00:00
|
|
|
|
|
|
|
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() {
|
2017-11-20 22:03:07 +00:00
|
|
|
elapsedtime = getprop("/sim/time/elapsed-sec");
|
|
|
|
if (getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) {
|
2017-11-29 16:14:13 +00:00
|
|
|
if (getprop("/systems/acconfig/autoconfig-running") != 1 and getprop("/instrumentation/du/du3-test") != 1) {
|
2017-11-20 22:03:07 +00:00
|
|
|
setprop("/instrumentation/du/du3-test", 1);
|
|
|
|
setprop("/instrumentation/du/du3-test-time", getprop("/sim/time/elapsed-sec"));
|
2017-11-29 16:14:13 +00:00
|
|
|
} else if (getprop("/systems/acconfig/autoconfig-running") == 1 and getprop("/instrumentation/du/du3-test") != 1) {
|
|
|
|
setprop("/instrumentation/du/du3-test", 1);
|
|
|
|
setprop("/instrumentation/du/du3-test-time", getprop("/sim/time/elapsed-sec") - 35);
|
2017-11-20 22:03:07 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
setprop("/instrumentation/du/du3-test", 0);
|
|
|
|
}
|
|
|
|
|
2017-11-21 20:28:49 +00:00
|
|
|
if ((getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) and getprop("/controls/lighting/DU/du3") > 0) {
|
2017-11-20 22:03:07 +00:00
|
|
|
if (getprop("/instrumentation/du/du3-test-time") + 39 >= elapsedtime) {
|
2017-08-03 23:47:58 +00:00
|
|
|
upperECAM_cfm_eis2.page.hide();
|
2017-11-20 22:03:07 +00:00
|
|
|
upperECAM_iae_eis2.page.hide();
|
|
|
|
upperECAM_test.page.show();
|
|
|
|
} else {
|
|
|
|
upperECAM_test.page.hide();
|
|
|
|
if (getprop("/options/eng") == "CFM") {
|
|
|
|
upperECAM_cfm_eis2.page.show();
|
|
|
|
upperECAM_iae_eis2.page.hide();
|
|
|
|
upperECAM_cfm_eis2.update();
|
|
|
|
} else if (getprop("/options/eng") == "IAE") {
|
|
|
|
upperECAM_cfm_eis2.page.hide();
|
|
|
|
upperECAM_iae_eis2.page.show();
|
|
|
|
upperECAM_iae_eis2.update();
|
|
|
|
}
|
2017-08-01 02:13:46 +00:00
|
|
|
}
|
2017-07-30 04:41:20 +00:00
|
|
|
} else {
|
2017-11-20 22:03:07 +00:00
|
|
|
upperECAM_test.page.hide();
|
2017-08-01 02:13:46 +00:00
|
|
|
upperECAM_cfm_eis2.page.hide();
|
2017-07-30 04:41:20 +00:00
|
|
|
upperECAM_iae_eis2.page.hide();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
updateBase: func() {
|
2017-08-01 02:13:46 +00:00
|
|
|
# Reversers
|
|
|
|
if (getprop("/engines/engine[0]/reverser-pos-norm") >= 0.01 and getprop("/systems/fadec/eng1/n1") == 1 and getprop("/options/eng") == "CFM") {
|
|
|
|
me["REV1"].show();
|
|
|
|
me["REV1-box"].show();
|
|
|
|
} else if (getprop("/engines/engine[0]/reverser-pos-norm") >= 0.01 and getprop("/systems/fadec/eng1/epr") == 1 and getprop("/options/eng") == "IAE") {
|
|
|
|
me["REV1"].show();
|
|
|
|
me["REV1-box"].show();
|
|
|
|
} else {
|
|
|
|
me["REV1"].hide();
|
|
|
|
me["REV1-box"].hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (getprop("/engines/engine[0]/reverser-pos-norm") >= 0.95) {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["REV1"].setColor(0.0509,0.7529,0.2941);
|
2017-08-01 02:13:46 +00:00
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["REV1"].setColor(0.7333,0.3803,0);
|
2017-08-01 02:13:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (getprop("/engines/engine[1]/reverser-pos-norm") >= 0.01 and getprop("/systems/fadec/eng2/n1") == 1 and getprop("/options/eng") == "CFM") {
|
|
|
|
me["REV2"].show();
|
|
|
|
me["REV2-box"].show();
|
|
|
|
} else if (getprop("/engines/engine[1]/reverser-pos-norm") >= 0.01 and getprop("/systems/fadec/eng2/epr") == 1 and getprop("/options/eng") == "IAE") {
|
|
|
|
me["REV2"].show();
|
|
|
|
me["REV2-box"].show();
|
|
|
|
} else {
|
|
|
|
me["REV2"].hide();
|
|
|
|
me["REV2-box"].hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (getprop("/engines/engine[1]/reverser-pos-norm") >= 0.95) {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["REV2"].setColor(0.0509,0.7529,0.2941);
|
2017-08-01 02:13:46 +00:00
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["REV2"].setColor(0.7333,0.3803,0);
|
2017-08-01 02:13:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Flap Indicator
|
|
|
|
me["FlapTxt"].setText(sprintf("%s", getprop("/controls/flight/flap-txt")));
|
|
|
|
|
|
|
|
if (getprop("/controls/flight/flap-pos") > 0) {
|
|
|
|
me["FlapDots"].show();
|
|
|
|
} else {
|
|
|
|
me["FlapDots"].hide();
|
|
|
|
}
|
|
|
|
|
2017-07-30 04:41:20 +00:00
|
|
|
# FOB
|
2017-10-01 03:32:50 +00:00
|
|
|
me["FOB-LBS"].setText(sprintf("%s", math.round(getprop("/consumables/fuel/total-fuel-lbs"), 10)));
|
2017-07-30 04:41:20 +00:00
|
|
|
|
|
|
|
# Left ECAM Messages
|
2017-07-30 17:25:21 +00:00
|
|
|
me["ECAML1"].setText(sprintf("%s", getprop("/ECAM/msg/line1")));
|
|
|
|
me["ECAML2"].setText(sprintf("%s", getprop("/ECAM/msg/line2")));
|
|
|
|
me["ECAML3"].setText(sprintf("%s", getprop("/ECAM/msg/line3")));
|
|
|
|
me["ECAML4"].setText(sprintf("%s", getprop("/ECAM/msg/line4")));
|
|
|
|
me["ECAML5"].setText(sprintf("%s", getprop("/ECAM/msg/line5")));
|
|
|
|
me["ECAML6"].setText(sprintf("%s", getprop("/ECAM/msg/line6")));
|
|
|
|
me["ECAML7"].setText(sprintf("%s", getprop("/ECAM/msg/line7")));
|
|
|
|
me["ECAML8"].setText(sprintf("%s", getprop("/ECAM/msg/line8")));
|
|
|
|
|
|
|
|
if (getprop("/ECAM/msg/line1c") == "w") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML1"].setColor(0.8078,0.8039,0.8078);
|
2017-07-30 17:25:21 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line1c") == "b") {
|
2017-12-09 18:04:57 +00:00
|
|
|
me["ECAML1"].setColor(0.0901,0.6039,0.7176);
|
2017-07-30 17:25:21 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line1c") == "g") {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["ECAML1"].setColor(0.0509,0.7529,0.2941);
|
2017-07-30 17:25:21 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line1c") == "a") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML1"].setColor(0.7333,0.3803,0);
|
2017-07-30 17:25:21 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line1c") == "r") {
|
|
|
|
me["ECAML1"].setColor(1,0,0);
|
|
|
|
}
|
|
|
|
|
2017-08-14 15:29:00 +00:00
|
|
|
if (getprop("/ECAM/msg/line2c") == "w") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML2"].setColor(0.8078,0.8039,0.8078);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line2c") == "b") {
|
2017-12-09 18:04:57 +00:00
|
|
|
me["ECAML2"].setColor(0.0901,0.6039,0.7176);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line2c") == "g") {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["ECAML2"].setColor(0.0509,0.7529,0.2941);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line2c") == "a") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML2"].setColor(0.7333,0.3803,0);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line2c") == "r") {
|
2017-07-30 17:25:21 +00:00
|
|
|
me["ECAML2"].setColor(1,0,0);
|
|
|
|
}
|
|
|
|
|
2017-08-14 15:29:00 +00:00
|
|
|
if (getprop("/ECAM/msg/line3c") == "w") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML3"].setColor(0.8078,0.8039,0.8078);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line3c") == "b") {
|
2017-12-09 18:04:57 +00:00
|
|
|
me["ECAML3"].setColor(0.0901,0.6039,0.7176);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line3c") == "g") {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["ECAML3"].setColor(0.0509,0.7529,0.2941);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line3c") == "a") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML3"].setColor(0.7333,0.3803,0);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line3c") == "r") {
|
2017-07-30 17:25:21 +00:00
|
|
|
me["ECAML3"].setColor(1,0,0);
|
|
|
|
}
|
|
|
|
|
2017-08-14 15:29:00 +00:00
|
|
|
if (getprop("/ECAM/msg/line4c") == "w") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML4"].setColor(0.8078,0.8039,0.8078);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line4c") == "b") {
|
2017-12-09 18:04:57 +00:00
|
|
|
me["ECAML4"].setColor(0.0901,0.6039,0.7176);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line4c") == "g") {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["ECAML4"].setColor(0.0509,0.7529,0.2941);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line4c") == "a") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML4"].setColor(0.7333,0.3803,0);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line4c") == "r") {
|
2017-07-30 17:25:21 +00:00
|
|
|
me["ECAML4"].setColor(1,0,0);
|
|
|
|
}
|
|
|
|
|
2017-08-14 15:29:00 +00:00
|
|
|
if (getprop("/ECAM/msg/line5c") == "w") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML5"].setColor(0.8078,0.8039,0.8078);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line5c") == "b") {
|
2017-12-09 18:04:57 +00:00
|
|
|
me["ECAML5"].setColor(0.0901,0.6039,0.7176);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line5c") == "g") {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["ECAML5"].setColor(0.0509,0.7529,0.2941);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line5c") == "a") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML5"].setColor(0.7333,0.3803,0);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line5c") == "r") {
|
2017-07-30 17:25:21 +00:00
|
|
|
me["ECAML5"].setColor(1,0,0);
|
|
|
|
}
|
|
|
|
|
2017-08-14 15:29:00 +00:00
|
|
|
if (getprop("/ECAM/msg/line6c") == "w") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML6"].setColor(0.8078,0.8039,0.8078);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line6c") == "b") {
|
2017-12-09 18:04:57 +00:00
|
|
|
me["ECAML6"].setColor(0.0901,0.6039,0.7176);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line6c") == "g") {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["ECAML6"].setColor(0.0509,0.7529,0.2941);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line6c") == "a") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML6"].setColor(0.7333,0.3803,0);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line6c") == "r") {
|
2017-07-30 17:25:21 +00:00
|
|
|
me["ECAML6"].setColor(1,0,0);
|
|
|
|
}
|
|
|
|
|
2017-08-14 15:29:00 +00:00
|
|
|
if (getprop("/ECAM/msg/line7c") == "w") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML7"].setColor(0.8078,0.8039,0.8078);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line7c") == "b") {
|
2017-12-09 18:04:57 +00:00
|
|
|
me["ECAML7"].setColor(0.0901,0.6039,0.7176);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line7c") == "g") {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["ECAML7"].setColor(0.0509,0.7529,0.2941);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line7c") == "a") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML7"].setColor(0.7333,0.3803,0);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line7c") == "r") {
|
2017-07-30 17:25:21 +00:00
|
|
|
me["ECAML7"].setColor(1,0,0);
|
|
|
|
}
|
|
|
|
|
2017-08-14 15:29:00 +00:00
|
|
|
if (getprop("/ECAM/msg/line8c") == "w") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML8"].setColor(0.8078,0.8039,0.8078);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line8c") == "b") {
|
2017-12-09 18:04:57 +00:00
|
|
|
me["ECAML8"].setColor(0.0901,0.6039,0.7176);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line8c") == "g") {
|
2017-11-05 03:41:15 +00:00
|
|
|
me["ECAML8"].setColor(0.0509,0.7529,0.2941);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line8c") == "a") {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["ECAML8"].setColor(0.7333,0.3803,0);
|
2017-08-14 15:29:00 +00:00
|
|
|
} else if (getprop("/ECAM/msg/line8c") == "r") {
|
2017-07-30 17:25:21 +00:00
|
|
|
me["ECAML8"].setColor(1,0,0);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (getprop("/ECAM/left-msg") == "MSG") {
|
|
|
|
me["ECAML1"].show();
|
|
|
|
me["ECAML2"].show();
|
|
|
|
me["ECAML3"].show();
|
|
|
|
me["ECAML4"].show();
|
|
|
|
me["ECAML5"].show();
|
|
|
|
me["ECAML6"].show();
|
|
|
|
me["ECAML7"].show();
|
|
|
|
me["ECAML8"].show();
|
|
|
|
} else {
|
|
|
|
me["ECAML1"].hide();
|
|
|
|
me["ECAML2"].hide();
|
|
|
|
me["ECAML3"].hide();
|
|
|
|
me["ECAML4"].hide();
|
|
|
|
me["ECAML5"].hide();
|
|
|
|
me["ECAML6"].hide();
|
|
|
|
me["ECAML7"].hide();
|
|
|
|
me["ECAML8"].hide();
|
|
|
|
}
|
2017-07-30 04:41:20 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2017-08-01 02:13:46 +00:00
|
|
|
var canvas_upperECAM_cfm_eis2 = {
|
2017-07-30 04:41:20 +00:00
|
|
|
new: func(canvas_group, file) {
|
2017-10-19 04:05:42 +00:00
|
|
|
var m = {parents: [canvas_upperECAM_cfm_eis2, canvas_upperECAM_base]};
|
2017-07-30 04:41:20 +00:00
|
|
|
m.init(canvas_group, file);
|
|
|
|
|
|
|
|
return m;
|
|
|
|
},
|
|
|
|
getKeys: func() {
|
2017-11-26 16:33:25 +00:00
|
|
|
return ["N11-needle","N11-thr","N11-ylim","N11","N11-decpnt","N11-decimal","N11-box","N11-scale","N11-scale2","N11-scaletick","N11-scalenum","N11-XX","N11-XX2","N11-XX-box","EGT1-needle","EGT1","EGT1-scale","EGT1-box","EGT1-scale2","EGT1-scaletick",
|
|
|
|
"EGT1-XX","N21","N21-decpnt","N21-decimal","N21-XX","FF1","FF1-XX","N12-needle","N12-thr","N12-ylim","N12","N12-decpnt","N12-decimal","N12-box","N12-scale","N12-scale2","N12-scaletick","N12-scalenum","N12-XX","N12-XX2","N12-XX-box","EGT2-needle","EGT2",
|
2017-11-26 20:52:09 +00:00
|
|
|
"EGT2-scale","EGT2-box","EGT2-scale2","EGT2-scaletick","EGT2-XX","N22","N22-decpnt","N22-decimal","N22-XX","FF2","FF2-XX","FOB-LBS","ECAML1","ECAML2","ECAML3","ECAML4","ECAML5","ECAML6","ECAML7","ECAML8","FlapTxt","FlapDots","N1Lim-mode","N1Lim",
|
|
|
|
"N1Lim-decpnt","N1Lim-decimal","N1Lim-percent","N1Lim-XX","N1Lim-XX2","REV1","REV1-box","REV2","REV2-box"];
|
2017-07-30 04:41:20 +00:00
|
|
|
},
|
|
|
|
update: func() {
|
2017-08-01 02:13:46 +00:00
|
|
|
# N1
|
2017-10-15 18:11:27 +00:00
|
|
|
me["N11"].setText(sprintf("%s", math.floor(getprop("/engines/engine[0]/n1-actual") + 0.05)));
|
|
|
|
me["N11-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[0]/n1-actual") + 0.05,1))));
|
2017-08-01 02:13:46 +00:00
|
|
|
|
2017-10-15 18:11:27 +00:00
|
|
|
me["N12"].setText(sprintf("%s", math.floor(getprop("/engines/engine[1]/n1-actual") + 0.05)));
|
|
|
|
me["N12-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[1]/n1-actual") + 0.05,1))));
|
2017-08-01 02:13:46 +00:00
|
|
|
|
2017-10-30 19:40:48 +00:00
|
|
|
me["N11-needle"].setRotation((getprop("/ECAM/Upper/N1[0]") + 90) * D2R);
|
|
|
|
me["N11-thr"].setRotation((getprop("/ECAM/Upper/N1thr[0]") + 90) * D2R);
|
|
|
|
me["N11-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90) * D2R);
|
2017-08-01 02:13:46 +00:00
|
|
|
|
2017-10-30 19:40:48 +00:00
|
|
|
me["N12-needle"].setRotation((getprop("/ECAM/Upper/N1[1]") + 90) * D2R);
|
|
|
|
me["N12-thr"].setRotation((getprop("/ECAM/Upper/N1thr[1]") + 90) * D2R);
|
|
|
|
me["N12-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90) * D2R);
|
2017-08-01 02:13:46 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/n1") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["N11-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N11-scale2"].setColor(1,0,0);
|
|
|
|
me["N11"].show();
|
|
|
|
me["N11-decimal"].show();
|
|
|
|
me["N11-decpnt"].show();
|
|
|
|
me["N11-needle"].show();
|
|
|
|
me["N11-ylim"].show();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["N11-scaletick"].show();
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N11-scalenum"].show();
|
|
|
|
me["N11-box"].show();
|
|
|
|
me["N11-XX"].hide();
|
|
|
|
me["N11-XX2"].hide();
|
|
|
|
me["N11-XX-box"].hide();
|
2017-07-31 22:13:02 +00:00
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["N11-scale"].setColor(0.7333,0.3803,0);
|
|
|
|
me["N11-scale2"].setColor(0.7333,0.3803,0);
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N11"].hide();
|
|
|
|
me["N11-decimal"].hide();
|
|
|
|
me["N11-decpnt"].hide();
|
|
|
|
me["N11-needle"].hide();
|
|
|
|
me["N11-ylim"].hide();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["N11-scaletick"].hide();
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N11-scalenum"].hide();
|
|
|
|
me["N11-box"].hide();
|
|
|
|
me["N11-XX"].show();
|
|
|
|
me["N11-XX2"].show();
|
|
|
|
me["N11-XX-box"].show();
|
2017-07-31 22:13:02 +00:00
|
|
|
}
|
|
|
|
|
2017-08-01 02:13:46 +00:00
|
|
|
if (getprop("/engines/engine[0]/reverser-pos-norm") < 0.01 and getprop("/systems/fadec/eng1/n1") == 1) {
|
|
|
|
me["N11-thr"].show();
|
2017-07-31 22:13:02 +00:00
|
|
|
} else {
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N11-thr"].hide();
|
2017-07-31 22:13:02 +00:00
|
|
|
}
|
|
|
|
|
2017-08-01 02:13:46 +00:00
|
|
|
if (getprop("/systems/fadec/eng2/n1") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["N12-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N12-scale2"].setColor(1,0,0);
|
|
|
|
me["N12"].show();
|
|
|
|
me["N12-decimal"].show();
|
|
|
|
me["N12-decpnt"].show();
|
|
|
|
me["N12-needle"].show();
|
|
|
|
me["N12-ylim"].show();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["N12-scaletick"].show();
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N12-scalenum"].show();
|
|
|
|
me["N12-box"].show();
|
|
|
|
me["N12-XX"].hide();
|
|
|
|
me["N12-XX2"].hide();
|
|
|
|
me["N12-XX-box"].hide();
|
2017-07-31 22:13:02 +00:00
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["N12-scale"].setColor(0.7333,0.3803,0);
|
|
|
|
me["N12-scale2"].setColor(0.7333,0.3803,0);
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N12"].hide();
|
|
|
|
me["N12-decimal"].hide();
|
|
|
|
me["N12-decpnt"].hide();
|
|
|
|
me["N12-needle"].hide();
|
|
|
|
me["N12-ylim"].hide();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["N12-scaletick"].hide();
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N12-scalenum"].hide();
|
|
|
|
me["N12-box"].hide();
|
|
|
|
me["N12-XX"].show();
|
|
|
|
me["N12-XX2"].show();
|
|
|
|
me["N12-XX-box"].show();
|
2017-07-31 22:13:02 +00:00
|
|
|
}
|
|
|
|
|
2017-08-01 02:13:46 +00:00
|
|
|
if (getprop("/engines/engine[1]/reverser-pos-norm") < 0.01 and getprop("/systems/fadec/eng2/n1") == 1) {
|
|
|
|
me["N12-thr"].show();
|
2017-07-31 22:13:02 +00:00
|
|
|
} else {
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N12-thr"].hide();
|
2017-07-31 22:13:02 +00:00
|
|
|
}
|
|
|
|
|
2017-08-01 02:13:46 +00:00
|
|
|
# EGT
|
|
|
|
me["EGT1"].setText(sprintf("%s", math.round(getprop("/engines/engine[0]/egt-actual"))));
|
|
|
|
me["EGT2"].setText(sprintf("%s", math.round(getprop("/engines/engine[1]/egt-actual"))));
|
|
|
|
|
2017-10-30 19:40:48 +00:00
|
|
|
me["EGT1-needle"].setRotation((getprop("/ECAM/Upper/EGT[0]") + 90) * D2R);
|
|
|
|
me["EGT2-needle"].setRotation((getprop("/ECAM/Upper/EGT[1]") + 90) * D2R);
|
2017-08-01 02:13:46 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/egt") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EGT1-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-08-01 02:13:46 +00:00
|
|
|
me["EGT1-scale2"].setColor(1,0,0);
|
|
|
|
me["EGT1"].show();
|
|
|
|
me["EGT1-needle"].show();
|
|
|
|
me["EGT1-scaletick"].show();
|
|
|
|
me["EGT1-box"].show();
|
|
|
|
me["EGT1-XX"].hide();
|
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EGT1-scale"].setColor(0.7333,0.3803,0);
|
|
|
|
me["EGT1-scale2"].setColor(0.7333,0.3803,0);
|
2017-08-01 02:13:46 +00:00
|
|
|
me["EGT1"].hide();
|
|
|
|
me["EGT1-needle"].hide();
|
|
|
|
me["EGT1-scaletick"].hide();
|
|
|
|
me["EGT1-box"].hide();
|
|
|
|
me["EGT1-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng2/egt") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EGT2-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-08-01 02:13:46 +00:00
|
|
|
me["EGT2-scale2"].setColor(1,0,0);
|
|
|
|
me["EGT2"].show();
|
|
|
|
me["EGT2-needle"].show();
|
|
|
|
me["EGT2-scaletick"].show();
|
|
|
|
me["EGT2-box"].show();
|
|
|
|
me["EGT2-XX"].hide();
|
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EGT2-scale"].setColor(0.7333,0.3803,0);
|
|
|
|
me["EGT2-scale2"].setColor(0.7333,0.3803,0);
|
2017-08-01 02:13:46 +00:00
|
|
|
me["EGT2"].hide();
|
|
|
|
me["EGT2-needle"].hide();
|
|
|
|
me["EGT2-scaletick"].hide();
|
|
|
|
me["EGT2-box"].hide();
|
|
|
|
me["EGT2-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
# N2
|
2017-10-15 18:11:27 +00:00
|
|
|
me["N21"].setText(sprintf("%s", math.floor(getprop("/engines/engine[0]/n2-actual") + 0.05)));
|
|
|
|
me["N21-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[0]/n2-actual") + 0.05,1))));
|
|
|
|
me["N22"].setText(sprintf("%s", math.floor(getprop("/engines/engine[1]/n2-actual") + 0.05)));
|
|
|
|
me["N22-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[1]/n2-actual") + 0.05,1))));
|
2017-08-01 02:13:46 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/n2") == 1) {
|
|
|
|
me["N21"].show();
|
|
|
|
me["N21-decimal"].show();
|
|
|
|
me["N21-decpnt"].show();
|
|
|
|
me["N21-XX"].hide();
|
|
|
|
} else {
|
|
|
|
me["N21"].hide();
|
|
|
|
me["N21-decimal"].hide();
|
|
|
|
me["N21-decpnt"].hide();
|
|
|
|
me["N21-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng2/n2") == 1) {
|
|
|
|
me["N22"].show();
|
|
|
|
me["N22-decimal"].show();
|
|
|
|
me["N22-decpnt"].show();
|
|
|
|
me["N22-XX"].hide();
|
|
|
|
} else {
|
|
|
|
me["N22"].hide();
|
|
|
|
me["N22-decimal"].hide();
|
|
|
|
me["N22-decpnt"].hide();
|
|
|
|
me["N22-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
# FF
|
2017-10-01 03:29:32 +00:00
|
|
|
me["FF1"].setText(sprintf("%s", math.round(getprop("/engines/engine[0]/fuel-flow_actual"), 10)));
|
|
|
|
me["FF2"].setText(sprintf("%s", math.round(getprop("/engines/engine[1]/fuel-flow_actual"), 10)));
|
2017-08-01 02:13:46 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/ff") == 1) {
|
|
|
|
me["FF1"].show();
|
|
|
|
me["FF1-XX"].hide();
|
|
|
|
} else {
|
|
|
|
me["FF1"].hide();
|
|
|
|
me["FF1-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng2/ff") == 1) {
|
|
|
|
me["FF2"].show();
|
|
|
|
me["FF2-XX"].hide();
|
|
|
|
} else {
|
|
|
|
me["FF2"].hide();
|
|
|
|
me["FF2-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
# N1 Limit
|
|
|
|
me["N1Lim-mode"].setText(sprintf("%s", getprop("/controls/engines/thrust-limit")));
|
|
|
|
me["N1Lim"].setText(sprintf("%s", math.floor(getprop("/controls/engines/n1-limit") + 0.05)));
|
|
|
|
me["N1Lim-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/controls/engines/n1-limit") + 0.05,1))));
|
|
|
|
|
|
|
|
if (getprop("/systems/fadec/powered1") == 1 or getprop("/systems/fadec/powered2") == 1) {
|
|
|
|
me["N1Lim-mode"].show();
|
2017-12-01 23:19:15 +00:00
|
|
|
me["N1Lim-XX"].hide();
|
|
|
|
me["N1Lim-XX2"].hide();
|
|
|
|
} else {
|
|
|
|
me["N1Lim-mode"].hide();
|
|
|
|
me["N1Lim-XX"].show();
|
|
|
|
me["N1Lim-XX2"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((getprop("/systems/fadec/powered1") == 1 or getprop("/systems/fadec/powered2") == 1) and getprop("/controls/engines/thrust-limit") != "MREV") {
|
2017-08-01 02:13:46 +00:00
|
|
|
me["N1Lim"].show();
|
|
|
|
me["N1Lim-decpnt"].show();
|
|
|
|
me["N1Lim-decimal"].show();
|
2017-08-01 14:43:52 +00:00
|
|
|
me["N1Lim-percent"].show();
|
2017-08-01 02:13:46 +00:00
|
|
|
} else {
|
|
|
|
me["N1Lim"].hide();
|
|
|
|
me["N1Lim-decpnt"].hide();
|
|
|
|
me["N1Lim-decimal"].hide();
|
2017-08-01 14:43:52 +00:00
|
|
|
me["N1Lim-percent"].hide();
|
2017-08-01 02:13:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
me.updateBase();
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
var canvas_upperECAM_iae_eis2 = {
|
|
|
|
new: func(canvas_group, file) {
|
2017-10-19 04:05:42 +00:00
|
|
|
var m = {parents: [canvas_upperECAM_iae_eis2, canvas_upperECAM_base]};
|
2017-08-01 02:13:46 +00:00
|
|
|
m.init(canvas_group, file);
|
|
|
|
|
|
|
|
return m;
|
|
|
|
},
|
|
|
|
getKeys: func() {
|
2017-11-26 20:52:09 +00:00
|
|
|
return ["EPR1-needle","EPR1-thr","EPR1-ylim","EPR1","EPR1-decpnt","EPR1-decimal","EPR1-box","EPR1-scale","EPR1-scaletick","EPR1-scalenum","EPR1-XX","EPR1-XX2","EGT1-needle","EGT1","EGT1-scale","EGT1-box","EGT1-scale2","EGT1-scaletick","EGT1-XX",
|
|
|
|
"N11-needle","N11-thr","N11-ylim","N11","N11-decpnt","N11-decimal","N11-scale","N11-scale2","N11-scaletick","N11-scalenum","N11-XX","N21","N21-decpnt","N21-decimal","N21-XX","FF1","FF1-XX","EPR2-needle","EPR2-thr","EPR2-ylim","EPR2","EPR2-decpnt",
|
|
|
|
"EPR2-decimal","EPR2-box","EPR2-scale","EPR2-scaletick","EPR2-scalenum","EPR2-XX","EPR2-XX2","EGT2-needle","EGT2","EGT2-scale","EGT2-scale2","EGT2-box","EGT2-scaletick","EGT2-XX","N12-needle","N12-thr","N12-ylim","N12","N12-decpnt","N12-decimal",
|
|
|
|
"N12-scale","N12-scale2","N12-scaletick","N12-scalenum","N12-XX","N22","N22-decpnt","N22-decimal","N22-XX","FF2","FF2-XX","FOB-LBS","ECAML1","ECAML2","ECAML3","ECAML4","ECAML5","ECAML6","ECAML7","ECAML8","FlapTxt","FlapDots","EPRLim-mode","EPRLim",
|
|
|
|
"EPRLim-decpnt","EPRLim-decimal","EPRLim-XX","EPRLim-XX2","REV1","REV1-box","REV2","REV2-box"];
|
2017-08-01 02:13:46 +00:00
|
|
|
},
|
|
|
|
update: func() {
|
2017-07-30 16:57:23 +00:00
|
|
|
# EPR
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPR1"].setText(sprintf("%1.0f", math.floor(getprop("/engines/engine[0]/epr-actual"))));
|
|
|
|
me["EPR1-decimal"].setText(sprintf("%03d", (getprop("/engines/engine[0]/epr-actual") - int(getprop("/engines/engine[0]/epr-actual"))) * 1000));
|
|
|
|
me["EPR2"].setText(sprintf("%1.0f", math.floor(getprop("/engines/engine[1]/epr-actual"))));
|
|
|
|
me["EPR2-decimal"].setText(sprintf("%03d", (getprop("/engines/engine[1]/epr-actual") - int(getprop("/engines/engine[1]/epr-actual"))) * 1000));
|
2017-07-30 04:41:20 +00:00
|
|
|
|
2017-10-30 19:40:48 +00:00
|
|
|
me["EPR1-needle"].setRotation((getprop("/ECAM/Upper/EPR[0]") + 90) * D2R);
|
|
|
|
me["EPR1-thr"].setRotation((getprop("/ECAM/Upper/EPRthr[0]") + 90) * D2R);
|
|
|
|
me["EPR1-ylim"].setRotation((getprop("/ECAM/Upper/EPRylim") + 90) * D2R);
|
|
|
|
me["EPR2-needle"].setRotation((getprop("/ECAM/Upper/EPR[1]") + 90) * D2R);
|
|
|
|
me["EPR2-thr"].setRotation((getprop("/ECAM/Upper/EPRthr[1]") + 90) * D2R);
|
|
|
|
me["EPR2-ylim"].setRotation((getprop("/ECAM/Upper/EPRylim") + 90) * D2R);
|
2017-07-30 04:41:20 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/epr") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EPR1-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-07-30 04:41:20 +00:00
|
|
|
me["EPR1"].show();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPR1-decpnt"].show();
|
|
|
|
me["EPR1-decimal"].show();
|
2017-07-30 04:41:20 +00:00
|
|
|
me["EPR1-needle"].show();
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EPR1-ylim"].show();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPR1-scaletick"].show();
|
2017-07-30 04:41:20 +00:00
|
|
|
me["EPR1-scalenum"].show();
|
|
|
|
me["EPR1-box"].show();
|
|
|
|
me["EPR1-XX"].hide();
|
|
|
|
me["EPR1-XX2"].hide();
|
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EPR1-scale"].setColor(0.7333,0.3803,0);
|
2017-07-30 04:41:20 +00:00
|
|
|
me["EPR1"].hide();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPR1-decpnt"].hide();
|
|
|
|
me["EPR1-decimal"].hide();
|
2017-07-30 04:41:20 +00:00
|
|
|
me["EPR1-needle"].hide();
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EPR1-ylim"].hide();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPR1-scaletick"].hide();
|
2017-07-30 04:41:20 +00:00
|
|
|
me["EPR1-scalenum"].hide();
|
|
|
|
me["EPR1-box"].hide();
|
|
|
|
me["EPR1-XX"].show();
|
|
|
|
me["EPR1-XX2"].show();
|
|
|
|
}
|
|
|
|
|
2017-07-31 22:13:02 +00:00
|
|
|
if (getprop("/engines/engine[0]/reverser-pos-norm") < 0.01 and getprop("/systems/fadec/eng1/epr") == 1) {
|
|
|
|
me["EPR1-thr"].show();
|
|
|
|
} else {
|
|
|
|
me["EPR1-thr"].hide();
|
|
|
|
}
|
|
|
|
|
2017-07-30 16:57:23 +00:00
|
|
|
if (getprop("/systems/fadec/eng2/epr") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EPR2-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EPR2"].show();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPR2-decpnt"].show();
|
|
|
|
me["EPR2-decimal"].show();
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EPR2-needle"].show();
|
|
|
|
me["EPR2-ylim"].show();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPR2-scaletick"].show();
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EPR2-scalenum"].show();
|
|
|
|
me["EPR2-box"].show();
|
|
|
|
me["EPR2-XX"].hide();
|
|
|
|
me["EPR2-XX2"].hide();
|
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EPR2-scale"].setColor(0.7333,0.3803,0);
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EPR2"].hide();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPR2-decpnt"].hide();
|
|
|
|
me["EPR2-decimal"].hide();
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EPR2-needle"].hide();
|
|
|
|
me["EPR2-ylim"].hide();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPR2-scaletick"].hide();
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EPR2-scalenum"].hide();
|
|
|
|
me["EPR2-box"].hide();
|
|
|
|
me["EPR2-XX"].show();
|
|
|
|
me["EPR2-XX2"].show();
|
|
|
|
}
|
|
|
|
|
2017-07-31 22:13:02 +00:00
|
|
|
if (getprop("/engines/engine[1]/reverser-pos-norm") < 0.01 and getprop("/systems/fadec/eng2/epr") == 1) {
|
|
|
|
me["EPR2-thr"].show();
|
|
|
|
} else {
|
|
|
|
me["EPR2-thr"].hide();
|
|
|
|
}
|
|
|
|
|
2017-07-30 16:57:23 +00:00
|
|
|
# EGT
|
2017-07-30 04:41:20 +00:00
|
|
|
me["EGT1"].setText(sprintf("%s", math.round(getprop("/engines/engine[0]/egt-actual"))));
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EGT2"].setText(sprintf("%s", math.round(getprop("/engines/engine[1]/egt-actual"))));
|
2017-07-30 04:41:20 +00:00
|
|
|
|
2017-10-30 19:40:48 +00:00
|
|
|
me["EGT1-needle"].setRotation((getprop("/ECAM/Upper/EGT[0]") + 90) * D2R);
|
|
|
|
me["EGT2-needle"].setRotation((getprop("/ECAM/Upper/EGT[1]") + 90) * D2R);
|
2017-07-30 04:41:20 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/egt") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EGT1-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-07-30 04:41:20 +00:00
|
|
|
me["EGT1-scale2"].setColor(1,0,0);
|
|
|
|
me["EGT1"].show();
|
|
|
|
me["EGT1-needle"].show();
|
|
|
|
me["EGT1-scaletick"].show();
|
|
|
|
me["EGT1-box"].show();
|
|
|
|
me["EGT1-XX"].hide();
|
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EGT1-scale"].setColor(0.7333,0.3803,0);
|
|
|
|
me["EGT1-scale2"].setColor(0.7333,0.3803,0);
|
2017-07-30 04:41:20 +00:00
|
|
|
me["EGT1"].hide();
|
|
|
|
me["EGT1-needle"].hide();
|
|
|
|
me["EGT1-scaletick"].hide();
|
|
|
|
me["EGT1-box"].hide();
|
|
|
|
me["EGT1-XX"].show();
|
|
|
|
}
|
|
|
|
|
2017-07-30 16:57:23 +00:00
|
|
|
if (getprop("/systems/fadec/eng2/egt") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EGT2-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EGT2-scale2"].setColor(1,0,0);
|
|
|
|
me["EGT2"].show();
|
|
|
|
me["EGT2-needle"].show();
|
|
|
|
me["EGT2-scaletick"].show();
|
|
|
|
me["EGT2-box"].show();
|
|
|
|
me["EGT2-XX"].hide();
|
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["EGT2-scale"].setColor(0.7333,0.3803,0);
|
|
|
|
me["EGT2-scale2"].setColor(0.7333,0.3803,0);
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EGT2"].hide();
|
|
|
|
me["EGT2-needle"].hide();
|
|
|
|
me["EGT2-scaletick"].hide();
|
|
|
|
me["EGT2-box"].hide();
|
|
|
|
me["EGT2-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
# N1
|
2017-10-15 18:11:27 +00:00
|
|
|
me["N11"].setText(sprintf("%s", math.floor(getprop("/engines/engine[0]/n1-actual") + 0.05)));
|
|
|
|
me["N11-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[0]/n1-actual") + 0.05,1))));
|
2017-07-30 04:41:20 +00:00
|
|
|
|
2017-10-15 18:11:27 +00:00
|
|
|
me["N12"].setText(sprintf("%s", math.floor(getprop("/engines/engine[1]/n1-actual") + 0.05)));
|
|
|
|
me["N12-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[1]/n1-actual") + 0.05,1))));
|
2017-07-30 16:57:23 +00:00
|
|
|
|
2017-10-30 19:40:48 +00:00
|
|
|
me["N11-needle"].setRotation((getprop("/ECAM/Upper/N1[0]") + 90) * D2R);
|
|
|
|
me["N11-thr"].setRotation((getprop("/ECAM/Upper/N1thr[0]") + 90) * D2R);
|
|
|
|
me["N11-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90) * D2R);
|
2017-07-30 16:57:23 +00:00
|
|
|
|
2017-10-30 19:40:48 +00:00
|
|
|
me["N12-needle"].setRotation((getprop("/ECAM/Upper/N1[1]") + 90) * D2R);
|
|
|
|
me["N12-thr"].setRotation((getprop("/ECAM/Upper/N1thr[1]") + 90) * D2R);
|
|
|
|
me["N12-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90) * D2R);
|
2017-07-30 04:41:20 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/n1") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["N11-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-07-30 04:41:20 +00:00
|
|
|
me["N11-scale2"].setColor(1,0,0);
|
|
|
|
me["N11"].show();
|
|
|
|
me["N11-decimal"].show();
|
|
|
|
me["N11-decpnt"].show();
|
|
|
|
me["N11-needle"].show();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["N11-scaletick"].show();
|
2017-07-30 04:41:20 +00:00
|
|
|
me["N11-scalenum"].show();
|
|
|
|
me["N11-XX"].hide();
|
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["N11-scale"].setColor(0.7333,0.3803,0);
|
|
|
|
me["N11-scale2"].setColor(0.7333,0.3803,0);
|
2017-07-30 04:41:20 +00:00
|
|
|
me["N11"].hide();
|
|
|
|
me["N11-decimal"].hide();
|
|
|
|
me["N11-decpnt"].hide();
|
|
|
|
me["N11-needle"].hide();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["N11-scaletick"].hide();
|
2017-07-30 04:41:20 +00:00
|
|
|
me["N11-scalenum"].hide();
|
|
|
|
me["N11-XX"].show();
|
|
|
|
}
|
|
|
|
|
2017-07-30 16:57:23 +00:00
|
|
|
if (getprop("/systems/fadec/eng2/n1") == 1) {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["N12-scale"].setColor(0.8078,0.8039,0.8078);
|
2017-07-30 16:57:23 +00:00
|
|
|
me["N12-scale2"].setColor(1,0,0);
|
|
|
|
me["N12"].show();
|
|
|
|
me["N12-decimal"].show();
|
|
|
|
me["N12-decpnt"].show();
|
|
|
|
me["N12-needle"].show();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["N12-scaletick"].show();
|
2017-07-30 16:57:23 +00:00
|
|
|
me["N12-scalenum"].show();
|
|
|
|
me["N12-XX"].hide();
|
|
|
|
} else {
|
2017-10-18 21:39:52 +00:00
|
|
|
me["N12-scale"].setColor(0.7333,0.3803,0);
|
|
|
|
me["N12-scale2"].setColor(0.7333,0.3803,0);
|
2017-07-30 16:57:23 +00:00
|
|
|
me["N12"].hide();
|
|
|
|
me["N12-decimal"].hide();
|
|
|
|
me["N12-decpnt"].hide();
|
|
|
|
me["N12-needle"].hide();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["N12-scaletick"].hide();
|
2017-07-30 16:57:23 +00:00
|
|
|
me["N12-scalenum"].hide();
|
|
|
|
me["N12-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/n1") == 1 and getprop("/systems/fadec/n1mode1") == 1) {
|
|
|
|
me["N11-thr"].show();
|
|
|
|
me["N11-ylim"].hide(); # Keep it hidden, since N1 mode limit calculation is not done yet
|
|
|
|
} else {
|
|
|
|
me["N11-thr"].hide();
|
|
|
|
me["N11-ylim"].hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/n2") == 1 and getprop("/systems/fadec/n1mode2") == 1) {
|
|
|
|
me["N12-thr"].show();
|
|
|
|
me["N12-ylim"].hide(); # Keep it hidden, since N1 mode limit calculation is not done yet
|
|
|
|
} else {
|
|
|
|
me["N12-thr"].hide();
|
|
|
|
me["N12-ylim"].hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
# N2
|
2017-10-15 18:11:27 +00:00
|
|
|
me["N21"].setText(sprintf("%s", math.floor(getprop("/engines/engine[0]/n2-actual") + 0.05)));
|
|
|
|
me["N21-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[0]/n2-actual") + 0.05,1))));
|
|
|
|
me["N22"].setText(sprintf("%s", math.floor(getprop("/engines/engine[1]/n2-actual") + 0.05)));
|
|
|
|
me["N22-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[1]/n2-actual") + 0.05,1))));
|
2017-07-30 04:41:20 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/n2") == 1) {
|
|
|
|
me["N21"].show();
|
|
|
|
me["N21-decimal"].show();
|
|
|
|
me["N21-decpnt"].show();
|
|
|
|
me["N21-XX"].hide();
|
|
|
|
} else {
|
|
|
|
me["N21"].hide();
|
|
|
|
me["N21-decimal"].hide();
|
|
|
|
me["N21-decpnt"].hide();
|
|
|
|
me["N21-XX"].show();
|
|
|
|
}
|
|
|
|
|
2017-07-30 16:57:23 +00:00
|
|
|
if (getprop("/systems/fadec/eng2/n2") == 1) {
|
|
|
|
me["N22"].show();
|
|
|
|
me["N22-decimal"].show();
|
|
|
|
me["N22-decpnt"].show();
|
|
|
|
me["N22-XX"].hide();
|
|
|
|
} else {
|
|
|
|
me["N22"].hide();
|
|
|
|
me["N22-decimal"].hide();
|
|
|
|
me["N22-decpnt"].hide();
|
|
|
|
me["N22-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
# FF
|
2017-10-01 03:29:32 +00:00
|
|
|
me["FF1"].setText(sprintf("%s", math.round(getprop("/engines/engine[0]/fuel-flow_actual"), 10)));
|
|
|
|
me["FF2"].setText(sprintf("%s", math.round(getprop("/engines/engine[1]/fuel-flow_actual"), 10)));
|
2017-07-30 04:41:20 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/eng1/ff") == 1) {
|
|
|
|
me["FF1"].show();
|
|
|
|
me["FF1-XX"].hide();
|
|
|
|
} else {
|
|
|
|
me["FF1"].hide();
|
|
|
|
me["FF1-XX"].show();
|
|
|
|
}
|
|
|
|
|
2017-07-30 16:57:23 +00:00
|
|
|
if (getprop("/systems/fadec/eng2/ff") == 1) {
|
|
|
|
me["FF2"].show();
|
|
|
|
me["FF2-XX"].hide();
|
|
|
|
} else {
|
|
|
|
me["FF2"].hide();
|
|
|
|
me["FF2-XX"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
# EPR Limit
|
|
|
|
me["EPRLim-mode"].setText(sprintf("%s", getprop("/controls/engines/thrust-limit")));
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPRLim"].setText(sprintf("%1.0f", math.floor(getprop("/controls/engines/epr-limit"))));
|
|
|
|
me["EPRLim-decimal"].setText(sprintf("%03d", (getprop("/controls/engines/epr-limit") - int(getprop("/controls/engines/epr-limit"))) * 1000));
|
2017-07-30 16:57:23 +00:00
|
|
|
|
|
|
|
if (getprop("/systems/fadec/powered1") == 1 or getprop("/systems/fadec/powered2") == 1) {
|
|
|
|
me["EPRLim-mode"].show();
|
|
|
|
me["EPRLim-XX"].hide();
|
|
|
|
me["EPRLim-XX2"].hide();
|
|
|
|
} else {
|
|
|
|
me["EPRLim-mode"].hide();
|
2017-12-01 23:19:15 +00:00
|
|
|
me["EPRLim-XX"].show();
|
|
|
|
me["EPRLim-XX2"].show();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((getprop("/systems/fadec/powered1") == 1 or getprop("/systems/fadec/powered2") == 1) and getprop("/controls/engines/thrust-limit") != "MREV") {
|
|
|
|
me["EPRLim"].show();
|
|
|
|
me["EPRLim-decpnt"].show();
|
|
|
|
me["EPRLim-decimal"].show();
|
|
|
|
} else {
|
2017-07-30 16:57:23 +00:00
|
|
|
me["EPRLim"].hide();
|
2017-11-26 20:52:09 +00:00
|
|
|
me["EPRLim-decpnt"].hide();
|
|
|
|
me["EPRLim-decimal"].hide();
|
2017-07-30 16:57:23 +00:00
|
|
|
}
|
|
|
|
|
2017-07-30 04:41:20 +00:00
|
|
|
me.updateBase();
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2017-11-20 22:03:07 +00:00
|
|
|
var canvas_upperECAM_test = {
|
|
|
|
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});
|
|
|
|
|
|
|
|
me.page = canvas_group;
|
|
|
|
|
|
|
|
return me;
|
|
|
|
},
|
|
|
|
new: func(canvas_group, file) {
|
|
|
|
var m = {parents: [canvas_upperECAM_test]};
|
|
|
|
m.init(canvas_group, file);
|
|
|
|
|
|
|
|
return m;
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2017-07-30 04:41:20 +00:00
|
|
|
setlistener("sim/signals/fdm-initialized", func {
|
|
|
|
upperECAM_display = canvas.new({
|
|
|
|
"name": "upperECAM",
|
|
|
|
"size": [1024, 1024],
|
|
|
|
"view": [1024, 1024],
|
|
|
|
"mipmapping": 1
|
|
|
|
});
|
|
|
|
upperECAM_display.addPlacement({"node": "uecam.screen"});
|
2017-08-01 02:13:46 +00:00
|
|
|
var group_cfm_eis2 = upperECAM_display.createGroup();
|
2017-07-30 04:41:20 +00:00
|
|
|
var group_iae_eis2 = upperECAM_display.createGroup();
|
2017-11-20 22:03:07 +00:00
|
|
|
var group_test = upperECAM_display.createGroup();
|
2017-07-30 04:41:20 +00:00
|
|
|
|
2017-09-17 17:11:35 +00:00
|
|
|
upperECAM_cfm_eis2 = canvas_upperECAM_cfm_eis2.new(group_cfm_eis2, "Aircraft/IDG-A32X/Models/Instruments/Upper-ECAM/res/cfm-eis2.svg");
|
|
|
|
upperECAM_iae_eis2 = canvas_upperECAM_iae_eis2.new(group_iae_eis2, "Aircraft/IDG-A32X/Models/Instruments/Upper-ECAM/res/iae-eis2.svg");
|
2017-11-20 22:03:07 +00:00
|
|
|
upperECAM_test = canvas_upperECAM_test.new(group_test, "Aircraft/IDG-A32X/Models/Instruments/Common/res/du-test.svg");
|
2017-09-24 14:11:49 +00:00
|
|
|
|
|
|
|
upperECAM_update.start();
|
|
|
|
});
|
2017-07-30 04:41:20 +00:00
|
|
|
|
2017-09-24 14:11:49 +00:00
|
|
|
var upperECAM_update = maketimer(0.05, func {
|
2017-07-30 04:41:20 +00:00
|
|
|
canvas_upperECAM_base.update();
|
|
|
|
});
|
|
|
|
|
|
|
|
var showUpperECAM = func {
|
|
|
|
var dlg = canvas.Window.new([512, 512], "dialog").set("resize", 1);
|
|
|
|
dlg.setCanvas(upperECAM_display);
|
|
|
|
}
|