From 42ed7f1a7a1f4fd90a65645264b98d834ca6662a Mon Sep 17 00:00:00 2001
From: Matthew Maring <56924612+hayden2000@users.noreply.github.com>
Date: Sun, 29 Mar 2020 23:39:31 -0400
Subject: [PATCH] Add "dummy" PROG pages, improve route selection page for
alternates
---
A320-main.xml | 4 +
Models/Instruments/MCDU/MCDU.nas | 170 ++++++++++++++++++++++++++++--
Models/Instruments/MCDU/MCDU1.xml | 25 +++++
Models/Instruments/MCDU/MCDU2.xml | 25 +++++
Nasal/MCDU/MCDU.nas | 92 +++++++++-------
Nasal/MCDU/PERFAPPR.nas | 4 +-
Nasal/MCDU/PERFCLB.nas | 4 +-
Nasal/MCDU/PERFCRZ.nas | 4 +-
Nasal/MCDU/PERFDES.nas | 4 +-
Nasal/MCDU/PERFGA.nas | 2 +-
Nasal/MCDU/PERFTO.nas | 2 +-
Nasal/MCDU/PROGCLB.nas | 7 ++
Nasal/MCDU/PROGCRZ.nas | 7 ++
Nasal/MCDU/PROGDES.nas | 7 ++
Nasal/MCDU/PROGTO.nas | 7 ++
gui/dialogs/mcdu1-dlg.xml | 10 ++
gui/dialogs/mcdu2-dlg.xml | 10 ++
17 files changed, 323 insertions(+), 61 deletions(-)
create mode 100644 Nasal/MCDU/PROGCLB.nas
create mode 100644 Nasal/MCDU/PROGCRZ.nas
create mode 100644 Nasal/MCDU/PROGDES.nas
create mode 100644 Nasal/MCDU/PROGTO.nas
diff --git a/A320-main.xml b/A320-main.xml
index bda2289d..421fbcce 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -2939,6 +2939,10 @@
Aircraft/A320-family/Nasal/MCDU/ROUTESELECTION.nas
Aircraft/A320-family/Nasal/MCDU/INITB.nas
Aircraft/A320-family/Nasal/MCDU/FUELPRED.nas
+ Aircraft/A320-family/Nasal/MCDU/PROGTO.nas
+ Aircraft/A320-family/Nasal/MCDU/PROGCLB.nas
+ Aircraft/A320-family/Nasal/MCDU/PROGCRZ.nas
+ Aircraft/A320-family/Nasal/MCDU/PROGDES.nas
Aircraft/A320-family/Nasal/MCDU/PERFAPPR.nas
Aircraft/A320-family/Nasal/MCDU/PERFCLB.nas
Aircraft/A320-family/Nasal/MCDU/PERFCRZ.nas
diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas
index be91c088..90bcaacb 100644
--- a/Models/Instruments/MCDU/MCDU.nas
+++ b/Models/Instruments/MCDU/MCDU.nas
@@ -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"));
diff --git a/Models/Instruments/MCDU/MCDU1.xml b/Models/Instruments/MCDU/MCDU1.xml
index 541b08a2..f037cdc9 100644
--- a/Models/Instruments/MCDU/MCDU1.xml
+++ b/Models/Instruments/MCDU/MCDU1.xml
@@ -176,6 +176,31 @@
+
+ pick
+ prog
+
+
+ false
+
+ nasal
+
+
+
+
+ systems/electrical/bus/ac-1
+ 110
+
+
+ controls/lighting/DU/mcdu1
+ 0.01
+
+
+
+
+
+
+
pick
perf
diff --git a/Models/Instruments/MCDU/MCDU2.xml b/Models/Instruments/MCDU/MCDU2.xml
index adf05c55..0849f6b4 100644
--- a/Models/Instruments/MCDU/MCDU2.xml
+++ b/Models/Instruments/MCDU/MCDU2.xml
@@ -176,6 +176,31 @@
+
+ pick
+ prog
+
+
+ false
+
+ nasal
+
+
+
+
+ systems/electrical/bus/ac-2
+ 110
+
+
+ controls/lighting/DU/mcdu2
+ 0.01
+
+
+
+
+
+
+
pick
perf
diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas
index 5d261a89..bd507e61 100644
--- a/Nasal/MCDU/MCDU.nas
+++ b/Nasal/MCDU/MCDU.nas
@@ -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");
diff --git a/Nasal/MCDU/PERFAPPR.nas b/Nasal/MCDU/PERFAPPR.nas
index df6b1d59..33f7451a 100644
--- a/Nasal/MCDU/PERFAPPR.nas
+++ b/Nasal/MCDU/PERFAPPR.nas
@@ -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");
}
}
\ No newline at end of file
diff --git a/Nasal/MCDU/PERFCLB.nas b/Nasal/MCDU/PERFCLB.nas
index d2c54b8a..88912e8a 100644
--- a/Nasal/MCDU/PERFCLB.nas
+++ b/Nasal/MCDU/PERFCLB.nas
@@ -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");
}
}
diff --git a/Nasal/MCDU/PERFCRZ.nas b/Nasal/MCDU/PERFCRZ.nas
index 2e724462..b629d371 100644
--- a/Nasal/MCDU/PERFCRZ.nas
+++ b/Nasal/MCDU/PERFCRZ.nas
@@ -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");
}
}
diff --git a/Nasal/MCDU/PERFDES.nas b/Nasal/MCDU/PERFDES.nas
index 890b48a3..f961f3ee 100644
--- a/Nasal/MCDU/PERFDES.nas
+++ b/Nasal/MCDU/PERFDES.nas
@@ -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");
}
}
diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas
index bfe79fd0..6409965b 100644
--- a/Nasal/MCDU/PERFGA.nas
+++ b/Nasal/MCDU/PERFGA.nas
@@ -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");
diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas
index 98e031b4..bea1a500 100644
--- a/Nasal/MCDU/PERFTO.nas
+++ b/Nasal/MCDU/PERFTO.nas
@@ -193,6 +193,6 @@ var perfTOInput = func(key, i) {
}
}
} else if (key == "R6") {
- setprop("MCDU[" ~ i ~ "]/page", "CLB");
+ setprop("MCDU[" ~ i ~ "]/page", "PERFCLB");
}
}
diff --git a/Nasal/MCDU/PROGCLB.nas b/Nasal/MCDU/PROGCLB.nas
new file mode 100644
index 00000000..5bba0af7
--- /dev/null
+++ b/Nasal/MCDU/PROGCLB.nas
@@ -0,0 +1,7 @@
+# Copyright (c) 2020 Matthew Maring (hayden2000)
+
+var progCLBInput = func(key, i) {
+ if (key == "L6") {
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
+ }
+}
diff --git a/Nasal/MCDU/PROGCRZ.nas b/Nasal/MCDU/PROGCRZ.nas
new file mode 100644
index 00000000..0f3c535e
--- /dev/null
+++ b/Nasal/MCDU/PROGCRZ.nas
@@ -0,0 +1,7 @@
+# Copyright (c) 2020 Matthew Maring (hayden2000)
+
+var progCRZInput = func(key, i) {
+ if (key == "L6") {
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
+ }
+}
diff --git a/Nasal/MCDU/PROGDES.nas b/Nasal/MCDU/PROGDES.nas
new file mode 100644
index 00000000..d330ad7b
--- /dev/null
+++ b/Nasal/MCDU/PROGDES.nas
@@ -0,0 +1,7 @@
+# Copyright (c) 2020 Matthew Maring (hayden2000)
+
+var progDESInput = func(key, i) {
+ if (key == "L6") {
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
+ }
+}
diff --git a/Nasal/MCDU/PROGTO.nas b/Nasal/MCDU/PROGTO.nas
new file mode 100644
index 00000000..1c730966
--- /dev/null
+++ b/Nasal/MCDU/PROGTO.nas
@@ -0,0 +1,7 @@
+# Copyright (c) 2020 Matthew Maring (hayden2000)
+
+var progTOInput = func(key, i) {
+ if (key == "L6") {
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
+ }
+}
diff --git a/gui/dialogs/mcdu1-dlg.xml b/gui/dialogs/mcdu1-dlg.xml
index 545235b3..ec89614b 100644
--- a/gui/dialogs/mcdu1-dlg.xml
+++ b/gui/dialogs/mcdu1-dlg.xml
@@ -298,6 +298,16 @@
25
40
+
+ nasal
+
+
+
+ systems/electrical/bus/ac-1
+ 110
+
+
+