1
0
Fork 0

Revert "Update INIT format, remove ground temp"

This reverts commit e41c786247.
This commit is contained in:
Matthew Maring 2020-04-30 22:44:47 -04:00
parent e41c786247
commit 2600e31daf
3 changed files with 53 additions and 15 deletions

View file

@ -107,6 +107,8 @@ var cruiseTemp = props.globals.getNode("/FMGC/internal/cruise-temp", 1);
var cruiseTempSet = props.globals.getNode("/FMGC/internal/cruise-temp-set", 1);
var tropo = props.globals.getNode("/FMGC/internal/tropo", 1);
var tropoSet = props.globals.getNode("/FMGC/internal/tropo-set", 1);
var gndtemp = props.globals.getNode("/FMGC/internal/gndtemp", 1);
var gndtempSet = props.globals.getNode("/FMGC/internal/gndtemp-set", 1);
var ADIRSMCDUBTN = props.globals.getNode("/controls/adirs/mcducbtn", 1);
# IRSINIT variables
@ -1105,16 +1107,16 @@ var canvas_MCDU_base = {
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
me["ArrowLeft"].hide();
me["ArrowLeft"].show();
me["ArrowRight"].show();
me.showLeft(0, 1, 0, -1, 0, 1);
me["Simple_L0S"].hide();
me.showLeftS(1, 1, 1, -1, 1, 1);
me.showLeftArrow(-1, -1, -1, -1, -1, -1);
me.showRight(0, 0, 1, -1, 1, 1);
me.showRightS(1, 0, -1, -1, -1, 1);
me.showRightArrow(-1, -1, -1, -1, 1, -1);
me.showRight(0, 0, 1, 1, 1, 1);
me.showRightS(1, 0, -1, -1, 1, 1);
me.showRightArrow(-1, -1, -1, 1, -1, -1);
me.fontLeft(default, default, default, default, default, default);
me.fontLeftS(default, default, default, default, default, default);
@ -1122,12 +1124,12 @@ var canvas_MCDU_base = {
me.fontRightS(default, default, default, default, default, default);
me.fontSizeLeft(normal, normal, normal, normal, normal, normal);
me.fontSizeRight(normal, normal, normal, normal, normal, normal);
me.fontSizeRight(normal, normal, normal, normal, normal, 0);
me.colorLeft("blu", "wht", "blu", "blu", "ack", "ack");
me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRight("blu", "amb", "amb", "wht", "wht", "blu");
me.colorRight("blu", "amb", "amb", "wht", "blu", "blu");
me.colorRightS("wht", "amb", "wht", "wht", "wht", "wht");
me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
@ -1192,7 +1194,7 @@ var canvas_MCDU_base = {
me["INITA_FromTo"].show();
me["Simple_L1"].hide();
me["Simple_L2"].setColor(1,1,1);
me["Simple_L2"].setText("----/------");
me["Simple_L2"].setText("----/----------");
me.showRight(-1, 1, 0, 0, 0, 0);
me["Simple_R2S"].show();
me["INITA_InitRequest"].show();
@ -1207,9 +1209,23 @@ var canvas_MCDU_base = {
me.showRightArrow(0, 0, 1, 0, 0, 0);
}
if (tropoSet.getValue() == 1) {
me["Simple_R6"].setFontSize(normal);
me["Simple_R5"].setFontSize(normal);
} else {
me["Simple_R5"].setFontSize(small);
}
me["Simple_R6S"].setText("GND TEMP");
if (getprop("/FMGC/status/phase") == 0 and !getprop("/FMGC/internal/gndtemp-set")) {
setprop("/FMGC/internal/gndtemp", 15 - (2 * getprop("/position/gear-agl-ft") / 1000));
me["Simple_R6"].setText(sprintf("%.0fg", gndtemp.getValue()));
me["Simple_R6"].setFontSize(small);
} else {
if (getprop("/FMGC/internal/gndtemp-set")) {
me["Simple_R6"].setFontSize(normal);
} else {
me["Simple_R6"].setFontSize(small);
}
me["Simple_R6"].setText(sprintf("%.0fg", gndtemp.getValue()));
}
me["Simple_L1S"].setText(" CO RTE");
@ -1221,13 +1237,13 @@ var canvas_MCDU_base = {
me["Simple_L3"].setText(sprintf("%s", flightNum.getValue()));
me["Simple_R1S"].setText("FROM/TO ");
me["Simple_R2S"].setText("INIT ");
me["Simple_R6S"].setText("TROPO");
me["Simple_R5S"].setText("TROPO");
me["Simple_R1"].setText(sprintf("%s", depArpt.getValue() ~ "/" ~ arrArpt.getValue()));
me["Simple_R2"].setText("REQUEST ");
me["Simple_R3"].setText("IRS INIT ");
me["Simple_R5"].setText("WIND ");
me["Simple_R6"].setText(sprintf("%5.0f", tropo.getValue()));
me["Simple_R4"].setText("WIND ");
me["Simple_R5"].setText(sprintf("%5.0f", tropo.getValue()));
} else if (page == "IRSINIT") {
if (!pageSwitch[i].getBoolValue()) {
me["Simple"].show();
@ -1465,7 +1481,7 @@ var canvas_MCDU_base = {
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
me["ArrowLeft"].show();
me["ArrowRight"].hide();
me["ArrowRight"].show();
me.showLeft(1, 1, 1, 1, 1, 1);
me["Simple_L0S"].hide();
@ -1602,7 +1618,7 @@ var canvas_MCDU_base = {
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
me["ArrowLeft"].show();
me["ArrowRight"].hide();
me["ArrowRight"].show();
me.showLeft(1, 1, 1, 1, 1, 1);
me["Simple_L0S"].hide();

View file

@ -190,7 +190,7 @@ var initInputA = func(key, i) {
}
} else if (key == "R3") {
setprop("MCDU[" ~ i ~ "]/page", "IRSINIT");
} else if (key == "R6") {
} else if (key == "R5") {
if (scratchpad == "CLR") {
setprop("FMGC/internal/tropo", 36090);
setprop("FMGC/internal/tropo-set", 0);
@ -206,5 +206,17 @@ var initInputA = func(key, i) {
notAllowed(i);
}
}
} else if (key == "R6") {
if (scratchpad == "CLR") {
setprop("FMGC/internal/gndtemp-set", 0);
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else if (int(scratchpad) != nil and getprop("FMGC/status/phase") == 0 and size(scratchpad) >= 1 and size(scratchpad) <= 3 and scratchpad >= -99 and scratchpad <= 99) {
setprop("FMGC/internal/gndtemp", scratchpad);
setprop("FMGC/internal/gndtemp-set", 1);
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
}
}

View file

@ -529,7 +529,9 @@ var rskbutton = func(btn, i) {
notAllowed(i);
}
} else if (btn == "5") {
if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("R5",i);
} else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
initInputB("R5",i);
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") {
perfTOInput("R5",i);
@ -607,6 +609,12 @@ var arrowbutton = func(btn, i) {
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 {
setprop("MCDU[" ~ i ~ "]/page", "FUELPRED");
}
} else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB" or getprop("MCDU[" ~ i ~ "]/page") == "FUELPRED") {
setprop("MCDU[" ~ i ~ "]/page", "INITA");
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
@ -629,6 +637,8 @@ var arrowbutton = func(btn, i) {
} else {
setprop("MCDU[" ~ i ~ "]/page", "FUELPRED");
}
} else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB" or getprop("MCDU[" ~ i ~ "]/page") == "FUELPRED") {
setprop("MCDU[" ~ i ~ "]/page", "INITA");
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {