Merge pull request #139 from it0uchpods/LB-MCDU

Lb mcdu
This commit is contained in:
Jonathan Redpath 2018-02-27 17:23:58 +00:00 committed by GitHub
commit 63029c8daa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 253 additions and 0 deletions

View file

@ -21,6 +21,7 @@ var vor2 = "";
var ils = "";
var adf1 = "";
var adf2 = "";
var engrdy = "";
setprop("/MCDUC/colors/wht/r", 1);
setprop("/MCDUC/colors/wht/g", 1);
setprop("/MCDUC/colors/wht/b", 1);
@ -413,6 +414,98 @@ var canvas_MCDU_base = {
me["Simple_R2S"].setText("PILOTS ");
me["Simple_R3S"].setText("PILOTS ");
me["Simple_R4S"].setText("PILOTS ");
} else if (page == "POSMON") {
me["Simple"].show();
me["Simple_Center"].show();
me["INITA"].hide();
me["INITB"].hide();
me["PERFTO"].hide();
me["Simple_Title"].setText("POSITION MONITOR");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
me["ArrowLeft"].hide();
me["ArrowRight"].hide();
me["Simple_L1"].show();
me["Simple_L2"].show();
me["Simple_L3"].show();
me["Simple_L4"].show();
me["Simple_L5"].show();
me["Simple_L6"].show();
me["Simple_L1S"].hide();
me["Simple_L2S"].hide();
me["Simple_L3S"].hide();
me["Simple_L4S"].hide();
me["Simple_L5S"].show();
me["Simple_L6S"].hide();
me["Simple_L1_Arrow"].hide();
me["Simple_L2_Arrow"].hide();
me["Simple_L3_Arrow"].hide();
me["Simple_L4_Arrow"].hide();
me["Simple_L5_Arrow"].hide();
me["Simple_L6_Arrow"].show();
me["Simple_C1"].hide();
me["Simple_C2"].hide();
me["Simple_C3"].hide();
me["Simple_C4"].hide();
me["Simple_C5"].show();
me["Simple_C6"].hide();
me["Simple_C1S"].hide();
me["Simple_C2S"].hide();
me["Simple_C3S"].hide();
me["Simple_C4S"].hide();
me["Simple_C5S"].show();
me["Simple_C6S"].hide();
me["Simple_R1"].show();
me["Simple_R2"].show();
me["Simple_R3"].show();
me["Simple_R4"].show();
me["Simple_R5"].show();
me["Simple_R6"].show();
me["Simple_R1S"].hide();
me["Simple_R2S"].hide();
me["Simple_R3S"].hide();
me["Simple_R4S"].hide();
me["Simple_R5S"].show();
me["Simple_R6S"].show();
me["Simple_R1_Arrow"].hide();
me["Simple_R2_Arrow"].hide();
me["Simple_R3_Arrow"].hide();
me["Simple_R4_Arrow"].hide();
me["Simple_R5_Arrow"].hide();
me["Simple_R6_Arrow"].show();
me.fontLeft(default, default, default, default, default, default);
me.fontLeftS(default, default, default, default, default, default);
me.fontRight(default, default, default, default, default, default);
me.fontRightS(default, default, default, default, default, default);
me.fontSizeLeft(normal, normal, normal, normal, normal, normal);
me.fontSizeRight(normal, normal, normal, normal, normal, normal);
me.colorLeft("wht", "wht", "wht", "wht", "grn", "blu");
me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "blu");
me.colorRight("grn", "grn", "grn", "grn", "grn", "wht");
me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
me["Simple_L1"].setText("FMGC1");
me["Simple_L2"].setText("FMGC2");
me["Simple_L3"].setText("GPIRS");
me["Simple_L4"].setText("MIX IRS");
me["Simple_L5"].setText("NAV -.-");
me["Simple_L6"].setText(" FREEZE");
me["Simple_L5S"].setText(" IRS1");
me["Simple_R1"].setText("----.-X/-----.-X");
me["Simple_R2"].setText("----.-X/-----.-X");
me["Simple_R3"].setText("----.-X/-----.-X");
me["Simple_R4"].setText("----.-X/-----.-X");
me["Simple_R5"].setText("NAV -.-");
me["Simple_R5S"].setText("IRS3 ");
me["Simple_R6S"].setText("SEL ");
me["Simple_C5"].setText("NAV -.-");
me["Simple_C5S"].setText("IRS2");
} else if (page == "RADNAV") {
me["Simple"].show();
me["Simple_Center"].hide();
@ -473,6 +566,8 @@ var canvas_MCDU_base = {
me.colorLeft("blu", "blu", "blu", "blu", "blu", "blu");
me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
me.colorCenter("wht", "wht", "wht", "wht", "wht", "grn");
me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRight("blu", "blu", "blu", "blu", "blu", "blu");
me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
@ -786,6 +881,116 @@ var canvas_MCDU_base = {
me["Simple_R2S"].setText("BLOCK");
me["Simple_R4S"].setText("TOW");
me["Simple_R5S"].setText("LW");
} else if (page == "FUELPRED") {
me["Simple"].show();
me["Simple_Center"].show();
me["INITA"].hide();
me["INITB"].hide();
me["PERFTO"].hide();
me["Simple_Title"].setText("FUEL PRED");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
me["ArrowLeft"].hide();
me["ArrowRight"].hide();
me["Simple_L1"].show();
me["Simple_L2"].show();
me["Simple_L3"].show();
me["Simple_L4"].show();
me["Simple_L5"].show();
me["Simple_L6"].show();
me["Simple_L1S"].show();
me["Simple_L2S"].hide();
me["Simple_L3S"].show();
me["Simple_L4S"].show();
me["Simple_L5S"].show();
me["Simple_L6S"].show();
me["Simple_L1_Arrow"].hide();
me["Simple_L2_Arrow"].hide();
me["Simple_L3_Arrow"].hide();
me["Simple_L4_Arrow"].hide();
me["Simple_L5_Arrow"].hide();
me["Simple_L6_Arrow"].hide();
me["Simple_C1"].show();
me["Simple_C2"].show();
me["Simple_C3"].hide();
me["Simple_C4"].hide();
me["Simple_C5"].hide();
me["Simple_C6"].hide();
me["Simple_C1S"].show();
me["Simple_C2S"].hide();
me["Simple_C3S"].hide();
me["Simple_C4S"].hide();
me["Simple_C5S"].hide();
me["Simple_C6S"].hide();
me["Simple_R1"].show();
me["Simple_R2"].show();
me["Simple_R3"].show();
me["Simple_R4"].show();
me["Simple_R5"].hide();
me["Simple_R6"].hide();
me["Simple_R1S"].show();
me["Simple_R2S"].hide();
me["Simple_R3S"].show();
me["Simple_R4S"].show();
me["Simple_R5S"].hide();
me["Simple_R6S"].hide();
me["Simple_R1_Arrow"].hide();
me["Simple_R2_Arrow"].hide();
me["Simple_R3_Arrow"].hide();
me["Simple_R4_Arrow"].hide();
me["Simple_R5_Arrow"].hide();
me["Simple_R6_Arrow"].hide();
me.fontLeft(default, default, default, default, default, default);
me.fontLeftS(default, default, default, default, default, default);
me.fontRight(default, default, default, default, default, default);
me.fontRightS(default, default, default, default, default, default);
me.fontSizeLeft(normal, normal, normal, normal, normal, normal);
me.fontSizeRight(normal, normal, normal, normal, normal, normal);
me.colorLeft("grn", "grn", "blu", "blu", "blu", "grn");
me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
me.colorCenter("grn", "grn", "wht", "wht", "wht", "wht");
me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRight("grn", "grn", "blu", "blu", "wht", "wht");
me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
engrdy = getprop("/engines/ready");
if (!engrdy or getprop("/FMGC/internal/arr-arpt") == "") {
me["Simple_L1"].setText("----");
} else {
me["Simple_L1"].setText(getprop("/FMGC/internal/arr-arpt"));
}
me["Simple_L2"].setText("----");
me["Simple_L3"].setText("--.-/--.-");
me["Simple_L4"].setText("-.-/-.-");
me["Simple_L5"].setText("--.-/----");
me["Simple_L6"].setText("--.-/----");
me["Simple_L1S"].setText("AT");
me["Simple_L2S"].setText("X");
me["Simple_L3S"].setText("GW/CG");
me["Simple_L4S"].setText("RTE RSV/");
me["Simple_L5S"].setText("FINAL/TIME");
me["Simple_L6S"].setText("EXTRA/TIME");
me["Simple_C1S"].setText("UTC");
me["Simple_C1"].setText("----");
me["Simple_C2"].setText("----");
me["Simple_R1"].setText("-.-");
me["Simple_R2"].setText("-.-");
me["Simple_R3"].setText("-.-/--+--");
me["Simple_R4"].setText("----*/36090");
me["Simple_R1S"].setText("EFOB");
me["Simple_R3S"].setText("FOB");
me["Simple_R4S"].setText("CRZTEMP/TROPO");
} else if (page == "TO") {
me["Simple"].show();
me["Simple_Center"].show();

View file

@ -131,6 +131,25 @@
</action>
</animation>
<animation>
<type>pick</type>
<object-name>fuel-pred</object-name>
<action>
<button>0</button>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("fuel-pred");</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
<value>110</value>
</greater-than-equals>
</condition>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>L1</object-name>

View file

@ -131,6 +131,25 @@
</action>
</animation>
<animation>
<type>pick</type>
<object-name>fuel-pred</object-name>
<action>
<button>0</button>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("fuel-pred");</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
<value>110</value>
</greater-than-equals>
</condition>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>L1</object-name>

View file

@ -395,6 +395,8 @@ var pagebutton = func(btn) {
setprop("/MCDU[0]/page", "MCDU");
} else if (btn == "f-pln") {
setprop("/MCDU[0]/page", "F-PLNA");
} else if (btn == "fuel-pred") {
setprop("/MCDU[0]/page", "FUELPRED");
}
}
}

View file

@ -393,6 +393,8 @@ var pagebutton = func(btn) {
setprop("/MCDU[1]/page", "MCDU");
} else if (btn == "f-pln") {
setprop("/MCDU[1]/page", "F-PLNA");
} else if (btn == "fuel-pred") {
setprop("/MCDU[1]/page", "FUELPRED");
}
}
}

View file

@ -232,6 +232,12 @@ var systemsLoop = maketimer(0.1, func {
} else {
setprop("/instrumentation/mk-viii/speaker/volume", 2);
}
if (getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") == 3) {
setprop("/engines/ready", 1);
} else {
setprop("/engines/ready", 0);
}
});
setlistener("/options/steep-ils", func {