A3XX: Canvas ECAM Performance Improvements
This commit is contained in:
parent
6b367dc7bc
commit
58d17501f2
4 changed files with 35 additions and 29 deletions
|
@ -71,14 +71,17 @@ var canvas_lowerECAM_base = {
|
|||
lowerECAM_eng1.page.hide();
|
||||
lowerECAM_eng.page.hide();
|
||||
lowerECAM_fctl.page.hide();
|
||||
lowerECAM_apu.update();
|
||||
} else if (page == "eng") {
|
||||
lowerECAM_apu.page.hide();
|
||||
if (getprop("/options/EIS2") == 1) {
|
||||
lowerECAM_eng1.page.hide();
|
||||
lowerECAM_eng.page.show();
|
||||
lowerECAM_eng.update();
|
||||
} else {
|
||||
lowerECAM_eng1.page.show();
|
||||
lowerECAM_eng.page.hide();
|
||||
lowerECAM_eng1.update();
|
||||
}
|
||||
lowerECAM_fctl.page.hide();
|
||||
} else if (page == "fctl") {
|
||||
|
@ -86,6 +89,7 @@ var canvas_lowerECAM_base = {
|
|||
lowerECAM_eng.page.hide();
|
||||
lowerECAM_apu.page.hide();
|
||||
lowerECAM_fctl.page.show();
|
||||
lowerECAM_fctl.update();
|
||||
} else {
|
||||
lowerECAM_apu.page.hide();
|
||||
lowerECAM_eng1.page.hide();
|
||||
|
@ -98,8 +102,6 @@ var canvas_lowerECAM_base = {
|
|||
lowerECAM_eng.page.hide();
|
||||
lowerECAM_fctl.page.hide();
|
||||
}
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
updateBottomStatus: func() {
|
||||
me["TAT"].setText(sprintf("%s", math.round(getprop("/environment/temperature-degc"))));
|
||||
|
@ -225,8 +227,6 @@ var canvas_lowerECAM_apu = {
|
|||
me["APUEGT-needle"].setRotation((getprop("/ECAM/Lower/APU-EGT") + 90)*D2R);
|
||||
|
||||
me.updateBottomStatus();
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -274,8 +274,6 @@ var canvas_lowerECAM_eng1 = {
|
|||
me["OilPSI2-needle"].setRotation((getprop("/ECAM/Lower/Oil-PSI[1]") + 90)*D2R);
|
||||
|
||||
me.updateBottomStatus();
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -323,8 +321,6 @@ var canvas_lowerECAM_eng = {
|
|||
me["OilPSI2-needle"].setRotation((getprop("/ECAM/Lower/Oil-PSI[1]") + 90)*D2R);
|
||||
|
||||
me.updateBottomStatus();
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -712,8 +708,6 @@ var canvas_lowerECAM_fctl = {
|
|||
}
|
||||
|
||||
me.updateBottomStatus();
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -734,11 +728,11 @@ setlistener("sim/signals/fdm-initialized", func {
|
|||
lowerECAM_eng1 = canvas_lowerECAM_eng1.new(groupEng1, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/eng-eis1.svg");
|
||||
lowerECAM_eng = canvas_lowerECAM_eng.new(groupEng, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/eng-eis2.svg");
|
||||
lowerECAM_fctl = canvas_lowerECAM_fctl.new(groupFctl, "Aircraft/IDG-A32X/Models/Instruments/Lower-ECAM/res/fctl.svg");
|
||||
|
||||
lowerECAM_update.start();
|
||||
});
|
||||
|
||||
lowerECAM_apu.update();
|
||||
lowerECAM_eng1.update();
|
||||
lowerECAM_eng.update();
|
||||
lowerECAM_fctl.update();
|
||||
var lowerECAM_update = maketimer(0.05, func {
|
||||
canvas_lowerECAM_base.update();
|
||||
});
|
||||
|
||||
|
|
|
@ -56,21 +56,25 @@ var canvas_upperECAM_base = {
|
|||
upperECAM_cfm_eis2.page.hide();
|
||||
upperECAM_iae_eis1.page.hide();
|
||||
upperECAM_iae_eis2.page.hide();
|
||||
upperECAM_cfm_eis1.update();
|
||||
} else if (getprop("/options/eng") == "CFM" and getprop("/options/EIS2") == 1) {
|
||||
upperECAM_cfm_eis1.page.hide();
|
||||
upperECAM_cfm_eis2.page.show();
|
||||
upperECAM_iae_eis1.page.hide();
|
||||
upperECAM_iae_eis2.page.hide();
|
||||
upperECAM_cfm_eis2.update();
|
||||
} else if (getprop("/options/eng") == "IAE" and getprop("/options/EIS2") == 0) {
|
||||
upperECAM_cfm_eis1.page.hide();
|
||||
upperECAM_cfm_eis2.page.hide();
|
||||
upperECAM_iae_eis1.page.show();
|
||||
upperECAM_iae_eis2.page.hide();
|
||||
upperECAM_iae_eis1.update();
|
||||
} else if (getprop("/options/eng") == "IAE" and getprop("/options/EIS2") == 1) {
|
||||
upperECAM_cfm_eis1.page.hide();
|
||||
upperECAM_cfm_eis2.page.hide();
|
||||
upperECAM_iae_eis1.page.hide();
|
||||
upperECAM_iae_eis2.page.show();
|
||||
upperECAM_iae_eis2.update();
|
||||
}
|
||||
} else {
|
||||
upperECAM_cfm_eis1.page.hide();
|
||||
|
@ -78,8 +82,6 @@ var canvas_upperECAM_base = {
|
|||
upperECAM_iae_eis1.page.hide();
|
||||
upperECAM_iae_eis2.page.hide();
|
||||
}
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
updateBase: func() {
|
||||
# Reversers
|
||||
|
@ -455,8 +457,6 @@ var canvas_upperECAM_cfm_eis1 = {
|
|||
}
|
||||
|
||||
me.updateBase();
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -674,8 +674,6 @@ var canvas_upperECAM_cfm_eis2 = {
|
|||
}
|
||||
|
||||
me.updateBase();
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -933,8 +931,6 @@ var canvas_upperECAM_iae_eis1 = {
|
|||
}
|
||||
|
||||
me.updateBase();
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -1196,8 +1192,6 @@ var canvas_upperECAM_iae_eis2 = {
|
|||
}
|
||||
|
||||
me.updateBase();
|
||||
|
||||
settimer(func me.update(), 0.02);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -1218,11 +1212,11 @@ setlistener("sim/signals/fdm-initialized", func {
|
|||
upperECAM_cfm_eis2 = canvas_upperECAM_cfm_eis2.new(group_cfm_eis2, "Aircraft/IDG-A32X/Models/Instruments/Upper-ECAM/res/cfm-eis2.svg");
|
||||
upperECAM_iae_eis1 = canvas_upperECAM_iae_eis1.new(group_iae_eis1, "Aircraft/IDG-A32X/Models/Instruments/Upper-ECAM/res/iae-eis1.svg");
|
||||
upperECAM_iae_eis2 = canvas_upperECAM_iae_eis2.new(group_iae_eis2, "Aircraft/IDG-A32X/Models/Instruments/Upper-ECAM/res/iae-eis2.svg");
|
||||
|
||||
upperECAM_update.start();
|
||||
});
|
||||
|
||||
upperECAM_cfm_eis1.update();
|
||||
upperECAM_cfm_eis2.update();
|
||||
upperECAM_iae_eis1.update();
|
||||
upperECAM_iae_eis2.update();
|
||||
var upperECAM_update = maketimer(0.05, func {
|
||||
canvas_upperECAM_base.update();
|
||||
});
|
||||
|
||||
|
|
|
@ -256,6 +256,24 @@ var aglgears = func {
|
|||
|
||||
aglgears();
|
||||
|
||||
canvas.Text._lastText2 = "";
|
||||
canvas.Text.setText = func (text) {
|
||||
if (text == me._lastText2) {return me;}
|
||||
me._lastText2 = text;
|
||||
me.set("text", typeof(text) == 'scalar' ? text : "");
|
||||
};
|
||||
canvas.Element._lastVisible = 1;
|
||||
canvas.Element.show = func () {
|
||||
if (1 == me._lastVisible) {return me;}
|
||||
me._lastVisible = 1;
|
||||
me.setBool("visible", 1);
|
||||
};
|
||||
canvas.Element.hide = func () {
|
||||
if (0 == me._lastVisible) {return me;}
|
||||
me._lastVisible = 0;
|
||||
me.setBool("visible", 0);
|
||||
};
|
||||
|
||||
# In air, flaps 1 is slats only. On ground, it is slats and flaps.
|
||||
|
||||
setprop("/controls/flight/flap-lever", 0);
|
||||
|
|
|
@ -1 +1 @@
|
|||
1526
|
||||
1530
|
Reference in a new issue