This commit is contained in:
commit
77ded2396d
2 changed files with 678 additions and 296 deletions
|
@ -9,9 +9,11 @@ var MCDU_init = func {
|
||||||
|
|
||||||
var MCDU_reset = func {
|
var MCDU_reset = func {
|
||||||
setprop("/it-autoflight/settings/togaspd", 157);
|
setprop("/it-autoflight/settings/togaspd", 157);
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", "");
|
||||||
setprop("/MCDU[0]/last-fmgc-page", "STATUS");
|
setprop("/MCDU[0]/last-fmgc-page", "STATUS");
|
||||||
setprop("/MCDU[0]/page", "MCDU");
|
setprop("/MCDU[0]/page", "MCDU");
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "SELECT DESIRED SYSTEM");
|
||||||
|
setprop("/MCDU[0]/scratchpad-msg", 0);
|
||||||
setprop("/MCDUC/flight-num", "");
|
setprop("/MCDUC/flight-num", "");
|
||||||
setprop("/MCDUC/thracc-set", 0);
|
setprop("/MCDUC/thracc-set", 0);
|
||||||
setprop("/MCDUC/reducacc-set", 0);
|
setprop("/MCDUC/reducacc-set", 0);
|
||||||
|
@ -50,13 +52,15 @@ var lskbutton = func(btn) {
|
||||||
if (btn == "1") {
|
if (btn == "1") {
|
||||||
if (getprop("/MCDU[0]/page") == "MCDU") {
|
if (getprop("/MCDU[0]/page") == "MCDU") {
|
||||||
setprop("/MCDU[0]/page", getprop("/MCDU[0]/last-fmgc-page"));
|
setprop("/MCDU[0]/page", getprop("/MCDU[0]/last-fmgc-page"));
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
setprop("/MCDU[0]/scratchpad", "GPS PRIMARY");
|
|
||||||
} else if (getprop("/MCDU[0]/page") == "TO") {
|
} else if (getprop("/MCDU[0]/page") == "TO") {
|
||||||
perfTOInput("L1");
|
perfTOInput("L1");
|
||||||
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
||||||
radnavInput("L1");
|
radnavInput("L1");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -74,6 +78,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "DES") {
|
} else if (getprop("/MCDU[0]/page") == "DES") {
|
||||||
initInputA("L5");
|
initInputA("L5");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -85,6 +92,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
||||||
radnavInput("L3");
|
radnavInput("L3");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -96,6 +106,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
||||||
radnavInput("L4");
|
radnavInput("L4");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -111,6 +124,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "DES") {
|
} else if (getprop("/MCDU[0]/page") == "DES") {
|
||||||
perfDESInput("L5");
|
perfDESInput("L5");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -124,6 +140,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "DES") {
|
} else if (getprop("/MCDU[0]/page") == "DES") {
|
||||||
perfDESInput("L6");
|
perfDESInput("L6");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -141,6 +160,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
||||||
radnavInput("R1");
|
radnavInput("R1");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -150,6 +172,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
||||||
radnavInput("R2");
|
radnavInput("R2");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -159,6 +184,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "TO") {
|
} else if (getprop("/MCDU[0]/page") == "TO") {
|
||||||
perfTOInput("R3");
|
perfTOInput("R3");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -168,6 +196,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
|
||||||
radnavInput("R4");
|
radnavInput("R4");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -175,6 +206,9 @@ var rskbutton = func(btn) {
|
||||||
if (getprop("/MCDU[0]/page") == "TO") {
|
if (getprop("/MCDU[0]/page") == "TO") {
|
||||||
perfTOInput("R5");
|
perfTOInput("R5");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -186,6 +220,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[0]/page") == "CRZ") {
|
} else if (getprop("/MCDU[0]/page") == "CRZ") {
|
||||||
perfCRZInput("R6");
|
perfCRZInput("R6");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -210,6 +247,9 @@ var radnavInput = func(key) {
|
||||||
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
||||||
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
||||||
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
} else {
|
} else {
|
||||||
|
@ -222,10 +262,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor1freq-set", 1);
|
setprop("/FMGC/internal/vor1freq-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -242,10 +288,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor1crs-set", 1);
|
setprop("/FMGC/internal/vor1crs-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -266,14 +318,23 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor1freq-set", 1);
|
setprop("/FMGC/internal/vor1freq-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -290,10 +351,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor1crs-set", 1);
|
setprop("/FMGC/internal/vor1crs-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -310,6 +377,9 @@ var radnavInput = func(key) {
|
||||||
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
||||||
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
||||||
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
} else {
|
} else {
|
||||||
|
@ -322,10 +392,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor2freq-set", 1);
|
setprop("/FMGC/internal/vor2freq-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -342,10 +418,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor2crs-set", 1);
|
setprop("/FMGC/internal/vor2crs-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -367,6 +449,9 @@ var initInputA = func(key) {
|
||||||
setprop("/MCDUC/flight-num-set", 1);
|
setprop("/MCDUC/flight-num-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -381,16 +466,26 @@ var initInputA = func(key) {
|
||||||
var cis = size(scratchpad);
|
var cis = size(scratchpad);
|
||||||
if (cis >= 1 and cis <= 3) {
|
if (cis >= 1 and cis <= 3) {
|
||||||
if (ci == nil) {
|
if (ci == nil) {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
} else if (ci >= 0 and ci <= 120) {
|
} else if (ci >= 0 and ci <= 120) {
|
||||||
setprop("/FMGC/internal/cost-index", ci);
|
setprop("/FMGC/internal/cost-index", ci);
|
||||||
setprop("/FMGC/internal/cost-index-set", 1);
|
setprop("/FMGC/internal/cost-index-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -406,6 +501,10 @@ var initInputA = func(key) {
|
||||||
var crzs = size(scratchpad);
|
var crzs = size(scratchpad);
|
||||||
if (crzs >= 1 and crzs <= 3) {
|
if (crzs >= 1 and crzs <= 3) {
|
||||||
if (crz == nil) {
|
if (crz == nil) {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
} else if (crz > 0 and crz <= 430) {
|
} else if (crz > 0 and crz <= 430) {
|
||||||
setprop("/FMGC/internal/cruise-ft", crz * 100);
|
setprop("/FMGC/internal/cruise-ft", crz * 100);
|
||||||
|
@ -413,10 +512,16 @@ var initInputA = func(key) {
|
||||||
setprop("/FMGC/internal/cruise-lvl-set", 1);
|
setprop("/FMGC/internal/cruise-lvl-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -441,10 +546,16 @@ var initInputA = func(key) {
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
fmgc.updateARPT();
|
fmgc.updateARPT();
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -472,10 +583,16 @@ var initInputB = func(key) {
|
||||||
setprop("/FMGC/internal/block-set", 1);
|
setprop("/FMGC/internal/block-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -498,10 +615,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/v1-set", 1);
|
setprop("/FMGC/internal/v1-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -519,10 +642,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/vr-set", 1);
|
setprop("/FMGC/internal/vr-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -542,16 +671,25 @@ var perfTOInput = func(key) {
|
||||||
setprop("/it-autoflight/settings/togaspd", scratchpad + 10);
|
setprop("/it-autoflight/settings/togaspd", scratchpad + 10);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (key == "L4") {
|
} else if (key == "L4") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
} else {
|
} else {
|
||||||
|
@ -561,10 +699,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/trans-alt", scratchpad);
|
setprop("/FMGC/internal/trans-alt", scratchpad);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -587,10 +731,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/MCDUC/thracc-set", 1);
|
setprop("/MCDUC/thracc-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -613,10 +763,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/flap-ths-set", 1);
|
setprop("/FMGC/internal/flap-ths-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -636,10 +792,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/flex-cmd", flex_calc);
|
setprop("/FMGC/internal/flex-cmd", flex_calc);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -656,6 +818,9 @@ var perfTOInput = func(key) {
|
||||||
setprop("/MCDUC/reducacc-set", 1);
|
setprop("/MCDUC/reducacc-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -675,16 +840,26 @@ var perfCLBInput = func(key) {
|
||||||
var cis = size(scratchpad);
|
var cis = size(scratchpad);
|
||||||
if (cis >= 1 and cis <= 3) {
|
if (cis >= 1 and cis <= 3) {
|
||||||
if (ci == nil) {
|
if (ci == nil) {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
} else if (ci >= 0 and ci <= 120) {
|
} else if (ci >= 0 and ci <= 120) {
|
||||||
setprop("/FMGC/internal/cost-index", ci);
|
setprop("/FMGC/internal/cost-index", ci);
|
||||||
setprop("/FMGC/internal/cost-index-set", 1);
|
setprop("/FMGC/internal/cost-index-set", 1);
|
||||||
setprop("/MCDU[0]/scratchpad", "");
|
setprop("/MCDU[0]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -742,6 +917,7 @@ var arrowbutton = func(btn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var pagebutton = func(btn) {
|
var pagebutton = func(btn) {
|
||||||
|
if (getprop("/MCDU[0]/page") != "MCDU") {
|
||||||
if (btn == "radnav") {
|
if (btn == "radnav") {
|
||||||
setprop("/MCDU[0]/page", "RADNAV");
|
setprop("/MCDU[0]/page", "RADNAV");
|
||||||
} else if (btn == "perf") {
|
} else if (btn == "perf") {
|
||||||
|
@ -758,11 +934,14 @@ var pagebutton = func(btn) {
|
||||||
setprop("/MCDU[0]/page", "DATA");
|
setprop("/MCDU[0]/page", "DATA");
|
||||||
} else if (btn == "mcdu") {
|
} else if (btn == "mcdu") {
|
||||||
setprop("/MCDU[0]/last-fmgc-page", getprop("/MCDU[0]/page"));
|
setprop("/MCDU[0]/last-fmgc-page", getprop("/MCDU[0]/page"));
|
||||||
|
setprop("/MCDU[0]/scratchpad", "SELECT DESIRED SYSTEM");
|
||||||
setprop("/MCDU[0]/page", "MCDU");
|
setprop("/MCDU[0]/page", "MCDU");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var button = func(btn) {
|
var button = func(btn) {
|
||||||
|
if (getprop("/MCDU[0]/scratchpad-msg") == 0 and getprop("/MCDU[0]/page") != "MCDU") {
|
||||||
var scratchpad = getprop("/MCDU[0]/scratchpad");
|
var scratchpad = getprop("/MCDU[0]/scratchpad");
|
||||||
if (btn == "A") {
|
if (btn == "A") {
|
||||||
setprop("/MCDU[0]/scratchpad", scratchpad ~ "A");
|
setprop("/MCDU[0]/scratchpad", scratchpad ~ "A");
|
||||||
|
@ -897,6 +1076,18 @@ var button = func(btn) {
|
||||||
setprop("/MCDU[0]/scratchpad", scratchpad ~ "-");
|
setprop("/MCDU[0]/scratchpad", scratchpad ~ "-");
|
||||||
setprop("/MCDU[0]/scratchpad-msg", "0");
|
setprop("/MCDU[0]/scratchpad-msg", "0");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (btn == "CLR") {
|
||||||
|
var scratchpad = getprop("/MCDU[0]/scratchpad");
|
||||||
|
if (size(scratchpad) == 0) {
|
||||||
|
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||||
|
setprop("/MCDU[0]/scratchpad", "CLR");
|
||||||
|
} else if (getprop("/MCDU[0]/scratchpad-msg") == 1) {
|
||||||
|
setprop("/MCDU[0]/scratchpad", getprop("/MCDU[0]/last-scratchpad"));
|
||||||
|
setprop("/MCDU[0]/scratchpad-msg", "0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var screenFlash = func(time) {
|
var screenFlash = func(time) {
|
||||||
|
|
|
@ -9,9 +9,11 @@ var MCDU_init = func {
|
||||||
|
|
||||||
var MCDU_reset = func {
|
var MCDU_reset = func {
|
||||||
setprop("/it-autoflight/settings/togaspd", 157);
|
setprop("/it-autoflight/settings/togaspd", 157);
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", "");
|
||||||
setprop("/MCDU[1]/last-fmgc-page", "STATUS");
|
setprop("/MCDU[1]/last-fmgc-page", "STATUS");
|
||||||
setprop("/MCDU[1]/page", "MCDU");
|
setprop("/MCDU[1]/page", "MCDU");
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "SELECT DESIRED SYSTEM");
|
||||||
|
setprop("/MCDU[1]/scratchpad-msg", 0);
|
||||||
setprop("/MCDUC/flight-num", "");
|
setprop("/MCDUC/flight-num", "");
|
||||||
setprop("/MCDUC/thracc-set", 0);
|
setprop("/MCDUC/thracc-set", 0);
|
||||||
setprop("/MCDUC/reducacc-set", 0);
|
setprop("/MCDUC/reducacc-set", 0);
|
||||||
|
@ -50,13 +52,15 @@ var lskbutton = func(btn) {
|
||||||
if (btn == "1") {
|
if (btn == "1") {
|
||||||
if (getprop("/MCDU[1]/page") == "MCDU") {
|
if (getprop("/MCDU[1]/page") == "MCDU") {
|
||||||
setprop("/MCDU[1]/page", getprop("/MCDU[1]/last-fmgc-page"));
|
setprop("/MCDU[1]/page", getprop("/MCDU[1]/last-fmgc-page"));
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
setprop("/MCDU[1]/scratchpad", "GPS PRIMARY");
|
|
||||||
} else if (getprop("/MCDU[1]/page") == "TO") {
|
} else if (getprop("/MCDU[1]/page") == "TO") {
|
||||||
perfTOInput("L1");
|
perfTOInput("L1");
|
||||||
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
||||||
radnavInput("L1");
|
radnavInput("L1");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -74,6 +78,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "DES") {
|
} else if (getprop("/MCDU[1]/page") == "DES") {
|
||||||
initInputA("L5");
|
initInputA("L5");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -85,6 +92,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
||||||
radnavInput("L3");
|
radnavInput("L3");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -96,6 +106,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
||||||
radnavInput("L4");
|
radnavInput("L4");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -111,6 +124,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "DES") {
|
} else if (getprop("/MCDU[1]/page") == "DES") {
|
||||||
perfDESInput("L5");
|
perfDESInput("L5");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -124,6 +140,9 @@ var lskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "DES") {
|
} else if (getprop("/MCDU[1]/page") == "DES") {
|
||||||
perfDESInput("L6");
|
perfDESInput("L6");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -141,6 +160,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
||||||
radnavInput("R1");
|
radnavInput("R1");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -150,6 +172,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
||||||
radnavInput("R2");
|
radnavInput("R2");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -159,6 +184,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "TO") {
|
} else if (getprop("/MCDU[1]/page") == "TO") {
|
||||||
perfTOInput("R3");
|
perfTOInput("R3");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -168,6 +196,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
|
||||||
radnavInput("R4");
|
radnavInput("R4");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -175,6 +206,9 @@ var rskbutton = func(btn) {
|
||||||
if (getprop("/MCDU[1]/page") == "TO") {
|
if (getprop("/MCDU[1]/page") == "TO") {
|
||||||
perfTOInput("R5");
|
perfTOInput("R5");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -186,6 +220,9 @@ var rskbutton = func(btn) {
|
||||||
} else if (getprop("/MCDU[1]/page") == "CRZ") {
|
} else if (getprop("/MCDU[1]/page") == "CRZ") {
|
||||||
perfCRZInput("R6");
|
perfCRZInput("R6");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -210,6 +247,9 @@ var radnavInput = func(key) {
|
||||||
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
||||||
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
||||||
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
} else {
|
} else {
|
||||||
|
@ -222,10 +262,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor1freq-set", 1);
|
setprop("/FMGC/internal/vor1freq-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -242,10 +288,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor1crs-set", 1);
|
setprop("/FMGC/internal/vor1crs-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -266,14 +318,23 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor1freq-set", 1);
|
setprop("/FMGC/internal/vor1freq-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -290,10 +351,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor1crs-set", 1);
|
setprop("/FMGC/internal/vor1crs-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -310,6 +377,9 @@ var radnavInput = func(key) {
|
||||||
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
||||||
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
||||||
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
} else {
|
} else {
|
||||||
|
@ -322,10 +392,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor2freq-set", 1);
|
setprop("/FMGC/internal/vor2freq-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -342,10 +418,16 @@ var radnavInput = func(key) {
|
||||||
setprop("/FMGC/internal/vor2crs-set", 1);
|
setprop("/FMGC/internal/vor2crs-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -367,6 +449,9 @@ var initInputA = func(key) {
|
||||||
setprop("/MCDUC/flight-num-set", 1);
|
setprop("/MCDUC/flight-num-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -381,16 +466,26 @@ var initInputA = func(key) {
|
||||||
var cis = size(scratchpad);
|
var cis = size(scratchpad);
|
||||||
if (cis >= 1 and cis <= 3) {
|
if (cis >= 1 and cis <= 3) {
|
||||||
if (ci == nil) {
|
if (ci == nil) {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
} else if (ci >= 0 and ci <= 120) {
|
} else if (ci >= 0 and ci <= 120) {
|
||||||
setprop("/FMGC/internal/cost-index", ci);
|
setprop("/FMGC/internal/cost-index", ci);
|
||||||
setprop("/FMGC/internal/cost-index-set", 1);
|
setprop("/FMGC/internal/cost-index-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -406,6 +501,10 @@ var initInputA = func(key) {
|
||||||
var crzs = size(scratchpad);
|
var crzs = size(scratchpad);
|
||||||
if (crzs >= 1 and crzs <= 3) {
|
if (crzs >= 1 and crzs <= 3) {
|
||||||
if (crz == nil) {
|
if (crz == nil) {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
} else if (crz > 0 and crz <= 430) {
|
} else if (crz > 0 and crz <= 430) {
|
||||||
setprop("/FMGC/internal/cruise-ft", crz * 100);
|
setprop("/FMGC/internal/cruise-ft", crz * 100);
|
||||||
|
@ -413,10 +512,16 @@ var initInputA = func(key) {
|
||||||
setprop("/FMGC/internal/cruise-lvl-set", 1);
|
setprop("/FMGC/internal/cruise-lvl-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -441,10 +546,16 @@ var initInputA = func(key) {
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
fmgc.updateARPT();
|
fmgc.updateARPT();
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -472,10 +583,16 @@ var initInputB = func(key) {
|
||||||
setprop("/FMGC/internal/block-set", 1);
|
setprop("/FMGC/internal/block-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -498,10 +615,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/v1-set", 1);
|
setprop("/FMGC/internal/v1-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -519,10 +642,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/vr-set", 1);
|
setprop("/FMGC/internal/vr-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -542,16 +671,25 @@ var perfTOInput = func(key) {
|
||||||
setprop("/it-autoflight/settings/togaspd", scratchpad + 10);
|
setprop("/it-autoflight/settings/togaspd", scratchpad + 10);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (key == "L4") {
|
} else if (key == "L4") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
} else {
|
} else {
|
||||||
|
@ -561,10 +699,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/trans-alt", scratchpad);
|
setprop("/FMGC/internal/trans-alt", scratchpad);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -587,10 +731,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/MCDUC/thracc-set", 1);
|
setprop("/MCDUC/thracc-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -613,10 +763,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/flap-ths-set", 1);
|
setprop("/FMGC/internal/flap-ths-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -636,10 +792,16 @@ var perfTOInput = func(key) {
|
||||||
setprop("/FMGC/internal/flex-cmd", flex_calc);
|
setprop("/FMGC/internal/flex-cmd", flex_calc);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -656,6 +818,9 @@ var perfTOInput = func(key) {
|
||||||
setprop("/MCDUC/reducacc-set", 1);
|
setprop("/MCDUC/reducacc-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -675,16 +840,26 @@ var perfCLBInput = func(key) {
|
||||||
var cis = size(scratchpad);
|
var cis = size(scratchpad);
|
||||||
if (cis >= 1 and cis <= 3) {
|
if (cis >= 1 and cis <= 3) {
|
||||||
if (ci == nil) {
|
if (ci == nil) {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
} else if (ci >= 0 and ci <= 120) {
|
} else if (ci >= 0 and ci <= 120) {
|
||||||
setprop("/FMGC/internal/cost-index", ci);
|
setprop("/FMGC/internal/cost-index", ci);
|
||||||
setprop("/FMGC/internal/cost-index-set", 1);
|
setprop("/FMGC/internal/cost-index-set", 1);
|
||||||
setprop("/MCDU[1]/scratchpad", "");
|
setprop("/MCDU[1]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
|
||||||
|
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
|
||||||
|
}
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
@ -742,6 +917,7 @@ var arrowbutton = func(btn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var pagebutton = func(btn) {
|
var pagebutton = func(btn) {
|
||||||
|
if (getprop("/MCDU[1]/page") != "MCDU") {
|
||||||
if (btn == "radnav") {
|
if (btn == "radnav") {
|
||||||
setprop("/MCDU[1]/page", "RADNAV");
|
setprop("/MCDU[1]/page", "RADNAV");
|
||||||
} else if (btn == "perf") {
|
} else if (btn == "perf") {
|
||||||
|
@ -758,11 +934,14 @@ var pagebutton = func(btn) {
|
||||||
setprop("/MCDU[1]/page", "DATA");
|
setprop("/MCDU[1]/page", "DATA");
|
||||||
} else if (btn == "mcdu") {
|
} else if (btn == "mcdu") {
|
||||||
setprop("/MCDU[1]/last-fmgc-page", getprop("/MCDU[1]/page"));
|
setprop("/MCDU[1]/last-fmgc-page", getprop("/MCDU[1]/page"));
|
||||||
|
setprop("/MCDU[1]/scratchpad", "SELECT DESIRED SYSTEM");
|
||||||
setprop("/MCDU[1]/page", "MCDU");
|
setprop("/MCDU[1]/page", "MCDU");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var button = func(btn) {
|
var button = func(btn) {
|
||||||
|
if (getprop("/MCDU[1]/scratchpad-msg") == 0 and getprop("/MCDU[1]/page") != "MCDU") {
|
||||||
var scratchpad = getprop("/MCDU[1]/scratchpad");
|
var scratchpad = getprop("/MCDU[1]/scratchpad");
|
||||||
if (btn == "A") {
|
if (btn == "A") {
|
||||||
setprop("/MCDU[1]/scratchpad", scratchpad ~ "A");
|
setprop("/MCDU[1]/scratchpad", scratchpad ~ "A");
|
||||||
|
@ -897,6 +1076,18 @@ var button = func(btn) {
|
||||||
setprop("/MCDU[1]/scratchpad", scratchpad ~ "-");
|
setprop("/MCDU[1]/scratchpad", scratchpad ~ "-");
|
||||||
setprop("/MCDU[1]/scratchpad-msg", "0");
|
setprop("/MCDU[1]/scratchpad-msg", "0");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (btn == "CLR") {
|
||||||
|
var scratchpad = getprop("/MCDU[1]/scratchpad");
|
||||||
|
if (size(scratchpad) == 0) {
|
||||||
|
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||||
|
setprop("/MCDU[1]/scratchpad", "CLR");
|
||||||
|
} else if (getprop("/MCDU[1]/scratchpad-msg") == 1) {
|
||||||
|
setprop("/MCDU[1]/scratchpad", getprop("/MCDU[1]/last-scratchpad"));
|
||||||
|
setprop("/MCDU[1]/scratchpad-msg", "0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var screenFlash = func(time) {
|
var screenFlash = func(time) {
|
||||||
|
|
Reference in a new issue