Add FUEL PRED page

This commit is contained in:
Jonathan Redpath 2018-01-16 16:21:32 -04:00
parent 31e59db4e2
commit a968fb8ae1
8 changed files with 177 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);
@ -786,6 +787,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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<sim>
<model>
<livery>
<name>SPASI 2</name>
<texture>Liveries/A320/IAE/SPASI 2.png</texture>
</livery>
</model>
</sim>
<options>
<EIS2 type="bool">1</EIS2>
</options>
<sharklet type="bool">0</sharklet>
</PropertyList>

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 {