Add "dummy" PROG pages, improve route selection page for alternates
This commit is contained in:
parent
9f5710e50e
commit
42ed7f1a7a
17 changed files with 323 additions and 61 deletions
|
@ -2939,6 +2939,10 @@
|
|||
<file>Aircraft/A320-family/Nasal/MCDU/ROUTESELECTION.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/INITB.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/FUELPRED.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/PROGTO.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/PROGCLB.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/PROGCRZ.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/PROGDES.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/PERFAPPR.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/PERFCLB.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/PERFCRZ.nas</file>
|
||||
|
|
|
@ -27,6 +27,9 @@ setprop("MCDUC/colors/amb/b", 0.0000);
|
|||
setprop("MCDUC/colors/yel/r", 0.9333);
|
||||
setprop("MCDUC/colors/yel/g", 0.9333);
|
||||
setprop("MCDUC/colors/yel/b", 0.0000);
|
||||
setprop("MCDUC/colors/mag/r", 0.6902);
|
||||
setprop("MCDUC/colors/mag/g", 0.3333);
|
||||
setprop("MCDUC/colors/mag/b", 0.7541);
|
||||
|
||||
# Fetch nodes:
|
||||
var mcdu_keyboard_entry = props.globals.getNode("MCDU/keyboard-entry", 1);
|
||||
|
@ -988,8 +991,10 @@ var canvas_MCDU_base = {
|
|||
|
||||
if (toFromSet.getValue() == 1 and alt_selected.getValue() == 0) {
|
||||
me["Simple_Title"].setText(sprintf("%s", depArpt.getValue() ~ "/" ~ arrArpt.getValue()));
|
||||
} else if (alt_airport.getValue() != "" and alt_selected.getValue() == 1) {
|
||||
} else if (toFromSet.getValue() == 0 and alt_airport.getValue() != "" and alt_selected.getValue() == 1) {
|
||||
me["Simple_Title"].setText(sprintf("%s", alt_airport.getValue()));
|
||||
} else if (toFromSet.getValue() == 1 and alt_airport.getValue() != "" and alt_selected.getValue() == 1) {
|
||||
me["Simple_Title"].setText(sprintf("%s", arrArpt.getValue() ~ "/" ~ alt_airport.getValue()));
|
||||
} else {
|
||||
me["Simple_Title"].setText("ROUTE SELECTION");
|
||||
}
|
||||
|
@ -1253,7 +1258,123 @@ var canvas_MCDU_base = {
|
|||
me["Simple_R3"].hide();
|
||||
}
|
||||
|
||||
} else if (page == "TO") {
|
||||
} else if (page == "PROGTO" or page == "PROGCLB" or page == "PROGCRZ" or page == "PROGDES") {
|
||||
if (!pageSwitch[i].getBoolValue()) {
|
||||
me["Simple"].show();
|
||||
me["Simple_Center"].show();
|
||||
me["INITA"].hide();
|
||||
me["INITB"].hide();
|
||||
me["FUELPRED"].hide();
|
||||
me["PERFTO"].hide();
|
||||
me["PERFAPPR"].hide();
|
||||
me["PERFGA"].hide();
|
||||
|
||||
if (flightNumSet.getValue() == 1) {
|
||||
if (page == "PROGTO") {
|
||||
me["Simple_Title"].setText(sprintf("TAKE OFF %s", flightNum.getValue()));
|
||||
} else if (page == "PROGCLB") {
|
||||
me["Simple_Title"].setText(sprintf("CLIMB %s", flightNum.getValue()));
|
||||
} else if (page == "PROGCRZ") {
|
||||
me["Simple_Title"].setText(sprintf("CRUISE %s", flightNum.getValue()));
|
||||
} else if (page == "PROGDES") {
|
||||
me["Simple_Title"].setText(sprintf("DESCENT %s", flightNum.getValue()));
|
||||
}
|
||||
} else {
|
||||
if (page == "PROGTO") {
|
||||
me["Simple_Title"].setText("TAKE OFF");
|
||||
} else if (page == "PROGCLB") {
|
||||
me["Simple_Title"].setText("CLIMB");
|
||||
} else if (page == "PROGCRZ") {
|
||||
me["Simple_Title"].setText("CRUISE");
|
||||
} else if (page == "PROGDES") {
|
||||
me["Simple_Title"].setText("DESCENT");
|
||||
}
|
||||
}
|
||||
me["Simple_Title"].setColor(0.0509,0.7529,0.2941);
|
||||
|
||||
me["Simple_PageNum"].setText("X/X");
|
||||
me["Simple_PageNum"].hide();
|
||||
me["ArrowLeft"].hide();
|
||||
me["ArrowRight"].hide();
|
||||
|
||||
me.showLeft(1, 1, 1, 1, 1, 1);
|
||||
me["Simple_L0S"].hide();
|
||||
me.showLeftS(1, -1, 1, 1, 1, 1);
|
||||
me.showLeftArrow(-1, 1, -1, -1, 1, -1);
|
||||
me.showRight(1, -1, -1, 1, 1, 1);
|
||||
me.showRightS(1, -1, -1, -1, -1, 1);
|
||||
me.showRightArrow(-1, -1, -1, -1, -1, -1);
|
||||
me.showCenter(1, -1, -1, 1, -1, 1);
|
||||
me.showCenterS(1, -1, -1, -1, -1, 1);
|
||||
|
||||
me.fontLeft(default, default, symbol, default, default, default);
|
||||
me.fontLeftS(default, default, default, default, default, default);
|
||||
me.fontRight(default, symbol, symbol, symbol, default, default);
|
||||
me.fontRightS(default, default, default, default, default, default);
|
||||
|
||||
if (page == "PROGCRZ") {
|
||||
me.showLeftS(0, 0, -1, 0, 0, 0);
|
||||
me.showCenterS(0, 0, 1, 0, 0, 0);
|
||||
me.showRight(0, 0, 1, 0, 0, 0);
|
||||
me.fontLeft(0, 0, default, 0, 0, 0);
|
||||
} else if (page == "PROGDES") {
|
||||
me.showRight(0, 1, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
me.fontSizeLeft(normal, normal, small, small, normal, small);
|
||||
me.fontSizeLeftS(small, small, small, small, small, small);
|
||||
me.fontSizeRight(normal, small, small, small, normal, small);
|
||||
me.fontSizeRightS(small, small, small, small, small, small);
|
||||
me.fontSizeCenter(small, small, small, small, small, normal);
|
||||
me.fontSizeCenterS(normal, small, small, small, small, small);
|
||||
|
||||
me.colorLeft("blu", "wht", "blu", "wht", "wht", "blu");
|
||||
me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
|
||||
me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
|
||||
me.colorRight("mag", "blu", "blu", "blu", "grn", "grn");
|
||||
me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
|
||||
me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
|
||||
me.colorCenter("grn", "wht", "wht", "wht", "wht", "grn");
|
||||
me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht");
|
||||
|
||||
pageSwitch[i].setBoolValue(1);
|
||||
}
|
||||
|
||||
if (cruiseSet.getValue() == 1 and page != "PROGDES") {
|
||||
me["Simple_L1"].setText(sprintf("%s", "FL" ~ cruiseFL.getValue()));
|
||||
} else {
|
||||
me["Simple_L1"].setText("----");
|
||||
}
|
||||
me["Simple_L2"].setText(" REPORT");
|
||||
if (page == "PROGCRZ") {
|
||||
me["Simple_L3"].setText("-----.--/-----.--");
|
||||
me["Simple_R3"].setText("AGN *");
|
||||
} else {
|
||||
me["Simple_L3"].setText(" [ ]");
|
||||
}
|
||||
me["Simple_L4"].setText("---g/----");
|
||||
me["Simple_L5"].setText(" GPS");
|
||||
me["Simple_L6"].setText("----");
|
||||
me["Simple_L1S"].setText("CRZ");
|
||||
me["Simple_L3S"].setText("UPDATE AT");
|
||||
me["Simple_L4S"].setText("BRG/DIST");
|
||||
me["Simple_L5S"].setText("PREDICTIVE");
|
||||
me["Simple_L6S"].setText("REQUIRED");
|
||||
me["Simple_R1"].setText("FL398");
|
||||
me["Simple_R2"].setText("VDEV = + 750 FT");
|
||||
me["Simple_R4"].setText("[ ]");
|
||||
me["Simple_R5"].setText("GPS PRIMARY");
|
||||
me["Simple_R6"].setText("----");
|
||||
me["Simple_R1S"].setText("REC MAX");
|
||||
me["Simple_R6S"].setText("ESTIMATED");
|
||||
me["Simple_C1"].setText("----");
|
||||
me["Simple_C1S"].setText("OPT");
|
||||
me["Simple_C3S"].setText("CONFIRM UPDATE AT");
|
||||
me["Simple_C4"].setText("TO");
|
||||
me["Simple_C6S"].setText("ACCUR");
|
||||
me["Simple_C6"].setText("HIGH");
|
||||
|
||||
} else if (page == "PERFTO") {
|
||||
if (!pageSwitch[i].getBoolValue()) {
|
||||
me["Simple"].show();
|
||||
me["Simple_Center"].show();
|
||||
|
@ -1300,6 +1421,29 @@ var canvas_MCDU_base = {
|
|||
pageSwitch[i].setBoolValue(1);
|
||||
}
|
||||
|
||||
me["Simple_L1"].setText(sprintf("%3.0f", v1.getValue()));
|
||||
me["Simple_L2"].setText(sprintf("%3.0f", vr.getValue()));
|
||||
me["Simple_L3"].setText(sprintf("%3.0f", v2.getValue()));
|
||||
me["Simple_L4"].setText(sprintf("%3.0f", transAlt.getValue()));
|
||||
me["Simple_L5"].setText(sprintf("%s", clbReducFt.getValue() ~ "/" ~ reducFt.getValue()));
|
||||
me["Simple_L6"].setText(" TO DATA");
|
||||
me["Simple_L1S"].setText(" V1");
|
||||
me["Simple_L2S"].setText(" VR");
|
||||
me["Simple_L3S"].setText(" V2");
|
||||
me["Simple_L4S"].setText("TRANS ALT");
|
||||
me["Simple_L5S"].setText("THR RED/ACC");
|
||||
me["Simple_L6S"].setText(" UPLINK");
|
||||
me["Simple_R1"].setText("--- ");
|
||||
me["Simple_R2"].setText("[ ] ");
|
||||
me["Simple_R5"].setText(sprintf("%3.0f", engOutAcc.getValue()));
|
||||
me["Simple_R6"].setText("PHASE ");
|
||||
me["Simple_R1S"].setText("RWY ");
|
||||
me["Simple_R2S"].setText("TO SHIFT ");
|
||||
me["Simple_R3S"].setText("FLAPS/THS");
|
||||
me["Simple_R4S"].setText("FLEX TO TEMP");
|
||||
me["Simple_R5S"].setText("ENG OUT ACC");
|
||||
me["Simple_R6S"].setText("NEXT ");
|
||||
|
||||
if (getprop("FMGC/status/phase") == 1) {
|
||||
me["Simple_Title"].setColor(0.0509,0.7529,0.2941);
|
||||
} else {
|
||||
|
@ -1404,7 +1548,7 @@ var canvas_MCDU_base = {
|
|||
me["Simple_C1S"].setText("FLP RETR");
|
||||
me["Simple_C2S"].setText("SLT RETR");
|
||||
me["Simple_C3S"].setText("CLEAN ");
|
||||
} else if (page == "APPR") {
|
||||
} else if (page == "PERFAPPR") {
|
||||
if (!pageSwitch[i].getBoolValue()) {
|
||||
me["Simple"].show();
|
||||
me["Simple_Center"].show();
|
||||
|
@ -1572,7 +1716,7 @@ var canvas_MCDU_base = {
|
|||
me["Simple_C2S"].setText("SLT RETR");
|
||||
me["Simple_C3S"].setText("CLEAN ");
|
||||
me["Simple_C5S"].setText("VLS ");
|
||||
} else if (page == "GA") {
|
||||
} else if (page == "PERFGA") {
|
||||
if (!pageSwitch[i].getBoolValue()) {
|
||||
me["Simple"].show();
|
||||
me["Simple_Center"].show();
|
||||
|
@ -1665,7 +1809,7 @@ var canvas_MCDU_base = {
|
|||
me["Simple_C1S"].setText("FLP RETR");
|
||||
me["Simple_C2S"].setText("SLT RETR");
|
||||
me["Simple_C3S"].setText("CLEAN ");
|
||||
} else if (page == "CLB" or page == "CRZ" or page == "DES") {
|
||||
} else if (page == "PERFCLB" or page == "PERFCRZ" or page == "PERFDES") {
|
||||
if (!pageSwitch[i].getBoolValue()) {
|
||||
me["Simple"].show();
|
||||
me["Simple_Center"].show();
|
||||
|
@ -1675,7 +1819,13 @@ var canvas_MCDU_base = {
|
|||
me["PERFTO"].hide();
|
||||
me["PERFAPPR"].hide();
|
||||
me["PERFGA"].hide();
|
||||
me["Simple_Title"].setText(sprintf("%s", page));
|
||||
if (page == "PERFCLB") {
|
||||
me["Simple_Title"].setText("CLB");
|
||||
} else if (page == "PERFCRZ") {
|
||||
me["Simple_Title"].setText("CRZ");
|
||||
} else if (page == "PERFDES") {
|
||||
me["Simple_Title"].setText("DES");
|
||||
}
|
||||
me["Simple_Title"].setColor(1, 1, 1);
|
||||
me["Simple_PageNum"].setText("X/X");
|
||||
me["Simple_PageNum"].hide();
|
||||
|
@ -1713,9 +1863,9 @@ var canvas_MCDU_base = {
|
|||
pageSwitch[i].setBoolValue(1);
|
||||
}
|
||||
|
||||
if (page == "CLB" and getprop("FMGC/status/phase") == 2) {
|
||||
if (page == "PERFCLB" and getprop("FMGC/status/phase") == 2) {
|
||||
me["Simple_Title"].setColor(0.0509,0.7529,0.2941);
|
||||
} else if (page == "CRZ" and getprop("FMGC/status/phase") == 3) {
|
||||
} else if (page == "PERFCRZ" and getprop("FMGC/status/phase") == 3) {
|
||||
me["Simple_Title"].setColor(0.0509,0.7529,0.2941);
|
||||
}else if (page == "DES" and getprop("FMGC/status/phase") == 4) {
|
||||
me["Simple_Title"].setColor(0.0509,0.7529,0.2941);
|
||||
|
@ -1737,7 +1887,7 @@ var canvas_MCDU_base = {
|
|||
me["Simple_L2"].setText("---");
|
||||
}
|
||||
|
||||
if (page == "CRZ") {
|
||||
if (page == "PERFCRZ") {
|
||||
me["Simple_R5"].show();
|
||||
me["Simple_R5S"].show();
|
||||
me["Simple_C5"].show();
|
||||
|
@ -1781,7 +1931,7 @@ var canvas_MCDU_base = {
|
|||
|
||||
me["Scratchpad"].setText(sprintf("%s", scratchpad[i].getValue()));
|
||||
},
|
||||
# ack = ignore, wht = white, grn = green, blu = blue, amb = amber, yel = yellow
|
||||
# ack = ignore, wht = white, grn = green, blu = blue, amb = amber, yel = yellow, mag = magenta
|
||||
colorLeft: func(a, b, c, d, e, f) {
|
||||
if (a != "ack") {
|
||||
me["Simple_L1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
|
||||
|
|
|
@ -176,6 +176,31 @@
|
|||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>prog</object-name>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>mcdu.pagebutton("prog", 0);</script>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/ac-1</property>
|
||||
<value>110</value>
|
||||
</greater-than-equals>
|
||||
<greater-than>
|
||||
<property>controls/lighting/DU/mcdu1</property>
|
||||
<value>0.01</value>
|
||||
</greater-than>
|
||||
</and>
|
||||
</condition>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>perf</object-name>
|
||||
|
|
|
@ -176,6 +176,31 @@
|
|||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>prog</object-name>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>mcdu.pagebutton("prog", 1);</script>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/ac-2</property>
|
||||
<value>110</value>
|
||||
</greater-than-equals>
|
||||
<greater-than>
|
||||
<property>controls/lighting/DU/mcdu2</property>
|
||||
<value>0.01</value>
|
||||
</greater-than>
|
||||
</and>
|
||||
</condition>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>perf</object-name>
|
||||
|
|
|
@ -186,9 +186,9 @@ var lskbutton = func(btn, i) {
|
|||
}
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
|
||||
initInputB("L1",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("L1",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("L1",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||
radnavInput("L1",i);
|
||||
|
@ -206,17 +206,17 @@ var lskbutton = func(btn, i) {
|
|||
initInputA("L2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
|
||||
initInputB("L2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("L2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("L2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||
radnavInput("L2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFCLB") {
|
||||
perfCLBInput("L2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFCRZ") {
|
||||
perfCRZInput("L2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFDES") {
|
||||
perfDESInput("L2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
|
||||
dataInput("L2",i);
|
||||
|
@ -234,9 +234,9 @@ var lskbutton = func(btn, i) {
|
|||
initInputB("L3",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "FUELPRED") {
|
||||
fuelPredInput("L3",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("L3",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("L3",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "STATUS") {
|
||||
statusInput("L3",i);
|
||||
|
@ -256,9 +256,9 @@ var lskbutton = func(btn, i) {
|
|||
initInputB("L4",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "FUELPRED") {
|
||||
fuelPredInput("L4",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("L4",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("L4",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||
radnavInput("L4",i);
|
||||
|
@ -274,17 +274,17 @@ var lskbutton = func(btn, i) {
|
|||
initInputB("L5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "FUELPRED") {
|
||||
fuelPredInput("L5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("L5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFCLB") {
|
||||
perfCLBInput("L5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFCRZ") {
|
||||
perfCRZInput("L5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFDES") {
|
||||
perfDESInput("L5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("L5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "GA") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFGA") {
|
||||
perfGAInput("L5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||
radnavInput("L5",i);
|
||||
|
@ -302,15 +302,15 @@ var lskbutton = func(btn, i) {
|
|||
initInputIRS("L6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "ROUTESELECTION") {
|
||||
initInputROUTESEL("L6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFCLB") {
|
||||
perfCLBInput("L6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFCRZ") {
|
||||
perfCRZInput("L6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFDES") {
|
||||
perfDESInput("L6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("L6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "GA") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFGA") {
|
||||
perfGAInput("L6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||
printInput2("L6",i);
|
||||
|
@ -342,7 +342,7 @@ var rskbutton = func(btn, i) {
|
|||
} else if (btn == "2") {
|
||||
if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
|
||||
initInputB("R2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("R2",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||
radnavInput("R2",i);
|
||||
|
@ -360,9 +360,9 @@ var rskbutton = func(btn, i) {
|
|||
initInputB("R3",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "FUELPRED") {
|
||||
fuelPredInput("R3",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("R3",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("R3",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||
printInput("R3",i);
|
||||
|
@ -372,9 +372,9 @@ var rskbutton = func(btn, i) {
|
|||
notAllowed(i);
|
||||
}
|
||||
} else if (btn == "4") {
|
||||
if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||
if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("R4",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("R4",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||
radnavInput("R4",i);
|
||||
|
@ -386,11 +386,11 @@ var rskbutton = func(btn, i) {
|
|||
} else if (btn == "5") {
|
||||
if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
|
||||
initInputB("R5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("R5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("R5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "GA") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFGA") {
|
||||
perfGAInput("R5",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||
radnavInput("R5",i);
|
||||
|
@ -410,15 +410,15 @@ var rskbutton = func(btn, i) {
|
|||
}
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "IRSINIT") {
|
||||
initInputIRS("R6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("R6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFCLB") {
|
||||
perfCLBInput("R6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFCRZ") {
|
||||
perfCRZInput("R6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFDES") {
|
||||
perfDESInput("R6",i);
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
|
||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") {
|
||||
perfAPPRInput("R6",i);
|
||||
} else if ((getprop("MCDU[" ~ i ~ "]/page") == "DATA") or (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") or (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2")) {
|
||||
if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "AOC DISABLED") {
|
||||
|
@ -494,19 +494,29 @@ var pagebutton = func(btn, i) {
|
|||
if (getprop("MCDU[" ~ i ~ "]/page") != "MCDU") {
|
||||
if (btn == "radnav") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "RADNAV");
|
||||
} else if (btn == "prog") {
|
||||
if (getprop("FMGC/status/phase") == 0 or getprop("FMGC/status/phase") == 1) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PROGTO");
|
||||
} else if (getprop("FMGC/status/phase") == 2) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PROGCLB");
|
||||
} else if (getprop("FMGC/status/phase") == 3) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PROGCRZ");
|
||||
} else if (getprop("FMGC/status/phase") == 4 or getprop("FMGC/status/phase") == 5 or getprop("FMGC/status/phase") == 6) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PROGDES");
|
||||
}
|
||||
} else if (btn == "perf") {
|
||||
if (getprop("FMGC/status/phase") == 0 or getprop("FMGC/status/phase") == 1) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "TO");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFTO");
|
||||
} else if (getprop("FMGC/status/phase") == 2) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "CLB");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFCLB");
|
||||
} else if (getprop("FMGC/status/phase") == 3) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "CRZ");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFCRZ");
|
||||
} else if (getprop("FMGC/status/phase") == 4) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "DES");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFDES");
|
||||
} else if (getprop("FMGC/status/phase") == 5) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "APPR");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFAPPR");
|
||||
} else if (getprop("FMGC/status/phase") == 6) {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "GA");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFGA");
|
||||
}
|
||||
} else if (btn == "init") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "INITA");
|
||||
|
|
|
@ -102,7 +102,7 @@ var perfAPPRInput = func(key, i) {
|
|||
notAllowed(i);
|
||||
}
|
||||
} else if (key == "L6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "DES");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFDES");
|
||||
} else if (key == "R4") {
|
||||
if (scratchpad == "" and ldg_config_f_set.getValue() == 1 and ldg_config_3_set.getValue() == 0) {
|
||||
setprop("FMGC/internal/ldg-config-3-set", 1);
|
||||
|
@ -118,7 +118,7 @@ var perfAPPRInput = func(key, i) {
|
|||
notAllowed(i);
|
||||
}
|
||||
} else if (key == "R6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "GA");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFGA");
|
||||
}
|
||||
|
||||
}
|
|
@ -26,8 +26,8 @@ var perfCLBInput = func(key, i) {
|
|||
}
|
||||
}
|
||||
} else if (key == "L6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "TO");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFTO");
|
||||
} else if (key == "R6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "CRZ");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFCRZ");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,9 +26,9 @@ var perfCRZInput = func(key, i) {
|
|||
}
|
||||
}
|
||||
} else if (key == "L6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "CLB");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFCLB");
|
||||
}
|
||||
if (key == "R6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "DES");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFDES");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@ var perfDESInput = func(key, i) {
|
|||
}
|
||||
}
|
||||
} else if (key == "L6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "CRZ");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFCRZ");
|
||||
} else if (key == "R6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "APPR");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFAPPR");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ var perfGAInput = func(key, i) {
|
|||
}
|
||||
}
|
||||
} else if (key == "L6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "APPR");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFAPPR");
|
||||
} else if (key == "R5") {
|
||||
if (scratchpad == "CLR") {
|
||||
setprop("FMGC/internal/eng-out-reduc", "1500");
|
||||
|
|
|
@ -193,6 +193,6 @@ var perfTOInput = func(key, i) {
|
|||
}
|
||||
}
|
||||
} else if (key == "R6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "CLB");
|
||||
setprop("MCDU[" ~ i ~ "]/page", "PERFCLB");
|
||||
}
|
||||
}
|
||||
|
|
7
Nasal/MCDU/PROGCLB.nas
Normal file
7
Nasal/MCDU/PROGCLB.nas
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copyright (c) 2020 Matthew Maring (hayden2000)
|
||||
|
||||
var progCLBInput = func(key, i) {
|
||||
if (key == "L6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "INITA");
|
||||
}
|
||||
}
|
7
Nasal/MCDU/PROGCRZ.nas
Normal file
7
Nasal/MCDU/PROGCRZ.nas
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copyright (c) 2020 Matthew Maring (hayden2000)
|
||||
|
||||
var progCRZInput = func(key, i) {
|
||||
if (key == "L6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "INITA");
|
||||
}
|
||||
}
|
7
Nasal/MCDU/PROGDES.nas
Normal file
7
Nasal/MCDU/PROGDES.nas
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copyright (c) 2020 Matthew Maring (hayden2000)
|
||||
|
||||
var progDESInput = func(key, i) {
|
||||
if (key == "L6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "INITA");
|
||||
}
|
||||
}
|
7
Nasal/MCDU/PROGTO.nas
Normal file
7
Nasal/MCDU/PROGTO.nas
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copyright (c) 2020 Matthew Maring (hayden2000)
|
||||
|
||||
var progTOInput = func(key, i) {
|
||||
if (key == "L6") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "INITA");
|
||||
}
|
||||
}
|
|
@ -298,6 +298,16 @@
|
|||
<legend>PROG</legend>
|
||||
<pref-height>25</pref-height>
|
||||
<pref-width>40</pref-width>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>mcdu.pagebutton("prog", 0);</script>
|
||||
<condition>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/ac-1</property>
|
||||
<value>110</value>
|
||||
</greater-than-equals>
|
||||
</condition>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
|
|
|
@ -298,6 +298,16 @@
|
|||
<legend>PROG</legend>
|
||||
<pref-height>25</pref-height>
|
||||
<pref-width>40</pref-width>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>mcdu.pagebutton("prog", 1);</script>
|
||||
<condition>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/ac-1</property>
|
||||
<value>110</value>
|
||||
</greater-than-equals>
|
||||
</condition>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
|
|
Loading…
Add table
Reference in a new issue