A3XX: New CFM EIS1 Canvas ECAM

This commit is contained in:
Joshua Davidson 2017-08-01 13:26:54 -04:00
parent 05e7b25c80
commit 977728f585
3 changed files with 1671 additions and 29 deletions

View file

@ -5,6 +5,7 @@
# Copyright (c) A3XX Development Team #
#######################################
var upperECAM_cfm_eis1 = nil;
var upperECAM_cfm_eis2 = nil;
var upperECAM_iae_eis2 = nil;
var upperECAM_display = nil;
@ -49,14 +50,21 @@ var canvas_upperECAM_base = {
},
update: func() {
if (getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) {
if (getprop("/options/eng") == "CFM") {
if (getprop("/options/eng") == "CFM" and getprop("/options/EIS2") == 0) {
upperECAM_cfm_eis1.page.show();
upperECAM_cfm_eis2.page.hide();
upperECAM_iae_eis2.page.hide();
} else if (getprop("/options/eng") == "CFM" and getprop("/options/EIS2") == 1) {
upperECAM_cfm_eis1.page.hide();
upperECAM_cfm_eis2.page.show();
upperECAM_iae_eis2.page.hide();
} else if (getprop("/options/eng") == "IAE") {
upperECAM_cfm_eis1.page.hide();
upperECAM_cfm_eis2.page.hide();
upperECAM_iae_eis2.page.show();
}
} else {
upperECAM_cfm_eis1.page.hide();
upperECAM_cfm_eis2.page.hide();
upperECAM_iae_eis2.page.hide();
}
@ -239,6 +247,209 @@ var canvas_upperECAM_base = {
},
};
var canvas_upperECAM_cfm_eis1 = {
new: func(canvas_group, file) {
var m = { parents: [canvas_upperECAM_cfm_eis1 , canvas_upperECAM_base] };
m.init(canvas_group, file);
return m;
},
getKeys: func() {
return ["N11-needle","N11-thr","N11-ylim","N11","N11-decpnt","N11-decimal","N11-box","N11-scale","N11-scale2","N11-scalenum","N11-XX","EGT1-needle","EGT1","EGT1-scale","EGT1-box","EGT1-scale2","EGT1-scalenum","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-scalenum","N12-XX","EGT2-needle","EGT2","EGT2-scale","EGT2-box",
"EGT2-scale2","EGT2-scalenum","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"];
},
update: func() {
# N1
me["N11"].setText(sprintf("%s", math.floor(getprop("/engines/engine[0]/n1") + 0.05)));
me["N11-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[0]/n1") + 0.05,1))));
me["N12"].setText(sprintf("%s", math.floor(getprop("/engines/engine[1]/n1") + 0.05)));
me["N12-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[1]/n1") + 0.05,1))));
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);
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);
if (getprop("/systems/fadec/eng1/n1") == 1) {
me["N11-scale"].setColor(1,1,1);
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();
me["N11-scalenum"].show();
me["N11-XX"].hide();
} else {
me["N11-scale"].setColor(1,0.6,0);
me["N11-scale2"].setColor(1,0.6,0);
me["N11"].hide();
me["N11-decimal"].hide();
me["N11-decpnt"].hide();
me["N11-needle"].hide();
me["N11-ylim"].hide();
me["N11-scalenum"].hide();
me["N11-XX"].show();
}
if (getprop("/engines/engine[0]/reverser-pos-norm") < 0.01 and getprop("/systems/fadec/eng1/n1") == 1) {
me["N11-thr"].show();
} else {
me["N11-thr"].hide();
}
if (getprop("/systems/fadec/eng2/n1") == 1) {
me["N12-scale"].setColor(1,1,1);
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();
me["N12-scalenum"].show();
me["N12-XX"].hide();
} else {
me["N12-scale"].setColor(1,0.6,0);
me["N12-scale2"].setColor(1,0.6,0);
me["N12"].hide();
me["N12-decimal"].hide();
me["N12-decpnt"].hide();
me["N12-needle"].hide();
me["N12-ylim"].hide();
me["N12-scalenum"].hide();
me["N12-XX"].show();
}
if (getprop("/engines/engine[1]/reverser-pos-norm") < 0.01 and getprop("/systems/fadec/eng2/n1") == 1) {
me["N12-thr"].show();
} else {
me["N12-thr"].hide();
}
# 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"))));
me["EGT1-needle"].setRotation((getprop("/ECAM/Upper/EGT[0]") + 90)*D2R);
me["EGT2-needle"].setRotation((getprop("/ECAM/Upper/EGT[1]") + 90)*D2R);
if (getprop("/systems/fadec/eng1/egt") == 1) {
me["EGT1-scale"].setColor(1,1,1);
me["EGT1-scale2"].show();
me["EGT1"].show();
me["EGT1-needle"].show();
me["EGT1-scalenum"].show();
me["EGT1-XX"].hide();
} else {
me["EGT1-scale"].setColor(1,0.6,0);
me["EGT1-scale2"].hide();
me["EGT1"].hide();
me["EGT1-needle"].hide();
me["EGT1-scalenum"].hide();
me["EGT1-XX"].show();
}
if (getprop("/systems/fadec/eng2/egt") == 1) {
me["EGT2-scale"].setColor(1,1,1);
me["EGT2-scale2"].show();
me["EGT2"].show();
me["EGT2-needle"].show();
me["EGT2-scalenum"].show();
me["EGT2-XX"].hide();
} else {
me["EGT2-scale"].setColor(1,0.6,0);
me["EGT2-scale2"].hide();
me["EGT2"].hide();
me["EGT2-needle"].hide();
me["EGT2-scalenum"].hide();
me["EGT2-XX"].show();
}
# N2
me["N21"].setText(sprintf("%s", math.floor(getprop("/engines/engine[0]/n2") + 0.05)));
me["N21-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[0]/n2") + 0.05,1))));
me["N22"].setText(sprintf("%s", math.floor(getprop("/engines/engine[1]/n2") + 0.05)));
me["N22-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[1]/n2") + 0.05,1))));
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
me["FF1"].setText(sprintf("%s", math.round(getprop("/engines/engine[0]/fuel-flow_actual"))));
me["FF2"].setText(sprintf("%s", math.round(getprop("/engines/engine[1]/fuel-flow_actual"))));
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();
me["N1Lim"].show();
me["N1Lim-decpnt"].show();
me["N1Lim-decimal"].show();
me["N1Lim-percent"].show();
me["N1Lim-XX"].hide();
me["N1Lim-XX2"].hide();
} else {
me["N1Lim-mode"].hide();
me["N1Lim"].hide();
me["N1Lim-decpnt"].hide();
me["N1Lim-decimal"].hide();
me["N1Lim-percent"].hide();
me["N1Lim-XX"].show();
me["N1Lim-XX2"].show();
}
me.updateBase();
settimer(func me.update(), 0.02);
},
};
var canvas_upperECAM_cfm_eis2 = {
new: func(canvas_group, file) {
var m = { parents: [canvas_upperECAM_cfm_eis2 , canvas_upperECAM_base] };
@ -729,12 +940,15 @@ setlistener("sim/signals/fdm-initialized", func {
"mipmapping": 1
});
upperECAM_display.addPlacement({"node": "uecam.screen"});
var group_cfm_eis1 = upperECAM_display.createGroup();
var group_cfm_eis2 = upperECAM_display.createGroup();
var group_iae_eis2 = upperECAM_display.createGroup();
upperECAM_cfm_eis1 = canvas_upperECAM_cfm_eis1.new(group_cfm_eis1, "Aircraft/A320Family/Models/Instruments/Upper-ECAM/res/cfm-eis1.svg");
upperECAM_cfm_eis2 = canvas_upperECAM_cfm_eis2.new(group_cfm_eis2, "Aircraft/A320Family/Models/Instruments/Upper-ECAM/res/cfm-eis2.svg");
upperECAM_iae_eis2 = canvas_upperECAM_iae_eis2.new(group_iae_eis2, "Aircraft/A320Family/Models/Instruments/Upper-ECAM/res/iae-eis2.svg");
upperECAM_cfm_eis1.update();
upperECAM_cfm_eis2.update();
upperECAM_iae_eis2.update();
canvas_upperECAM_base.update();

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 78 KiB

View file

@ -149,10 +149,32 @@
<gain>1</gain>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
<and>
<not><property>/options/EIS2</property></not>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
<property>/engines/engine[0]/egt-actual</property>
<entry><ind> 0</ind><dep>-111</dep></entry>
<entry><ind> 500</ind><dep> -35</dep></entry>
<entry><ind>1000</ind><dep> 51</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<and>
<property>/options/EIS2</property>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
@ -188,10 +210,32 @@
<gain>1</gain>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
<and>
<not><property>/options/EIS2</property></not>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
<property>/engines/engine[1]/egt-actual</property>
<entry><ind> 0</ind><dep>-111</dep></entry>
<entry><ind> 500</ind><dep> -35</dep></entry>
<entry><ind>1000</ind><dep> 51</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<and>
<property>/options/EIS2</property>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
@ -227,10 +271,33 @@
<gain>1</gain>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
<and>
<not><property>/options/EIS2</property></not>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
<property>/engines/engine[0]/n1</property>
<entry><ind> 22.4</ind><dep>-116</dep></entry>
<entry><ind> 50.0</ind><dep> -45</dep></entry>
<entry><ind>100.0</ind><dep> 69</dep></entry>
<entry><ind>110.0</ind><dep> 90</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<and>
<property>/options/EIS2</property>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
@ -268,10 +335,33 @@
<gain>1</gain>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
<and>
<not><property>/options/EIS2</property></not>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
<property>/engines/engine[0]/n1-cmd</property>
<entry><ind> 22.4</ind><dep>-116</dep></entry>
<entry><ind> 50.0</ind><dep> -45</dep></entry>
<entry><ind>100.0</ind><dep> 69</dep></entry>
<entry><ind>110.0</ind><dep> 90</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<and>
<property>/options/EIS2</property>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
@ -309,10 +399,33 @@
<gain>1</gain>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
<and>
<not><property>/options/EIS2</property></not>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
<property>/engines/engine[1]/n1</property>
<entry><ind> 22.4</ind><dep>-116</dep></entry>
<entry><ind> 50.0</ind><dep> -45</dep></entry>
<entry><ind>100.0</ind><dep> 69</dep></entry>
<entry><ind>110.0</ind><dep> 90</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<and>
<property>/options/EIS2</property>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
@ -350,10 +463,33 @@
<gain>1</gain>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
<and>
<not><property>/options/EIS2</property></not>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
<property>/engines/engine[1]/n1-cmd</property>
<entry><ind> 22.4</ind><dep>-116</dep></entry>
<entry><ind> 50.0</ind><dep> -45</dep></entry>
<entry><ind>100.0</ind><dep> 69</dep></entry>
<entry><ind>110.0</ind><dep> 90</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<and>
<property>/options/EIS2</property>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
@ -391,10 +527,33 @@
<gain>1</gain>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
<and>
<not><property>/options/EIS2</property></not>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>
<property>/systems/thrust/n1/toga-lim</property>
<entry><ind> 22.4</ind><dep>-116</dep></entry>
<entry><ind> 50.0</ind><dep> -45</dep></entry>
<entry><ind>100.0</ind><dep> 69</dep></entry>
<entry><ind>110.0</ind><dep> 90</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<and>
<property>/options/EIS2</property>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</and>
</condition>
<expression>
<table>