diff --git a/A320-main.xml b/A320-main.xml
index 85804ab9..66d0578f 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -1923,6 +1923,7 @@
Aircraft/A320-family/Nasal/MCDU/PERFCLB.nas
Aircraft/A320-family/Nasal/MCDU/PERFCRZ.nas
Aircraft/A320-family/Nasal/MCDU/PERFDES.nas
+ Aircraft/A320-family/Nasal/MCDU/PERFGA.nas
Aircraft/A320-family/Nasal/MCDU/PERFTO.nas
Aircraft/A320-family/Nasal/MCDU/RADNAV.nas
Aircraft/A320-family/Nasal/MCDU/DATA.nas
diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas
index d8753d69..6a55bffa 100644
--- a/Models/Instruments/MCDU/MCDU.nas
+++ b/Models/Instruments/MCDU/MCDU.nas
@@ -119,6 +119,14 @@ var engOutAcc = props.globals.getNode("/FMGC/internal/eng-out-reduc", 1);
var engOutAccSet = props.globals.getNode("/MCDUC/reducacc-set", 1);
var transAlt = props.globals.getNode("/FMGC/internal/trans-alt", 1);
var managedSpeed = props.globals.getNode("/it-autoflight/input/spd-managed", 1);
+var ac1 = props.globals.getNode("systems/electrical/bus/ac-1", 1);
+var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1);
+var f_speed = props.globals.getNode("FMGC/internal/f-speed", 1);
+var s_speed = props.globals.getNode("FMGC/internal/s-speed", 1);
+var o_speed = props.globals.getNode("FMGC/internal/o-speed", 1);
+var min_speed = props.globals.getNode("FMGC/internal/minspeed", 1);
+#var vapp_speed = props.globals.getNode("FMGC/internal/vapp-speed", 1);
+var altitude = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft", 1);
# Fetch nodes into vectors
var pageProp = [props.globals.getNode("MCDU[0]/page", 1), props.globals.getNode("MCDU[1]/page", 1)];
@@ -175,6 +183,13 @@ var canvas_MCDU_base = {
me["PERFAPPR_SE"].setColor(0.8078,0.8039,0.8078);
me["PERFAPPR_OE"].setColor(0.8078,0.8039,0.8078);
+ me["PERFGA_FE"].setFont(symbol);
+ me["PERFGA_SE"].setFont(symbol);
+ me["PERFGA_OE"].setFont(symbol);
+ me["PERFGA_FE"].setColor(0.8078,0.8039,0.8078);
+ me["PERFGA_SE"].setColor(0.8078,0.8039,0.8078);
+ me["PERFGA_OE"].setColor(0.8078,0.8039,0.8078);
+
me.page = canvas_group;
return me;
@@ -186,8 +201,9 @@ var canvas_MCDU_base = {
"Simple_R6","Simple_R1S","Simple_R2S","Simple_R3S","Simple_R4S","Simple_R5S","Simple_R6S","Simple_R1_Arrow","Simple_R2_Arrow","Simple_R3_Arrow",
"Simple_R4_Arrow","Simple_R5_Arrow","Simple_R6_Arrow","Simple_C1","Simple_C2","Simple_C3","Simple_C4","Simple_C5","Simple_C6","Simple_C1S",
"Simple_C2S","Simple_C3S","Simple_C4S","Simple_C5S","Simple_C6S","INITA","INITA_CoRoute","INITA_FltNbr","INITA_CostIndex","INITA_CruiseFLTemp",
- "INITA_FromTo","INITA_InitRequest","INITA_AlignIRS","INITB","INITB_ZFWCG","INITB_ZFW","INITB_ZFW_S","INITB_Block","PERFTO","PERFTO_V1","PERFTO_VR","PERFTO_V2","PERFTO_FE","PERFTO_SE","PERFTO_OE","PERFAPPR","PERFAPPR_FE","PERFAPPR_SE","PERFAPPR_OE","FPLN","FPLN_From","FPLN_TMPY_group",
- "FPLN_Callsign","departureTMPY", "arrowsDepArr","arrow1L","arrow2L","arrow3L","arrow4L","arrow5L","arrow1R","arrow2R","arrow3R","arrow4R","arrow5R"];
+ "INITA_FromTo","INITA_InitRequest","INITA_AlignIRS","INITB","INITB_ZFWCG","INITB_ZFW","INITB_ZFW_S","INITB_Block","PERFTO","PERFTO_V1","PERFTO_VR","PERFTO_V2","PERFTO_FE","PERFTO_SE","PERFTO_OE","PERFAPPR","PERFAPPR_FE","PERFAPPR_SE","PERFAPPR_OE","PERFGA","PERFGA_FE","PERFGA_SE","PERFGA_OE",
+ "FPLN","FPLN_From","FPLN_TMPY_group","FPLN_Callsign","departureTMPY", "arrowsDepArr","arrow1L","arrow2L","arrow3L","arrow4L","arrow5L","arrow1R",
+ "arrow2R","arrow3R","arrow4R","arrow5R"];
},
update: func() {
if (systems.ELEC.Bus.ac1.getValue() >= 110 and mcdu1_lgt.getValue() > 0.01) {
@@ -535,6 +551,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("MCDU MENU");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -620,6 +637,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText(sprintf("%s", " " ~ acType.getValue()));
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -705,6 +723,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("DATA INDEX");
me["Simple_PageNum"].setText("1/2");
me["Simple_PageNum"].show();
@@ -788,6 +807,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("DATA INDEX");
me["Simple_PageNum"].setText("2/2");
me["Simple_PageNum"].show();
@@ -876,6 +896,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("POSITION MONITOR");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -976,6 +997,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("RADIO NAV");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -1118,6 +1140,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("INIT");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -1276,6 +1299,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("INIT");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -1409,6 +1433,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("FUEL PRED");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -1524,6 +1549,7 @@ var canvas_MCDU_base = {
me["PERFTO"].show();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("TAKE OFF");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -1587,6 +1613,7 @@ var canvas_MCDU_base = {
me.fontSizeLeft(normal, normal, normal, normal, 0, normal);
me.fontSizeRight(normal, small, 0, 0, 0, normal);
+ me.fontSizeCenter(small, small, small, 0, 0, 0);
me.colorLeft("blu", "blu", "blu", "blu", "blu", "wht");
me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
@@ -1672,9 +1699,29 @@ var canvas_MCDU_base = {
me["Simple_R4S"].setText("FLEX TO TEMP");
me["Simple_R5S"].setText("ENG OUT ACC");
me["Simple_R6S"].setText("NEXT ");
- me["Simple_C1"].setText(" ---");
- me["Simple_C2"].setText(" ---");
- me["Simple_C3"].setText(" ---");
+
+ if (zfwSet.getValue() == 1 and blockSet.getValue() == 1) {
+ lbs1000 = KG2LB * num(zfw.getValue() + block.getValue());
+
+ tgt_f = ((0.4352 * lbs1000) + 51.006) * 1.47;
+ setprop("FMGC/internal/f-speed", tgt_f);
+ tgt_s = ((0.0024 * lbs1000 * lbs1000) + (0.124 * lbs1000) + 88.942) * 1.23;
+ setprop("FMGC/internal/s-speed", tgt_s);
+ tgt_clean = 2 * lbs1000 * 0.45359237 + 85;
+ if (altitude.getValue() > 20000) {
+ tgt_clean += (altitude.getValue() - 20000) / 1000;
+ }
+ setprop("FMGC/internal/o-speed", tgt_clean);
+
+ me["Simple_C1"].setText(sprintf("%3.0f", f_speed.getValue()));
+ me["Simple_C2"].setText(sprintf("%3.0f", s_speed.getValue()));
+ me["Simple_C3"].setText(sprintf("%3.0f", o_speed.getValue()));
+ } else {
+ me["Simple_C1"].setText(" ---");
+ me["Simple_C2"].setText(" ---");
+ me["Simple_C3"].setText(" ---");
+ }
+
me["Simple_C1S"].setText("FLP RETR");
me["Simple_C2S"].setText("SLT RETR");
me["Simple_C3S"].setText("CLEAN ");
@@ -1686,6 +1733,7 @@ var canvas_MCDU_base = {
me["INITB"].hide();
me["PERFTO"].hide();
me["PERFAPPR"].show();
+ me["PERFGA"].hide();
me["Simple_Title"].setText("APPR");
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -1780,18 +1828,170 @@ var canvas_MCDU_base = {
me["Simple_R2"].setText(" [ ]");
me["Simple_R3"].setText(" [ ]");
me["Simple_R4"].setText(" [ ]");
+ me["Simple_R6"].setText("PHASE ");
me["Simple_R1S"].setText("FINAL");
me["Simple_R2S"].setText("MDA");
me["Simple_R3S"].setText("DH");
me["Simple_R4S"].setText("LDG CONF");
- me["Simple_C1"].setText(" ---");
- me["Simple_C2"].setText(" ---");
- me["Simple_C3"].setText(" ---");
- me["Simple_C5"].setText(" ---");
+ me["Simple_R6S"].setText("NEXT ");
+
+ if (zfwSet.getValue() == 1 and blockSet.getValue() == 1) {
+ lbs1000 = KG2LB * num(zfw.getValue() + block.getValue());
+
+ tgt_f = ((0.4352 * lbs1000) + 51.006) * 1.47;
+ setprop("FMGC/internal/f-speed", tgt_f);
+ tgt_s = ((0.0024 * lbs1000 * lbs1000) + (0.124 * lbs1000) + 88.942) * 1.23;
+ setprop("FMGC/internal/s-speed", tgt_s);
+ tgt_clean = 2 * lbs1000 * 0.45359237 + 85;
+ if (altitude.getValue() > 20000) {
+ tgt_clean += (altitude.getValue() - 20000) / 1000;
+ }
+ setprop("FMGC/internal/o-speed", tgt_clean);
+
+ me["Simple_C1"].setText(sprintf("%3.0f", f_speed.getValue()));
+ me["Simple_C2"].setText(sprintf("%3.0f", s_speed.getValue()));
+ me["Simple_C3"].setText(sprintf("%3.0f", o_speed.getValue()));
+ me["Simple_C5"].setText(sprintf("%3.0f", min_speed.getValue()));
+ } else {
+ me["Simple_C1"].setText(" ---");
+ me["Simple_C2"].setText(" ---");
+ me["Simple_C3"].setText(" ---");
+ me["Simple_C5"].setText(" ---");
+ }
+
me["Simple_C1S"].setText("FLP RETR");
me["Simple_C2S"].setText("SLT RETR");
me["Simple_C3S"].setText("CLEAN ");
me["Simple_C5S"].setText("VLS ");
+ } else if (page == "GA") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me["Simple"].show();
+ me["Simple_Center"].show();
+ me["INITA"].hide();
+ me["INITB"].hide();
+ me["PERFTO"].hide();
+ me["PERFAPPR"].hide();
+ me["PERFGA"].show();
+ me["Simple_Title"].setText("GO AROUND");
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me["Simple_L1"].hide();
+ me["Simple_L2"].hide();
+ me["Simple_L3"].hide();
+ me["Simple_L4"].hide();
+ me["Simple_L5"].show();
+ me["Simple_L6"].show();
+ me["Simple_L0S"].hide();
+ me["Simple_L1S"].hide();
+ me["Simple_L2S"].hide();
+ me["Simple_L3S"].hide();
+ me["Simple_L4S"].hide();
+ 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"].show();
+ me["Simple_R1"].hide();
+ me["Simple_R2"].hide();
+ me["Simple_R3"].hide();
+ me["Simple_R4"].hide();
+ me["Simple_R5"].show();
+ me["Simple_R6"].hide();
+ me["Simple_R1S"].hide();
+ me["Simple_R2S"].hide();
+ me["Simple_R3S"].hide();
+ me["Simple_R4S"].hide();
+ me["Simple_R5S"].show();
+ 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["Simple_C1"].show();
+ me["Simple_C2"].show();
+ me["Simple_C3"].show();
+ me["Simple_C4"].hide();
+ me["Simple_C5"].hide();
+ me["Simple_C6"].hide();
+ me["Simple_C1S"].show();
+ me["Simple_C2S"].show();
+ me["Simple_C3S"].show();
+ me["Simple_C4S"].hide();
+ me["Simple_C5S"].hide();
+ me["Simple_C6S"].hide();
+
+ me.fontLeft(default, default, default, default, default, default);
+ me.fontLeftS(default, default, default, default, default, default);
+ me.fontRight(default, symbol, 0, 0, default, default);
+ me.fontRightS(default, default, default, default, default, default);
+
+ me.fontSizeLeft(normal, normal, normal, normal, 0, normal);
+ me.fontSizeRight(normal, small, 0, 0, 0, normal);
+ me.fontSizeCenter(small, small, small, 0, 0, 0);
+
+ me.colorLeft("blu", "blu", "blu", "blu", "blu", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("wht", "blu", "blu", "blu", "blu", "wht");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorCenter("grn", "grn", "grn", "wht", "wht", "wht");
+ me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht");
+
+ pageSwitch[i].setBoolValue(1);
+ }
+
+ if (thrAccSet.getValue() == 1) {
+ me["Simple_L5"].setFontSize(normal);
+ } else {
+ me["Simple_L5"].setFontSize(small);
+ }
+ if (engOutAccSet.getValue() == 1) {
+ me["Simple_R5"].setFontSize(normal);
+ } else {
+ me["Simple_R5"].setFontSize(small);
+ }
+
+ me["Simple_L5"].setText(sprintf("%s", clbReducFt.getValue() ~ "/" ~ reducFt.getValue()));
+ me["Simple_L6"].setText(" PHASE");
+ me["Simple_L5S"].setText("THR RED/ACC");
+ me["Simple_L6S"].setText(" PREV");
+ me["Simple_R5"].setText(sprintf("%3.0f", engOutAcc.getValue()));
+ me["Simple_R5S"].setText("ENG OUT ACC");
+
+ if (zfwSet.getValue() == 1 and blockSet.getValue() == 1) {
+ lbs1000 = KG2LB * num(zfw.getValue() + block.getValue());
+
+ tgt_f = ((0.4352 * lbs1000) + 51.006) * 1.47;
+ setprop("FMGC/internal/f-speed", tgt_f);
+ tgt_s = ((0.0024 * lbs1000 * lbs1000) + (0.124 * lbs1000) + 88.942) * 1.23;
+ setprop("FMGC/internal/s-speed", tgt_s);
+ tgt_clean = 2 * lbs1000 * 0.45359237 + 85;
+ if (altitude.getValue() > 20000) {
+ tgt_clean += (altitude.getValue() - 20000) / 1000;
+ }
+ setprop("FMGC/internal/o-speed", tgt_clean);
+
+ me["Simple_C1"].setText(sprintf("%3.0f", f_speed.getValue()));
+ me["Simple_C2"].setText(sprintf("%3.0f", s_speed.getValue()));
+ me["Simple_C3"].setText(sprintf("%3.0f", o_speed.getValue()));
+ } else {
+ me["Simple_C1"].setText(" ---");
+ me["Simple_C2"].setText(" ---");
+ me["Simple_C3"].setText(" ---");
+ }
+
+ 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") {
if (!pageSwitch[i].getBoolValue()) {
me["Simple"].show();
@@ -1802,6 +2002,7 @@ var canvas_MCDU_base = {
me["PERFTO"].hide();
me["arrowsDepArr"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["Simple_Title"].setText(sprintf("%s", page));
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
@@ -3401,6 +3602,7 @@ var canvas_MCDU_base = {
me["INITB"].hide();
me["PERFTO"].hide();
me["PERFAPPR"].hide();
+ me["PERFGA"].hide();
me["ArrowLeft"].hide();
me["ArrowRight"].hide();
diff --git a/Models/Instruments/MCDU/res/mcdu.svg b/Models/Instruments/MCDU/res/mcdu.svg
index 22aceabc..5ad19c52 100644
--- a/Models/Instruments/MCDU/res/mcdu.svg
+++ b/Models/Instruments/MCDU/res/mcdu.svg
@@ -2120,4 +2120,87 @@
y="385.6102"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">=
+
+ F
+ S
+ O
+ =
+ =
+ =
+
diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas
index c8d472e8..2e26a485 100644
--- a/Models/Instruments/PFD/PFD.nas
+++ b/Models/Instruments/PFD/PFD.nas
@@ -88,7 +88,6 @@ var fd_pitch = props.globals.getNode("it-autoflight/fd/pitch-bar", 1);
var decision = props.globals.getNode("instrumentation/mk-viii/inputs/arinc429/decision-height", 1);
var slip_skid = props.globals.getNode("instrumentation/pfd/slip-skid", 1);
var FMGCphase = props.globals.getNode("FMGC/status/phase", 1);
-var tostate = props.globals.getNode("FMGC/status/to-state", 1);
var loc = props.globals.getNode("instrumentation/nav[0]/heading-needle-deflection-norm", 1);
var gs = props.globals.getNode("instrumentation/nav[0]/gs-needle-deflection-norm", 1);
var show_hdg = props.globals.getNode("it-autoflight/custom/show-hdg", 1);
@@ -1202,11 +1201,11 @@ var canvas_PFD_1 = {
me.SPDv1trgtdiff = tgt_v1 - ind_spd;
- if (tostate.getValue() == '1' and me.SPDv1trgtdiff >= -42 and me.SPDv1trgtdiff <= 42) {
+ if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2 and me.SPDv1trgtdiff >= -42 and me.SPDv1trgtdiff <= 42) {
me["v1_group"].show();
me["v1_text"].hide();
me["v1_group"].setTranslation(0, me.V1trgt * -6.6);
- } else if (tostate.getValue() == '1') {
+ } else if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2) {
me["v1_group"].hide();
me["v1_text"].show();
me["v1_text"].setText(sprintf("%3.0f", v1.getValue()));
@@ -1231,7 +1230,7 @@ var canvas_PFD_1 = {
me.SPDvrtrgtdiff = tgt_vr - ind_spd;
- if (tostate.getValue() == '1' and me.SPDvrtrgtdiff >= -42 and me.SPDvrtrgtdiff <= 42) {
+ if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2 and me.SPDvrtrgtdiff >= -42 and me.SPDvrtrgtdiff <= 42) {
me["vr_speed"].show();
me["vr_speed"].setTranslation(0, me.VRtrgt * -6.6);
} else {
@@ -1253,11 +1252,11 @@ var canvas_PFD_1 = {
me.SPDv2trgtdiff = tgt_v2 - ind_spd;
- if (tostate.getValue() == '1' and me.SPDv2trgtdiff >= -42 and me.SPDv2trgtdiff <= 42) {
+ if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2 and me.SPDv2trgtdiff >= -42 and me.SPDv2trgtdiff <= 42) {
me["ASI_target"].show();
me["ASI_target"].setTranslation(0, me.V2trgt * -6.6);
me["ASI_digit_UP"].setText(sprintf("%3.0f", v2.getValue()));
- } else if (tostate.getValue() == '1') {
+ } else if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2) {
me["ASI_target"].hide();
me["ASI_digit_UP"].setText(sprintf("%3.0f", v2.getValue()));
}
@@ -1848,11 +1847,11 @@ var canvas_PFD_2 = {
me.SPDv1trgtdiff = tgt_v1 - ind_spd;
- if (tostate.getValue() == '1' and me.SPDv1trgtdiff >= -42 and me.SPDv1trgtdiff <= 42) {
+ if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2 and me.SPDv1trgtdiff >= -42 and me.SPDv1trgtdiff <= 42) {
me["v1_group"].show();
me["v1_text"].hide();
me["v1_group"].setTranslation(0, me.V1trgt * -6.6);
- } else if (tostate.getValue() == '1') {
+ } else if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2) {
me["v1_group"].hide();
me["v1_text"].show();
me["v1_text"].setText(sprintf("%3.0f", v1.getValue()));
@@ -1877,7 +1876,7 @@ var canvas_PFD_2 = {
me.SPDvrtrgtdiff = tgt_vr - ind_spd;
- if (tostate.getValue() == '1' and me.SPDvrtrgtdiff >= -42 and me.SPDvrtrgtdiff <= 42) {
+ if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2 and me.SPDvrtrgtdiff >= -42 and me.SPDvrtrgtdiff <= 42) {
me["vr_speed"].show();
me["vr_speed"].setTranslation(0, me.VRtrgt * -6.6);
} else {
@@ -1899,11 +1898,11 @@ var canvas_PFD_2 = {
me.SPDv2trgtdiff = tgt_v2 - ind_spd;
- if (tostate.getValue() == '1' and me.SPDv2trgtdiff >= -42 and me.SPDv2trgtdiff <= 42) {
+ if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2 and me.SPDv2trgtdiff >= -42 and me.SPDv2trgtdiff <= 42) {
me["ASI_target"].show();
me["ASI_target"].setTranslation(0, me.V2trgt * -6.6);
me["ASI_digit_UP"].setText(sprintf("%3.0f", v2.getValue()));
- } else if (tostate.getValue() == '1') {
+ } else if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2) {
me["ASI_target"].hide();
me["ASI_digit_UP"].setText(sprintf("%3.0f", v2.getValue()));
}
diff --git a/Models/Liveries/A320/CFM-NEO/FLI.png b/Models/Liveries/A320/CFM-NEO/FLI.png
new file mode 100644
index 00000000..ed74f89e
Binary files /dev/null and b/Models/Liveries/A320/CFM-NEO/FLI.png differ
diff --git a/Models/Liveries/A320/CFM-NEO/FLI.xml b/Models/Liveries/A320/CFM-NEO/FLI.xml
new file mode 100644
index 00000000..d597c252
--- /dev/null
+++ b/Models/Liveries/A320/CFM-NEO/FLI.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Atlantic Airways (OY-RCK)
+ Liveries/A320/CFM-NEO/FLI.png
+
+
+
+
+
diff --git a/Models/Liveries/A320/CFM/FLI.png b/Models/Liveries/A320/CFM/FLI.png
new file mode 100644
index 00000000..1ead9406
Binary files /dev/null and b/Models/Liveries/A320/CFM/FLI.png differ
diff --git a/Models/Liveries/A320/CFM/FLI.xml b/Models/Liveries/A320/CFM/FLI.xml
new file mode 100644
index 00000000..0ab18fdc
--- /dev/null
+++ b/Models/Liveries/A320/CFM/FLI.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ Atlantic Airways (OY-RCJ)
+ Liveries/A320/CFM/FLI.png
+
+
+
+
+
+ 1
+
+
+ 0
+
diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas
index 2e912fcb..fadd2624 100644
--- a/Nasal/FMGC/FMGC-b.nas
+++ b/Nasal/FMGC/FMGC-b.nas
@@ -153,7 +153,7 @@ var Text = {
};
var Setting = {
- reducAglFt: props.globals.initNode("/it-autoflight/settings/reduc-agl-ft", 3000, "INT"), # Changable from MCDU
+ reducAglFt: props.globals.initNode("/it-autoflight/settings/reduc-agl-ft", 1500, "INT"), # Changable from MCDU #eventually set to 1500 above runway
};
var Sound = {
diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas
index 5c2de16d..542db553 100644
--- a/Nasal/FMGC/FMGC.nas
+++ b/Nasal/FMGC/FMGC.nas
@@ -102,7 +102,7 @@ setprop("FMGC/internal/mng-spd", 157);
setprop("FMGC/internal/mng-spd-cmd", 157);
setprop("FMGC/internal/mng-kts-mach", 0);
setprop("FMGC/internal/mach-switchover", 0);
-setprop("it-autoflight/settings/reduc-agl-ft", 3000);
+setprop("it-autoflight/settings/reduc-agl-ft", 1500); #eventually set to 1500 above runway
setprop("it-autoflight/internal/vert-speed-fpm", 0);
setprop("it-autoflight/output/fma-pwr", 0);
setprop("instrumentation/nav[0]/nav-id", "XXX");
@@ -123,7 +123,7 @@ var FMGCinit = func {
setprop("FMGC/internal/mng-spd-cmd", 157);
setprop("FMGC/internal/mng-kts-mach", 0);
setprop("FMGC/internal/mach-switchover", 0);
- setprop("it-autoflight/settings/reduc-agl-ft", 3000);
+ setprop("it-autoflight/settings/reduc-agl-ft", 1500); #eventually set to 1500 above runway
setprop("FMGC/internal/decel", 0);
setprop("FMGC/internal/loc-source", "NAV0");
setprop("FMGC/internal/optalt", 0);
diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas
index bbbf5316..011ed6b4 100644
--- a/Nasal/MCDU/MCDU.nas
+++ b/Nasal/MCDU/MCDU.nas
@@ -3,695 +3,712 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
var MCDU_init = func(i) {
- MCDU_reset(i); # Reset MCDU, clears data
+ MCDU_reset(i); # Reset MCDU, clears data
}
var MCDU_reset = func(i) {
- setprop("MCDU[" ~ i ~ "]/active", 0);
- setprop("it-autoflight/settings/togaspd", 157);
- setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
- setprop("MCDU[" ~ i ~ "]/last-page", "NONE");
- setprop("MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS");
- setprop("MCDU[" ~ i ~ "]/page", "MCDU");
- setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("MCDUC/flight-num", "");
- setprop("MCDUC/thracc-set", 0);
- setprop("MCDUC/reducacc-set", 0);
- setprop("MCDUC/flight-num-set", 0);
- setprop("FMGC/internal/flex", 0);
- setprop("FMGC/internal/dep-arpt", "");
- setprop("FMGC/internal/arr-arpt", "");
- setprop("FMGC/internal/cruise-ft", 10000);
- setprop("FMGC/internal/cruise-fl", 100);
- setprop("FMGC/internal/cost-index", "0");
- setprop("FMGC/internal/trans-alt", 18000);
- setprop("FMGC/internal/reduc-agl-ft", "3000");
- setprop("FMGC/internal/eng-out-reduc", "3500");
- setprop("FMGC/internal/v1", 0);
- setprop("FMGC/internal/vr", 0);
- setprop("FMGC/internal/v2", 0);
- setprop("FMGC/internal/block", 0.0);
- setprop("FMGC/internal/zfw", 0);
- setprop("FMGC/internal/zfwcg", 55.1); # 25KG default
- setprop("FMGC/internal/v1-set", 0);
- setprop("FMGC/internal/vr-set", 0);
- setprop("FMGC/internal/v2-set", 0);
- setprop("FMGC/internal/block-set", 0);
- setprop("FMGC/internal/zfw-set", 0);
- setprop("FMGC/internal/zfwcg-set", 0);
- setprop("FMGC/internal/to-flap", 0);
- setprop("FMGC/internal/to-ths", "0.0");
- setprop("FMGC/internal/tofrom-set", 0);
- setprop("FMGC/internal/cost-index-set", 0);
- setprop("FMGC/internal/cruise-lvl-set", 0);
- setprop("FMGC/internal/flap-ths-set", 0);
- setprop("FMGC/internal/flex-set", 0);
- setprop("FMGC/internal/ils1freq-set", 0);
- setprop("FMGC/internal/ils1crs-set", 0);
- setprop("FMGC/internal/vor1freq-set", 0);
- setprop("FMGC/internal/vor1crs-set", 0);
- setprop("FMGC/internal/vor2freq-set", 0);
- setprop("FMGC/internal/vor2crs-set", 0);
- setprop("FMGC/internal/adf1freq-set", 0);
- setprop("FMGC/internal/adf2freq-set", 0);
- setprop("FMGC/internal/navdatabase", "01JAN-28JAN");
- setprop("FMGC/internal/navdatabase2", "29JAN-26FEB");
- setprop("FMGC/internal/navdatabasecode", "AB20170101");
- setprop("FMGC/internal/navdatabasecode2", "AB20170102");
- setprop("FMGC/print/mcdu/page1/L1auto", 0);
- setprop("FMGC/print/mcdu/page1/L2auto", 0);
- setprop("FMGC/print/mcdu/page1/L3auto", 0);
- setprop("FMGC/print/mcdu/page1/R1req", 0);
- setprop("FMGC/print/mcdu/page1/R2req", 0);
- setprop("FMGC/print/mcdu/page1/R3req", 0);
- setprop("FMGC/print/mcdu/page2/L1auto", 0);
- setprop("FMGC/print/mcdu/page2/L2auto", 0);
- setprop("FMGC/print/mcdu/page2/L3auto", 0);
- setprop("FMGC/print/mcdu/page2/L4auto", 0);
- setprop("FMGC/print/mcdu/page2/R1req", 0);
- setprop("FMGC/print/mcdu/page2/R2req", 0);
- setprop("FMGC/print/mcdu/page2/R3req", 0);
- setprop("FMGC/print/mcdu/page2/R4req", 0);
- setprop("FMGC/internal/tropo", 36090);
- setprop("FMGC/internal/tropo-set", 0);
+ setprop("MCDU[" ~ i ~ "]/active", 0);
+ setprop("it-autoflight/settings/togaspd", 157);
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/last-page", "NONE");
+ setprop("MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS");
+ setprop("MCDU[" ~ i ~ "]/page", "MCDU");
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDUC/flight-num", "");
+ setprop("MCDUC/thracc-set", 0);
+ setprop("MCDUC/reducacc-set", 0);
+ setprop("MCDUC/flight-num-set", 0);
+ setprop("FMGC/internal/flex", 0);
+ setprop("FMGC/internal/dep-arpt", "");
+ setprop("FMGC/internal/arr-arpt", "");
+ setprop("FMGC/internal/cruise-ft", 10000);
+ setprop("FMGC/internal/cruise-fl", 100);
+ setprop("FMGC/internal/cost-index", "0");
+ setprop("FMGC/internal/trans-alt", 18000);
+ setprop("FMGC/internal/reduc-agl-ft", "1500"); #eventually set to 1500 above runway
+ setprop("FMGC/internal/eng-out-reduc", "1500");
+ setprop("FMGC/internal/v1", 0);
+ setprop("FMGC/internal/vr", 0);
+ setprop("FMGC/internal/v2", 0);
+ setprop("FMGC/internal/f-speed", 0);
+ setprop("FMGC/internal/s-speed", 0);
+ setprop("FMGC/internal/o-speed", 0);
+ setprop("FMGC/internal/minspeed", 0);
+ #setprop("FMGC/internal/vapp-speed", 0);
+ setprop("FMGC/internal/vr", 0);
+ setprop("FMGC/internal/v2", 0);
+ setprop("FMGC/internal/block", 0.0);
+ setprop("FMGC/internal/zfw", 0);
+ setprop("FMGC/internal/zfwcg", 55.1); # 25KG default
+ setprop("FMGC/internal/v1-set", 0);
+ setprop("FMGC/internal/vr-set", 0);
+ setprop("FMGC/internal/v2-set", 0);
+ setprop("FMGC/internal/block-set", 0);
+ setprop("FMGC/internal/zfw-set", 0);
+ setprop("FMGC/internal/zfwcg-set", 0);
+ setprop("FMGC/internal/to-flap", 0);
+ setprop("FMGC/internal/to-ths", "0.0");
+ setprop("FMGC/internal/tofrom-set", 0);
+ setprop("FMGC/internal/cost-index-set", 0);
+ setprop("FMGC/internal/cruise-lvl-set", 0);
+ setprop("FMGC/internal/flap-ths-set", 0);
+ setprop("FMGC/internal/flex-set", 0);
+ setprop("FMGC/internal/ils1freq-set", 0);
+ setprop("FMGC/internal/ils1crs-set", 0);
+ setprop("FMGC/internal/vor1freq-set", 0);
+ setprop("FMGC/internal/vor1crs-set", 0);
+ setprop("FMGC/internal/vor2freq-set", 0);
+ setprop("FMGC/internal/vor2crs-set", 0);
+ setprop("FMGC/internal/adf1freq-set", 0);
+ setprop("FMGC/internal/adf2freq-set", 0);
+ setprop("FMGC/internal/navdatabase", "01JAN-28JAN");
+ setprop("FMGC/internal/navdatabase2", "29JAN-26FEB");
+ setprop("FMGC/internal/navdatabasecode", "AB20170101");
+ setprop("FMGC/internal/navdatabasecode2", "AB20170102");
+ setprop("FMGC/print/mcdu/page1/L1auto", 0);
+ setprop("FMGC/print/mcdu/page1/L2auto", 0);
+ setprop("FMGC/print/mcdu/page1/L3auto", 0);
+ setprop("FMGC/print/mcdu/page1/R1req", 0);
+ setprop("FMGC/print/mcdu/page1/R2req", 0);
+ setprop("FMGC/print/mcdu/page1/R3req", 0);
+ setprop("FMGC/print/mcdu/page2/L1auto", 0);
+ setprop("FMGC/print/mcdu/page2/L2auto", 0);
+ setprop("FMGC/print/mcdu/page2/L3auto", 0);
+ setprop("FMGC/print/mcdu/page2/L4auto", 0);
+ setprop("FMGC/print/mcdu/page2/R1req", 0);
+ setprop("FMGC/print/mcdu/page2/R2req", 0);
+ setprop("FMGC/print/mcdu/page2/R3req", 0);
+ setprop("FMGC/print/mcdu/page2/R4req", 0);
+ setprop("FMGC/internal/tropo", 36090);
+ setprop("FMGC/internal/tropo-set", 0);
}
var lskbutton = func(btn, i) {
- if (btn == "1") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "MCDU") {
- if (getprop("MCDU[" ~ i ~ "]/active") != 2) {
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("MCDU[" ~ i ~ "]/scratchpad", "WAIT FOR SYSTEM RESPONSE");
- setprop("MCDU[" ~ i ~ "]/active", 1);
- settimer(func(){
- setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-fmgc-page"));
- setprop("MCDU[" ~ i ~ "]/scratchpad", "");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("MCDU[" ~ i ~ "]/active", 2);
- }, 2);
- } else {
- setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-fmgc-page"));
- setprop("MCDU[" ~ i ~ "]/scratchpad", "");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- }
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
- perfTOInput("L1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
- perfAPPRInput("L1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
- radnavInput("L1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
- dataInput("L1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- printInput("L1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("L1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
- if (canvas_mcdu.myDeparture[i] != nil) {
- canvas_mcdu.myDeparture[i].del();
- }
- canvas_mcdu.myDeparture[i] = nil;
- canvas_mcdu.myDeparture[i] = departurePage.new(canvas_mcdu.myLatRev[i].title[2], i);
- setprop("MCDU[" ~ i ~ "]/page", "DEPARTURE");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonLeft(1);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
- canvas_mcdu.myDuplicate[i].pushButtonLeft(1);
- } else {
- notAllowed(i);
- }
- } else if (btn == "2") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
- PerfInput("L2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
- perfTOInput("L2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
- perfAPPRInput("L2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
- radnavInput("L2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
- initInputA("L5", i); # Does the same thing as on the INIT page
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
- initInputA("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
- initInputA("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
- dataInput("L2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- printInput("L2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("L2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonLeft(2);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].depPushbuttonLeft(2);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].arrPushbuttonLeft(2);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
- canvas_mcdu.myDuplicate[i].pushButtonLeft(2);
- } else {
- notAllowed(i);
- }
- } else if (btn == "3") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
- initInputA("L3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
- perfTOInput("L3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
- perfAPPRInput("L3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "STATUS") {
- statusInput("L3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
- radnavInput("L3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- printInput("L3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("L3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonLeft(3);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].depPushbuttonLeft(3);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].arrPushbuttonLeft(3);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
- canvas_mcdu.myDuplicate[i].pushButtonLeft(3);
- } else {
- notAllowed(i);
- }
- } else if (btn == "4") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
- setprop("MCDU[" ~ i ~ "]/page", "STATUS");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
- perfTOInput("L4", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
- perfAPPRInput("L4", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
- radnavInput("L4", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("L4", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonLeft(4);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].depPushbuttonLeft(4);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].arrPushbuttonLeft(4);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
- canvas_mcdu.myDuplicate[i].pushButtonLeft(4);
- } else {
- notAllowed(i);
- }
- } else if (btn == "5") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
- initInputA("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
- perfTOInput("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
- perfCLBInput("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
- perfCRZInput("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
- perfDESInput("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
- perfAPPRInput("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
- radnavInput("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- printInput("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("L5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonLeft(5);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].depPushbuttonLeft(5);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].arrPushbuttonLeft(5);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
- canvas_mcdu.myDuplicate[i].pushButtonLeft(5);
- } else {
- notAllowed(i);
- }
- } else if (btn == "6") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
- initInputA("L6", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
- perfCLBInput("L6", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
- perfCRZInput("L6", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
- perfDESInput("L6", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
- perfAPPRInput("L6",i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("L6", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonLeft(6);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV" or getprop("MCDU[" ~ i ~ "]/page") == "VERTREV" or getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
- setprop("MCDU[" ~ i ~ "]/page", "F-PLNA");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE" or getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- if (fmgc.flightPlanController.temporaryFlag[i]) {
- setprop("MCDU[" ~ i ~ "]/page", "F-PLNA");
- } else {
- setprop("MCDU[" ~ i ~ "]/page", "LATREV");
- }
- } else {
- notAllowed(i);
- }
- }
+ if (btn == "1") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "MCDU") {
+ if (getprop("MCDU[" ~ i ~ "]/active") != 2) {
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "WAIT FOR SYSTEM RESPONSE");
+ setprop("MCDU[" ~ i ~ "]/active", 1);
+ settimer(func(){
+ setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-fmgc-page"));
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/active", 2);
+ }, 2);
+ } else {
+ setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-fmgc-page"));
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ }
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
+ perfTOInput("L1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ perfAPPRInput("L1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ radnavInput("L1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
+ dataInput("L1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ printInput("L1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("L1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
+ if (canvas_mcdu.myDeparture[i] != nil) {
+ canvas_mcdu.myDeparture[i].del();
+ }
+ canvas_mcdu.myDeparture[i] = nil;
+ canvas_mcdu.myDeparture[i] = departurePage.new(canvas_mcdu.myLatRev[i].title[2], i);
+ setprop("MCDU[" ~ i ~ "]/page", "DEPARTURE");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonLeft(1);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
+ canvas_mcdu.myDuplicate[i].pushButtonLeft(1);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "2") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ PerfInput("L2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
+ perfTOInput("L2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ perfAPPRInput("L2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ radnavInput("L2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
+ initInputA("L5", i); # Does the same thing as on the INIT page
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
+ initInputA("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
+ initInputA("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
+ dataInput("L2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ printInput("L2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("L2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonLeft(2);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].depPushbuttonLeft(2);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].arrPushbuttonLeft(2);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
+ canvas_mcdu.myDuplicate[i].pushButtonLeft(2);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "3") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ initInputA("L3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
+ perfTOInput("L3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ perfAPPRInput("L3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "STATUS") {
+ statusInput("L3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ radnavInput("L3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ printInput("L3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("L3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonLeft(3);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].depPushbuttonLeft(3);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].arrPushbuttonLeft(3);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
+ canvas_mcdu.myDuplicate[i].pushButtonLeft(3);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "4") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
+ setprop("MCDU[" ~ i ~ "]/page", "STATUS");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
+ perfTOInput("L4", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ perfAPPRInput("L4", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ radnavInput("L4", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("L4", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonLeft(4);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].depPushbuttonLeft(4);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].arrPushbuttonLeft(4);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
+ canvas_mcdu.myDuplicate[i].pushButtonLeft(4);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "5") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ initInputA("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
+ perfTOInput("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
+ perfCLBInput("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
+ perfCRZInput("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
+ perfDESInput("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ perfAPPRInput("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "GA") {
+ perfGAInput("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ radnavInput("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ printInput("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("L5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonLeft(5);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].depPushbuttonLeft(5);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].arrPushbuttonLeft(5);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
+ canvas_mcdu.myDuplicate[i].pushButtonLeft(5);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "6") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ initInputA("L6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
+ perfCLBInput("L6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
+ perfCRZInput("L6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
+ perfDESInput("L6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ perfAPPRInput("L6",i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "GA") {
+ perfGAInput("L6",i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("L6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonLeft(6);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV" or getprop("MCDU[" ~ i ~ "]/page") == "VERTREV" or getprop("MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
+ setprop("MCDU[" ~ i ~ "]/page", "F-PLNA");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE" or getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ if (fmgc.flightPlanController.temporaryFlag[i]) {
+ setprop("MCDU[" ~ i ~ "]/page", "F-PLNA");
+ } else {
+ setprop("MCDU[" ~ i ~ "]/page", "LATREV");
+ }
+ } else {
+ notAllowed(i);
+ }
+ }
}
var lskbutton_b = func(btn, i) {
- # Special Middle Click Functions
+ # Special Middle Click Functions
}
var rskbutton = func(btn, i) {
- if (btn == "1") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
- initInputA("R1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
- initInputB("R1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
- radnavInput("R1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- printInput("R1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("R1", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
- if (canvas_mcdu.myArrival[i] != nil) {
- canvas_mcdu.myArrival[i].del();
- }
- canvas_mcdu.myArrival[i] = nil;
- canvas_mcdu.myArrival[i] = arrivalPage.new(canvas_mcdu.myLatRev[i].title[2], i);
- setprop("MCDU[" ~ i ~ "]/page", "ARRIVAL");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonRight(1);
- } else {
- notAllowed(i);
- }
- } else if (btn == "2") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
- initInputB("R2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
- perfAPPRInput("R2",i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
- radnavInput("R2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- printInput("R2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("R2", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].depPushbuttonRight(2);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].arrPushbuttonRight(2);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonRight(2);
- } else {
- notAllowed(i);
- }
- } else if (btn == "3") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
- initInputA("R3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
- perfTOInput("R3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
- perfAPPRInput("R3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- printInput("R3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("R3", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].depPushbuttonRight(3);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].arrPushbuttonRight(3);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
- if (canvas_mcdu.myLatRev[i].type != 2) {
- canvas_mcdu.myLatRev[i].nextWpt();
- } else {
- notAllowed(i);
- }
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonRight(3);
- } else {
- notAllowed(i);
- }
- } else if (btn == "4") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
- perfTOInput("R4", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
- perfAPPRInput("R4", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
- radnavInput("R4", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- printInput2("R4", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].depPushbuttonRight(4);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].arrPushbuttonRight(4);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonRight(4);
- } else {
- notAllowed(i);
- }
- } else if (btn == "5") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
- perfTOInput("R5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
- radnavInput("R5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
- dataInput("R5", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].depPushbuttonRight(5);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].arrPushbuttonRight(5);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonRight(5);
- } else {
- notAllowed(i);
- }
- } else if (btn == "6") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "MCDU") {
- if (getprop("MCDU[" ~ i ~ "]/last-page") != "NONE") {
- setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-page"));
- setprop("MCDU[" ~ i ~ "]/scratchpad", "");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else {
- notAllowed(i);
- }
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
- perfTOInput("R6", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
- perfCLBInput("R6", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
- perfCRZInput("R6", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
- perfDESInput("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") {
- if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
- setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
- } else {
- setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
- }
- }
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("MCDU[" ~ i ~ "]/scratchpad", "AOC DISABLED");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
- initInputA("R6", i);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].pushButtonRight(6);
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "VERTREV") {
- setprop("MCDU/[" ~ i ~ "]/page", "F-PLNA");
- } else {
- notAllowed(i);
- }
- }
+ if (btn == "1") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ initInputA("R1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
+ initInputB("R1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ radnavInput("R1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ printInput("R1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("R1", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
+ if (canvas_mcdu.myArrival[i] != nil) {
+ canvas_mcdu.myArrival[i].del();
+ }
+ canvas_mcdu.myArrival[i] = nil;
+ canvas_mcdu.myArrival[i] = arrivalPage.new(canvas_mcdu.myLatRev[i].title[2], i);
+ setprop("MCDU[" ~ i ~ "]/page", "ARRIVAL");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonRight(1);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "2") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
+ initInputB("R2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ perfAPPRInput("R2",i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ radnavInput("R2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ printInput("R2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("R2", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].depPushbuttonRight(2);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].arrPushbuttonRight(2);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonRight(2);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "3") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ initInputA("R3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
+ perfTOInput("R3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ perfAPPRInput("R3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ printInput("R3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("R3", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].depPushbuttonRight(3);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].arrPushbuttonRight(3);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
+ if (canvas_mcdu.myLatRev[i].type != 2) {
+ canvas_mcdu.myLatRev[i].nextWpt();
+ } else {
+ notAllowed(i);
+ }
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonRight(3);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "4") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
+ perfTOInput("R4", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ perfAPPRInput("R4", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ radnavInput("R4", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ printInput2("R4", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].depPushbuttonRight(4);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].arrPushbuttonRight(4);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonRight(4);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "5") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
+ perfTOInput("R5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "GA") {
+ perfGAInput("R5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ radnavInput("R5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
+ dataInput("R5", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].depPushbuttonRight(5);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].arrPushbuttonRight(5);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonRight(5);
+ } else {
+ notAllowed(i);
+ }
+ } else if (btn == "6") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "MCDU") {
+ if (getprop("MCDU[" ~ i ~ "]/last-page") != "NONE") {
+ setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-page"));
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else {
+ notAllowed(i);
+ }
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
+ perfTOInput("R6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
+ perfCLBInput("R6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
+ perfCRZInput("R6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
+ perfDESInput("R6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "APPR") {
+ 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") {
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
+ } else {
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
+ }
+ }
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "AOC DISABLED");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ initInputA("R6", i);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].pushButtonRight(6);
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "VERTREV") {
+ setprop("MCDU/[" ~ i ~ "]/page", "F-PLNA");
+ } else {
+ notAllowed(i);
+ }
+ }
}
var rskbutton_b = func(btn, i) {
- # Special Middle Click Functions
+ # Special Middle Click Functions
}
var arrowbutton = func(btn, i) {
- if (btn == "left") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
- setprop("MCDU[" ~ i ~ "]/page", "DATA2");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA2") {
- setprop("MCDU[" ~ i ~ "]/page", "DATA");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
- if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
- setprop("MCDU[" ~ i ~ "]/page", "INITB");
- }
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
- setprop("MCDU[" ~ i ~ "]/page", "INITA");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].scrollLeft();
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].scrollLeft();
- }
- } else if (btn == "right") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
- setprop("MCDU[" ~ i ~ "]/page", "DATA2");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA2") {
- setprop("MCDU[" ~ i ~ "]/page", "DATA");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
- if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
- setprop("MCDU[" ~ i ~ "]/page", "INITB");
- }
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
- setprop("MCDU[" ~ i ~ "]/page", "INITA");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].scrollRight();
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].scrollRight();
- }
- } else if (btn == "up") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].scrollUp();
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].scrollUp();
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].scrollUp();
- }
- } else if (btn == "down") {
- if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
- canvas_mcdu.myFpln[i].scrollDn();
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
- canvas_mcdu.myDeparture[i].scrollDn();
- } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
- canvas_mcdu.myArrival[i].scrollDn();
- }
- }
+ if (btn == "left") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
+ setprop("MCDU[" ~ i ~ "]/page", "DATA2");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA2") {
+ setprop("MCDU[" ~ i ~ "]/page", "DATA");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
+ setprop("MCDU[" ~ i ~ "]/page", "INITB");
+ }
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].scrollLeft();
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].scrollLeft();
+ }
+ } else if (btn == "right") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
+ setprop("MCDU[" ~ i ~ "]/page", "DATA2");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA2") {
+ setprop("MCDU[" ~ i ~ "]/page", "DATA");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
+ setprop("MCDU[" ~ i ~ "]/page", "INITB");
+ }
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].scrollRight();
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].scrollRight();
+ }
+ } else if (btn == "up") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].scrollUp();
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].scrollUp();
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].scrollUp();
+ }
+ } else if (btn == "down") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
+ canvas_mcdu.myFpln[i].scrollDn();
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
+ canvas_mcdu.myDeparture[i].scrollDn();
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "ARRIVAL") {
+ canvas_mcdu.myArrival[i].scrollDn();
+ }
+ }
}
var pagebutton = func(btn, i) {
- if (getprop("MCDU[" ~ i ~ "]/page") != "MCDU") {
- if (btn == "radnav") {
- setprop("MCDU[" ~ i ~ "]/page", "RADNAV");
- } else if (btn == "perf") {
- if (getprop("FMGC/status/phase") == 0 or getprop("FMGC/status/phase") == 1) {
- setprop("MCDU[" ~ i ~ "]/page", "TO");
- } else if (getprop("FMGC/status/phase") == 2) {
- setprop("MCDU[" ~ i ~ "]/page", "CLB");
- } else if (getprop("FMGC/status/phase") == 3) {
- setprop("MCDU[" ~ i ~ "]/page", "CRZ");
- } else if (getprop("FMGC/status/phase") == 4) {
- setprop("MCDU[" ~ i ~ "]/page", "DES");
- } else if (getprop("FMGC/status/phase") == 5) {
- setprop("MCDU[" ~ i ~ "]/page", "APPR");
- }
- } else if (btn == "init") {
- setprop("MCDU[" ~ i ~ "]/page", "INITA");
- } else if (btn == "data") {
- setprop("MCDU[" ~ i ~ "]/page", "DATA");
- } else if (btn == "mcdu") {
- setprop("MCDU[" ~ i ~ "]/last-page", getprop("MCDU[" ~ i ~ "]/page"));
- setprop("MCDU[" ~ i ~ "]/last-fmgc-page", getprop("MCDU[" ~ i ~ "]/page"));
- setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
- setprop("MCDU[" ~ i ~ "]/page", "MCDU");
- } else if (btn == "f-pln") {
- if (fmgc.flightPlanController.active.getBoolValue()) {
- if (canvas_mcdu.myFpln[i] == nil) {
- canvas_mcdu.myFpln[i] = fplnPage.new(2, i);
- }
- setprop("MCDU[" ~ i ~ "]/page", "F-PLNA");
- } else {
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("MCDU[" ~ i ~ "]/scratchpad", "ERROR. INITIALIZE ROUTE"); # Should be ERROR:, but the : character doesn't show in our MCDU font right now...
- }
- } else if (btn == "fuel-pred") {
- setprop("MCDU[" ~ i ~ "]/page", "FUELPRED");
- }
- }
+ if (getprop("MCDU[" ~ i ~ "]/page") != "MCDU") {
+ if (btn == "radnav") {
+ setprop("MCDU[" ~ i ~ "]/page", "RADNAV");
+ } else if (btn == "perf") {
+ if (getprop("FMGC/status/phase") == 0 or getprop("FMGC/status/phase") == 1) {
+ setprop("MCDU[" ~ i ~ "]/page", "TO");
+ } else if (getprop("FMGC/status/phase") == 2) {
+ setprop("MCDU[" ~ i ~ "]/page", "CLB");
+ } else if (getprop("FMGC/status/phase") == 3) {
+ setprop("MCDU[" ~ i ~ "]/page", "CRZ");
+ } else if (getprop("FMGC/status/phase") == 4) {
+ setprop("MCDU[" ~ i ~ "]/page", "DES");
+ } else if (getprop("FMGC/status/phase") == 5) {
+ setprop("MCDU[" ~ i ~ "]/page", "APPR");
+ } else if (getprop("FMGC/status/phase") == 6) {
+ setprop("MCDU[" ~ i ~ "]/page", "GA");
+ }
+ } else if (btn == "init") {
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
+ } else if (btn == "data") {
+ setprop("MCDU[" ~ i ~ "]/page", "DATA");
+ } else if (btn == "mcdu") {
+ setprop("MCDU[" ~ i ~ "]/last-page", getprop("MCDU[" ~ i ~ "]/page"));
+ setprop("MCDU[" ~ i ~ "]/last-fmgc-page", getprop("MCDU[" ~ i ~ "]/page"));
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
+ setprop("MCDU[" ~ i ~ "]/page", "MCDU");
+ } else if (btn == "f-pln") {
+ if (fmgc.flightPlanController.active.getBoolValue()) {
+ if (canvas_mcdu.myFpln[i] == nil) {
+ canvas_mcdu.myFpln[i] = fplnPage.new(2, i);
+ }
+ setprop("MCDU[" ~ i ~ "]/page", "F-PLNA");
+ } else {
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "ERROR. INITIALIZE ROUTE"); # Should be ERROR:, but the : character doesn't show in our MCDU font right now...
+ }
+ } else if (btn == "fuel-pred") {
+ setprop("MCDU[" ~ i ~ "]/page", "FUELPRED");
+ }
+ }
}
var button = func(btn, i) {
- if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 0 and getprop("MCDU[" ~ i ~ "]/page") != "MCDU") {
- var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
- if (btn == "A") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "A");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "B") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "B");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "C") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "C");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "D") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "D");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "E") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "E");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "F") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "F");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "G") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "G");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "H") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "H");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "I") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "I");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "J") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "J");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "K") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "K");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "L") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "L");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "M") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "M");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "N") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "N");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "O") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "O");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "P") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "P");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "Q") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Q");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "R") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "R");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "S") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "S");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "T") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "T");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "U") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "U");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "V") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "V");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "W") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "W");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "X") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "X");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "Y") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Y");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "Z") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Z");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "SLASH") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "/");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "SP") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ " ");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "CLR") {
- var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
- if (size(scratchpad) == 0) {
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("MCDU[" ~ i ~ "]/scratchpad", "CLR");
- } else if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
- setprop("MCDU[" ~ i ~ "]/scratchpad", "");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (size(scratchpad) > 0) {
- setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
- setprop("MCDU[" ~ i ~ "]/scratchpad", left(scratchpad, size(scratchpad) - 1));
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- }
- } else if (btn == "0") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "0");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "1") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "1");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "2") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "2");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "3") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "3");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "4") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "4");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "5") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "5");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "6") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "6");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "7") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "7");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "8") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "8");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "9") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "9");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "DOT") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ ".");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- } else if (btn == "PLUSMINUS") {
- setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "-");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- }
- } else {
- if (btn == "CLR") {
- var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
- if (size(scratchpad) == 0) {
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("MCDU[" ~ i ~ "]/scratchpad", "CLR");
- } else if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
- setprop("MCDU[" ~ i ~ "]/scratchpad", getprop("MCDU[" ~ i ~ "]/last-scratchpad"));
- setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- }
- }
- }
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 0 and getprop("MCDU[" ~ i ~ "]/page") != "MCDU") {
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
+ if (btn == "A") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "A");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "B") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "B");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "C") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "C");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "D") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "D");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "E") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "E");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "F") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "F");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "G") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "G");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "H") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "H");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "I") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "I");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "J") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "J");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "K") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "K");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "L") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "L");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "M") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "M");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "N") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "N");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "O") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "O");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "P") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "P");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "Q") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Q");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "R") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "R");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "S") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "S");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "T") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "T");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "U") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "U");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "V") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "V");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "W") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "W");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "X") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "X");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "Y") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Y");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "Z") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Z");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "SLASH") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "/");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "SP") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ " ");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "CLR") {
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
+ if (size(scratchpad) == 0) {
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "CLR");
+ } else if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (size(scratchpad) > 0) {
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad", left(scratchpad, size(scratchpad) - 1));
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ }
+ } else if (btn == "0") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "0");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "1") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "1");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "2") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "2");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "3") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "3");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "4") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "4");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "5") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "5");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "6") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "6");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "7") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "7");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "8") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "8");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "9") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "9");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "DOT") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ ".");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ } else if (btn == "PLUSMINUS") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "-");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ }
+ } else {
+ if (btn == "CLR") {
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
+ if (size(scratchpad) == 0) {
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "CLR");
+ } else if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", getprop("MCDU[" ~ i ~ "]/last-scratchpad"));
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ }
+ }
+ }
}
var notAllowed = func(i) {
- if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "NOT ALLOWED") {
- if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
- setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
- } else {
- setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
- }
- }
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("MCDU[" ~ i ~ "]/scratchpad", "NOT ALLOWED");
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "NOT ALLOWED") {
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
+ } else {
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
+ }
+ }
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "NOT ALLOWED");
}
var formatError = func(i) {
- if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "FORMAT ERROR") {
- if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
- setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
- } else {
- setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
- }
- }
- setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("MCDU[" ~ i ~ "]/scratchpad", "FORMAT ERROR");
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "FORMAT ERROR") {
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
+ } else {
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
+ }
+ }
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "FORMAT ERROR");
}
var screenFlash = func(time, i) {
- var page = getprop("MCDU[" ~ i ~ "]/page");
- setprop("MCDU[" ~ i ~ "]/page", "NONE");
- settimer(func {
- setprop("MCDU[" ~ i ~ "]/page", page);
- }, time);
+ var page = getprop("MCDU[" ~ i ~ "]/page");
+ setprop("MCDU[" ~ i ~ "]/page", "NONE");
+ settimer(func {
+ setprop("MCDU[" ~ i ~ "]/page", page);
+ }, time);
}
diff --git a/Nasal/MCDU/PERFAPPR.nas b/Nasal/MCDU/PERFAPPR.nas
index 9c7ff805..faaccbfb 100644
--- a/Nasal/MCDU/PERFAPPR.nas
+++ b/Nasal/MCDU/PERFAPPR.nas
@@ -3,5 +3,7 @@
var perfAPPRInput = func(key, i) {
if (key == "L6") {
setprop("MCDU[" ~ i ~ "]/page", "DES");
+ } else if (key == "R6") {
+ setprop("MCDU[" ~ i ~ "]/page", "GA");
}
-}
+}
\ No newline at end of file
diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas
new file mode 100644
index 00000000..05d6061b
--- /dev/null
+++ b/Nasal/MCDU/PERFGA.nas
@@ -0,0 +1,51 @@
+# Copyright (c) 2020 Matthew Maring (hayden2000)
+
+# uses universal values, will implement separately once FPLN is finished
+
+var perfGAInput = func(key, i) {
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
+ if (key == "L5") {
+ if (scratchpad == "CLR") {
+ setprop("systems/thrust/clbreduc-ft", "1500");
+ setprop("FMGC/internal/reduc-agl-ft", "1500");
+ setprop("MCDUC/thracc-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ } else {
+ var tfs = size(scratchpad);
+ if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) {
+ var thracc = split("/", scratchpad);
+ var thrred = size(thracc[0]);
+ var acc = size(thracc[1]);
+ if ((thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) {
+ setprop("systems/thrust/clbreduc-ft", thracc[0]);
+ setprop("FMGC/internal/reduc-agl-ft", thracc[1]);
+ setprop("MCDUC/thracc-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ } else {
+ notAllowed(i);
+ }
+ } else {
+ notAllowed(i);
+ }
+ }
+ } else if (key == "L6") {
+ setprop("MCDU[" ~ i ~ "]/page", "APPR");
+ } else if (key == "R5") {
+ if (scratchpad == "CLR") {
+ setprop("FMGC/internal/eng-out-reduc", "1500");
+ setprop("MCDUC/reducacc-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ } else {
+ var tfs = size(scratchpad);
+ if (tfs >= 3 and tfs <= 5) {
+ setprop("FMGC/internal/eng-out-reduc", scratchpad);
+ setprop("MCDUC/reducacc-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ } else {
+ notAllowed(i);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas
index fea2bcd8..4f58df73 100644
--- a/Nasal/MCDU/PERFTO.nas
+++ b/Nasal/MCDU/PERFTO.nas
@@ -57,7 +57,7 @@ var perfTOInput = func(key, i) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("FMGC/internal/v2", scratchpad);
setprop("FMGC/internal/v2-set", 1);
- setprop("it-autoflight/settings/togaspd", scratchpad + 10);
+ setprop("it-autoflight/settings/togaspd", scratchpad);
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
@@ -85,7 +85,7 @@ var perfTOInput = func(key, i) {
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("systems/thrust/clbreduc-ft", "1500");
- setprop("FMGC/internal/reduc-agl-ft", "3000");
+ setprop("FMGC/internal/reduc-agl-ft", "1500");
setprop("MCDUC/thracc-set", 0);
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
@@ -162,7 +162,7 @@ var perfTOInput = func(key, i) {
}
} else if (key == "R5") {
if (scratchpad == "CLR") {
- setprop("FMGC/internal/eng-out-reduc", "3500");
+ setprop("FMGC/internal/eng-out-reduc", "1500");
setprop("MCDUC/reducacc-set", 0);
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
setprop("MCDU[" ~ i ~ "]/scratchpad", "");