Skeleton code for winds
This commit is contained in:
parent
856500e871
commit
b678cef6c8
8 changed files with 520 additions and 2 deletions
|
@ -4053,6 +4053,10 @@
|
|||
<file>Aircraft/A320-family/Nasal/MCDU/PILOTWAYPOINT.nas</file> <!-- dynamic page - init before MCDU -->
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/HOLD.nas</file> <!-- dynamic page - init before MCDU -->
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/F-PLN.nas</file> <!-- dynamic page - init before MCDU -->
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/WINDCLB.nas</file> <!-- dynamic page - init before MCDU -->
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/WINDCRZ.nas</file> <!-- dynamic page - init before MCDU -->
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/WINDDES.nas</file> <!-- dynamic page - init before MCDU -->
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/WINDHIST.nas</file> <!-- dynamic page - init before MCDU -->
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/MCDU.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/INITA.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/IRSINIT.nas</file>
|
||||
|
|
|
@ -18,6 +18,7 @@ var myAirways = [nil, nil];
|
|||
var myDuplicate = [nil, nil];
|
||||
var myClosestAirport = [nil, nil];
|
||||
var myPilotWP = [nil, nil];
|
||||
var myCLBWIND = [nil, nil];
|
||||
var default = "BoeingCDU-Large.ttf";
|
||||
var symbol = "helvetica_medium.txf";
|
||||
var normal = 70;
|
||||
|
@ -3137,6 +3138,107 @@ var canvas_MCDU_base = {
|
|||
me["Simple_C1S"].setText("FLP RETR");
|
||||
me["Simple_C2S"].setText("SLT RETR");
|
||||
me["Simple_C3S"].setText("CLEAN ");
|
||||
} else if (page == "WINDCLB") {
|
||||
if (!pageSwitch[i].getBoolValue()) {
|
||||
me["Simple"].show();
|
||||
me["Simple_Center"].hide();
|
||||
me["FPLN"].hide();
|
||||
me["DIRTO_TMPY_group"].hide();
|
||||
me["INITA"].hide();
|
||||
me["IRSINIT"].hide();
|
||||
me["INITB"].hide();
|
||||
me["FUELPRED"].hide();
|
||||
me["PROG"].hide();
|
||||
me["PERFTO"].hide();
|
||||
me["arrowsDepArr"].hide();
|
||||
me["Simple_PageNum"].setText("X/X");
|
||||
me["Simple_PageNum"].hide();
|
||||
me["Simple_Title"].show();
|
||||
me["ArrowLeft"].hide();
|
||||
me["ArrowRight"].hide();
|
||||
|
||||
me["Simple_L0S"].hide();
|
||||
me["Simple_C3B"].hide();
|
||||
me["Simple_C4B"].hide();
|
||||
|
||||
me.fontLeft(default, default, default, default, default, default);
|
||||
me.fontLeftS(default, default, default, default, default, default);
|
||||
me.fontRight(default, default, default, default, default, default);
|
||||
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.colorLeftS("wht", "wht", "wht", "wht", "wht", "amb");
|
||||
#me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
|
||||
me.colorRightS("wht", "wht", "amb", "wht", "wht", "amb");
|
||||
#me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
|
||||
|
||||
if (myCLBWIND[i] != nil) {
|
||||
me["Simple_Title"].setText(sprintf("%s", myCLBWIND[i].title));
|
||||
|
||||
forindex (var matrixArrow; myCLBWIND[i].arrowsMatrix) {
|
||||
if (matrixArrow == 0) {
|
||||
var sign = "L";
|
||||
} else {
|
||||
var sign = "R";
|
||||
}
|
||||
forindex (var item; myCLBWIND[i].arrowsMatrix[matrixArrow]) {
|
||||
if (myCLBWIND[i].arrowsMatrix[matrixArrow][item] == 1) {
|
||||
me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].show();
|
||||
} else {
|
||||
me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
me.colorLeftArrow(myCLBWIND[i].arrowsColour[0][0],myCLBWIND[i].arrowsColour[0][1],myCLBWIND[i].arrowsColour[0][2],myCLBWIND[i].arrowsColour[0][3],myCLBWIND[i].arrowsColour[0][4],myCLBWIND[i].arrowsColour[0][5]);
|
||||
|
||||
forindex (var matrixFont; myCLBWIND[i].fontMatrix) {
|
||||
if (matrixFont == 0) {
|
||||
var sign = "L";
|
||||
} else {
|
||||
var sign = "R";
|
||||
}
|
||||
forindex (var item; myCLBWIND[i].fontMatrix[matrixFont]) {
|
||||
if (myCLBWIND[i].fontMatrix[matrixFont][item] == 1) {
|
||||
me["Simple_" ~ sign ~ (item + 1)].setFont(symbol);
|
||||
me["Simple_" ~ sign ~ (item + 1)].setFontSize(small);
|
||||
} else {
|
||||
me["Simple_" ~ sign ~ (item + 1)].setFont(default);
|
||||
me["Simple_" ~ sign ~ (item + 1)].setFontSize(normal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
me.dynamicPageFunc(myCLBWIND[i].L1, "Simple_L1");
|
||||
me.dynamicPageFunc(myCLBWIND[i].L2, "Simple_L2");
|
||||
me.dynamicPageFunc(myCLBWIND[i].L3, "Simple_L3");
|
||||
me.dynamicPageFunc(myCLBWIND[i].L4, "Simple_L4");
|
||||
me.dynamicPageFunc(myCLBWIND[i].L5, "Simple_L5");
|
||||
me.dynamicPageFunc(myCLBWIND[i].L6, "Simple_L6");
|
||||
|
||||
me.colorLeft(myCLBWIND[i].L1[2],myCLBWIND[i].L2[2],myCLBWIND[i].L3[2],myCLBWIND[i].L4[2],myCLBWIND[i].L5[2],myCLBWIND[i].L6[2]);
|
||||
|
||||
# me.dynamicPageFunc(myCLBWIND[i].C1, "Simple_C1");
|
||||
# me.dynamicPageFunc(myCLBWIND[i].C2, "Simple_C2");
|
||||
# me.dynamicPageFunc(myCLBWIND[i].C3, "Simple_C3");
|
||||
# me.dynamicPageFunc(myCLBWIND[i].C4, "Simple_C4");
|
||||
# me.dynamicPageFunc(myCLBWIND[i].C5, "Simple_C5");
|
||||
# me.dynamicPageFunc(myCLBWIND[i].C6, "Simple_C6");
|
||||
#
|
||||
# me.colorCenter(myCLBWIND[i].C1[2],myCLBWIND[i].C2[2],myCLBWIND[i].C3[2],myCLBWIND[i].C4[2],myCLBWIND[i].C5[2],myCLBWIND[i].C6[2]);
|
||||
|
||||
me.dynamicPageFunc(myCLBWIND[i].R1, "Simple_R1");
|
||||
me.dynamicPageFunc(myCLBWIND[i].R2, "Simple_R2");
|
||||
me.dynamicPageFunc(myCLBWIND[i].R3, "Simple_R3");
|
||||
me.dynamicPageFunc(myCLBWIND[i].R4, "Simple_R4");
|
||||
me.dynamicPageFunc(myCLBWIND[i].R5, "Simple_R5");
|
||||
me.dynamicPageFunc(myCLBWIND[i].R6, "Simple_R6");
|
||||
|
||||
me.colorRight(myCLBWIND[i].R1[2],myCLBWIND[i].R2[2],myCLBWIND[i].R3[2],myCLBWIND[i].R4[2],myCLBWIND[i].R5[2],myCLBWIND[i].R6[2]);
|
||||
}
|
||||
pageSwitch[i].setBoolValue(1);
|
||||
}
|
||||
} else if (page == "LATREV") {
|
||||
if (!pageSwitch[i].getBoolValue()) {
|
||||
me["Simple"].show();
|
||||
|
|
|
@ -222,6 +222,13 @@ var initInputA = func(key, i) {
|
|||
}
|
||||
} else if (key == "R3") {
|
||||
setprop("MCDU[" ~ i ~ "]/page", "IRSINIT");
|
||||
} else if (key == "R4") {
|
||||
if (canvas_mcdu.myCLBWIND[i] != nil) {
|
||||
canvas_mcdu.myCLBWIND[i].del();
|
||||
}
|
||||
canvas_mcdu.myCLBWIND[i] = nil;
|
||||
canvas_mcdu.myCLBWIND[i] = windCLBPage.new(i);
|
||||
setprop("MCDU[" ~ i ~ "]/page", "WINDCLB");
|
||||
} else if (key == "R5") {
|
||||
if (scratchpad == "CLR") {
|
||||
setprop("/FMGC/internal/tropo", 36090);
|
||||
|
|
|
@ -473,7 +473,7 @@ var rskbutton = func(btn, i) {
|
|||
}
|
||||
canvas_mcdu.myPilotWP[i] = nil;
|
||||
canvas_mcdu.myPilotWP[i] = pilotWaypointPage.new(i);
|
||||
setprop("/MCDU[" ~ i ~ "]/page", "PILOTWP");
|
||||
setprop("/MCDU[" ~ i ~ "]/page", "PILOTWP");
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED"); # todo spawn new waypoints page
|
||||
}
|
||||
|
@ -531,7 +531,9 @@ var rskbutton = func(btn, i) {
|
|||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (btn == "4") {
|
||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "FUELPRED") {
|
||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||
initInputA("R4",i);
|
||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "FUELPRED") {
|
||||
fuelPredInput("R4",i);
|
||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PERFTO") {
|
||||
perfTOInput("R4",i);
|
||||
|
|
122
Nasal/MCDU/WINDCLB.nas
Normal file
122
Nasal/MCDU/WINDCLB.nas
Normal file
|
@ -0,0 +1,122 @@
|
|||
# A3XX mCDU by Joshua Davidson (Octal450), Jonathan Redpath, and Matthew Maring (mattmaring)
|
||||
|
||||
# Copyright (c) 2020 Matthew Maring (mattmaring)
|
||||
|
||||
var windCLBPage = {
|
||||
title: nil,
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
L2: [nil, nil, "ack"],
|
||||
L3: [nil, nil, "ack"],
|
||||
L4: [nil, nil, "ack"],
|
||||
L5: [nil, nil, "ack"],
|
||||
L6: [nil, nil, "ack"],
|
||||
C1: [nil, nil, "ack"],
|
||||
C2: [nil, nil, "ack"],
|
||||
C3: [nil, nil, "ack"],
|
||||
C4: [nil, nil, "ack"],
|
||||
C5: [nil, nil, "ack"],
|
||||
C6: [nil, nil, "ack"],
|
||||
R1: [nil, nil, "ack"],
|
||||
R2: [nil, nil, "ack"],
|
||||
R3: [nil, nil, "ack"],
|
||||
R4: [nil, nil, "ack"],
|
||||
R5: [nil, nil, "ack"],
|
||||
R6: [nil, nil, "ack"],
|
||||
scroll: 0,
|
||||
vector: [],
|
||||
index: nil,
|
||||
computer: nil,
|
||||
windList: [],
|
||||
new: func(computer) {
|
||||
var wcp = {parents:[windCLBPage]};
|
||||
wcp.computer = computer;
|
||||
wcp.windList = [nil];
|
||||
wcp._setupPageWithData();
|
||||
wcp.updateTmpy();
|
||||
return wcp;
|
||||
},
|
||||
del: func() {
|
||||
return nil;
|
||||
},
|
||||
_setupPageWithData: func() {
|
||||
me.title = "CLIMB WIND";
|
||||
#me.title = "DRAFT CLIMB WIND";
|
||||
me.titleColour = "wht";
|
||||
|
||||
if (size(me.windList) >= 5) {
|
||||
me.L5 = ["[ ]/[ ]/[ ]", "", "blu"];
|
||||
} else {
|
||||
me.L5 = [nil, nil, "ack"];
|
||||
}
|
||||
|
||||
if (size(me.windList) >= 4) {
|
||||
me.L4 = ["[ ]/[ ]/[ ]", "", "blu"];
|
||||
} else {
|
||||
me.L4 = [nil, nil, "ack"];
|
||||
}
|
||||
|
||||
if (size(me.windList) >= 3) {
|
||||
me.L3 = ["[ ]/[ ]/[ ]", "", "blu"];
|
||||
} else {
|
||||
me.L3 = [nil, nil, "ack"];
|
||||
}
|
||||
|
||||
if (size(me.windList) >= 2) {
|
||||
me.L2 = ["[ ]/[ ]/[ ]", "", "blu"];
|
||||
} else {
|
||||
me.L2 = [nil, nil, "ack"];
|
||||
}
|
||||
|
||||
if (size(me.windList) >= 1) {
|
||||
me.L1 = ["[ ]/[ ]/[ ]", "TRU WIND/ALT", "blu"];
|
||||
}
|
||||
|
||||
me.L6 = [" CANCEL", " WIND", "amb"];
|
||||
me.R1 = [" HISTORY ", "WIND ", "wht"];
|
||||
me.R3 = [" REQUEST ", "WIND ", "amb"];
|
||||
me.R5 = [" PHASE ", "NEXT ", "wht"];
|
||||
me.R6 = ["UPDATE ", "WIND ", "amb"];
|
||||
# me.L2 = [" R", " TURN", "blu"];
|
||||
# if (pts.Instrumentation.Altimeter.indicatedFt.getValue() >= 14000) {
|
||||
# me.L2 = [" 1.5/----", "TIME/DIST", "blu"];
|
||||
# } else {
|
||||
# me.L2 = [" 1.0/----", "TIME/DIST", "blu"];
|
||||
# }
|
||||
# me.L6 = [" RETURN", nil, "wht"];
|
||||
# me.C4 = ["LAST EXIT", nil, "wht"];
|
||||
# me.C5 = ["---- ---.-", "UTC FUEL", "wht"];
|
||||
# me.R1 = ["COMPUTED ", nil, "wht"];
|
||||
# me.R2 = ["DATABASE ", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 1, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "ack"], ["wht", "ack", "ack", "ack", "wht", "ack"]];
|
||||
me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
makeTmpy: func() {
|
||||
if (!fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
fmgc.flightPlanController.createTemporaryFlightPlan(me.computer);
|
||||
}
|
||||
},
|
||||
updateTmpy: func() {
|
||||
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
#me.L1[2] = "yel";
|
||||
#me.L2[2] = "yel";
|
||||
#me.L6 = [" F-PLN", " TMPY", "yel"];
|
||||
#me.R6 = ["INSERT* ", " TMPY", "yel"];
|
||||
#me.arrowsColour[0][5] = "yel";
|
||||
#me.titleColour = "yel";
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
} else {
|
||||
#me.L1[2] = "blu";
|
||||
#me.L2[2] = "blu";
|
||||
#me.L6 = [" RETURN", nil, "wht"];
|
||||
#me.R6 = [nil, nil, "ack"];
|
||||
#me.arrowsColour[0][5] = "wht";
|
||||
#me.titleColour = "wht";
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
}
|
||||
}
|
||||
};
|
87
Nasal/MCDU/WINDCRZ.nas
Normal file
87
Nasal/MCDU/WINDCRZ.nas
Normal file
|
@ -0,0 +1,87 @@
|
|||
# A3XX mCDU by Joshua Davidson (Octal450), Jonathan Redpath, and Matthew Maring (mattmaring)
|
||||
|
||||
# Copyright (c) 2020 Matthew Maring (mattmaring)
|
||||
|
||||
var windCRZPage = {
|
||||
title: [nil, nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
L2: [nil, nil, "ack"],
|
||||
L3: [nil, nil, "ack"],
|
||||
L4: [nil, nil, "ack"],
|
||||
L5: [nil, nil, "ack"],
|
||||
L6: [nil, nil, "ack"],
|
||||
C1: [nil, nil, "ack"],
|
||||
C2: [nil, nil, "ack"],
|
||||
C3: [nil, nil, "ack"],
|
||||
C4: [nil, nil, "ack"],
|
||||
C5: [nil, nil, "ack"],
|
||||
C6: [nil, nil, "ack"],
|
||||
R1: [nil, nil, "ack"],
|
||||
R2: [nil, nil, "ack"],
|
||||
R3: [nil, nil, "ack"],
|
||||
R4: [nil, nil, "ack"],
|
||||
R5: [nil, nil, "ack"],
|
||||
R6: [nil, nil, "ack"],
|
||||
scroll: 0,
|
||||
vector: [],
|
||||
index: nil,
|
||||
computer: nil,
|
||||
new: func(computer, waypoint) {
|
||||
var wcp = {parents:[windCRZPage]};
|
||||
wcp.computer = computer;
|
||||
wcp.waypoint = waypoint;
|
||||
wcp._setupPageWithData();
|
||||
wcp.updateTmpy();
|
||||
return wcp;
|
||||
},
|
||||
del: func() {
|
||||
return nil;
|
||||
},
|
||||
_setupPageWithData: func() {
|
||||
me.title = ["CRZ WIND", " AT ", me.waypoint.wp_name];
|
||||
me.titleColour = "wht";
|
||||
# me.L1 = [" [ ]", "INB CRS", "blu"];
|
||||
# me.L2 = [" R", " TURN", "blu"];
|
||||
# if (pts.Instrumentation.Altimeter.indicatedFt.getValue() >= 14000) {
|
||||
# me.L2 = [" 1.5/----", "TIME/DIST", "blu"];
|
||||
# } else {
|
||||
# me.L2 = [" 1.0/----", "TIME/DIST", "blu"];
|
||||
# }
|
||||
# me.L6 = [" RETURN", nil, "wht"];
|
||||
# me.C4 = ["LAST EXIT", nil, "wht"];
|
||||
# me.C5 = ["---- ---.-", "UTC FUEL", "wht"];
|
||||
# me.R1 = ["COMPUTED ", nil, "wht"];
|
||||
# me.R2 = ["DATABASE ", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["wht", "wht", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
makeTmpy: func() {
|
||||
if (!fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
fmgc.flightPlanController.createTemporaryFlightPlan(me.computer);
|
||||
}
|
||||
},
|
||||
updateTmpy: func() {
|
||||
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
me.L1[2] = "yel";
|
||||
me.L2[2] = "yel";
|
||||
me.L6 = [" F-PLN", " TMPY", "yel"];
|
||||
me.R6 = ["INSERT* ", " TMPY", "yel"];
|
||||
me.arrowsColour[0][5] = "yel";
|
||||
me.titleColour = "yel";
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
} else {
|
||||
me.L1[2] = "blu";
|
||||
me.L2[2] = "blu";
|
||||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.R6 = [nil, nil, "ack"];
|
||||
me.arrowsColour[0][5] = "wht";
|
||||
me.titleColour = "wht";
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
}
|
||||
}
|
||||
};
|
97
Nasal/MCDU/WINDDES.nas
Normal file
97
Nasal/MCDU/WINDDES.nas
Normal file
|
@ -0,0 +1,97 @@
|
|||
# A3XX mCDU by Joshua Davidson (Octal450), Jonathan Redpath, and Matthew Maring (mattmaring)
|
||||
|
||||
# Copyright (c) 2020 Matthew Maring (mattmaring)
|
||||
|
||||
var windDESPage = {
|
||||
title: nil,
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
L2: [nil, nil, "ack"],
|
||||
L3: [nil, nil, "ack"],
|
||||
L4: [nil, nil, "ack"],
|
||||
L5: [nil, nil, "ack"],
|
||||
L6: [nil, nil, "ack"],
|
||||
C1: [nil, nil, "ack"],
|
||||
C2: [nil, nil, "ack"],
|
||||
C3: [nil, nil, "ack"],
|
||||
C4: [nil, nil, "ack"],
|
||||
C5: [nil, nil, "ack"],
|
||||
C6: [nil, nil, "ack"],
|
||||
R1: [nil, nil, "ack"],
|
||||
R2: [nil, nil, "ack"],
|
||||
R3: [nil, nil, "ack"],
|
||||
R4: [nil, nil, "ack"],
|
||||
R5: [nil, nil, "ack"],
|
||||
R6: [nil, nil, "ack"],
|
||||
scroll: 0,
|
||||
vector: [],
|
||||
index: nil,
|
||||
computer: nil,
|
||||
new: func(computer) {
|
||||
var wdp = {parents:[windDESPage]};
|
||||
wdp.computer = computer;
|
||||
wdp._setupPageWithData();
|
||||
wdp.updateTmpy();
|
||||
return wdp;
|
||||
},
|
||||
del: func() {
|
||||
return nil;
|
||||
},
|
||||
_setupPageWithData: func() {
|
||||
me.title = "DESCENT WIND";
|
||||
#me.title = "DRAFT DESCENT WIND";
|
||||
me.titleColour = "wht";
|
||||
me.L1 = ["[ ]g/[ ]/FL---", "TRU WIND/ALT", "blu"];
|
||||
me.L2 = ["[ ]g/[ ]/FL200", "", "blu"];
|
||||
me.L3 = ["[ ]g/[ ]/FL100", "", "blu"];
|
||||
me.L4 = ["[ ]g/[ ]/FL050", "", "blu"];
|
||||
me.L5 = ["[ ]g/[ ]/GRND", "", "blu"];
|
||||
me.L6 = [" CANCEL", " WIND", "amb"];
|
||||
me.R1 = ["[ ]g/[ ]", "WIND ", "blu"];
|
||||
me.R2 = ["", "FL---", "grn"];
|
||||
me.R3 = [" REQUEST ", "WIND ", "wht"];
|
||||
me.R4 = [" PHASE ", "PREV ", "wht"];
|
||||
me.R6 = ["UPDATE ", "WIND ", "amb"];
|
||||
# me.L2 = [" R", " TURN", "blu"];
|
||||
# if (pts.Instrumentation.Altimeter.indicatedFt.getValue() >= 14000) {
|
||||
# me.L2 = [" 1.5/----", "TIME/DIST", "blu"];
|
||||
# } else {
|
||||
# me.L2 = [" 1.0/----", "TIME/DIST", "blu"];
|
||||
# }
|
||||
# me.L6 = [" RETURN", nil, "wht"];
|
||||
# me.C4 = ["LAST EXIT", nil, "wht"];
|
||||
# me.C5 = ["---- ---.-", "UTC FUEL", "wht"];
|
||||
# me.R1 = ["COMPUTED ", nil, "wht"];
|
||||
# me.R2 = ["DATABASE ", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "ack"], ["ack", "ack", "ack", "wht", "ack", "ack"]];
|
||||
me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
makeTmpy: func() {
|
||||
# if (!fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
# fmgc.flightPlanController.createTemporaryFlightPlan(me.computer);
|
||||
# }
|
||||
},
|
||||
updateTmpy: func() {
|
||||
# if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
# me.L1[2] = "yel";
|
||||
# me.L2[2] = "yel";
|
||||
# me.L6 = [" F-PLN", " TMPY", "yel"];
|
||||
# me.R6 = ["INSERT* ", " TMPY", "yel"];
|
||||
# me.arrowsColour[0][5] = "yel";
|
||||
# me.titleColour = "yel";
|
||||
# canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
# } else {
|
||||
# me.L1[2] = "blu";
|
||||
# me.L2[2] = "blu";
|
||||
# me.L6 = [" RETURN", nil, "wht"];
|
||||
# me.R6 = [nil, nil, "ack"];
|
||||
# me.arrowsColour[0][5] = "wht";
|
||||
# me.titleColour = "wht";
|
||||
# canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
# }
|
||||
}
|
||||
};
|
97
Nasal/MCDU/WINDHIST.nas
Normal file
97
Nasal/MCDU/WINDHIST.nas
Normal file
|
@ -0,0 +1,97 @@
|
|||
# A3XX mCDU by Joshua Davidson (Octal450), Jonathan Redpath, and Matthew Maring (mattmaring)
|
||||
|
||||
# Copyright (c) 2020 Matthew Maring (mattmaring)
|
||||
|
||||
var windHistPage = {
|
||||
title: nil,
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
L2: [nil, nil, "ack"],
|
||||
L3: [nil, nil, "ack"],
|
||||
L4: [nil, nil, "ack"],
|
||||
L5: [nil, nil, "ack"],
|
||||
L6: [nil, nil, "ack"],
|
||||
C1: [nil, nil, "ack"],
|
||||
C2: [nil, nil, "ack"],
|
||||
C3: [nil, nil, "ack"],
|
||||
C4: [nil, nil, "ack"],
|
||||
C5: [nil, nil, "ack"],
|
||||
C6: [nil, nil, "ack"],
|
||||
R1: [nil, nil, "ack"],
|
||||
R2: [nil, nil, "ack"],
|
||||
R3: [nil, nil, "ack"],
|
||||
R4: [nil, nil, "ack"],
|
||||
R5: [nil, nil, "ack"],
|
||||
R6: [nil, nil, "ack"],
|
||||
scroll: 0,
|
||||
vector: [],
|
||||
index: nil,
|
||||
computer: nil,
|
||||
new: func(computer) {
|
||||
var whp = {parents:[windHistPage]};
|
||||
whp.computer = computer;
|
||||
whp._setupPageWithData();
|
||||
#whp.updateTmpy();
|
||||
return whp;
|
||||
},
|
||||
del: func() {
|
||||
return nil;
|
||||
},
|
||||
_setupPageWithData: func() {
|
||||
me.title = "HISTROY WIND";
|
||||
me.titleColour = "wht";
|
||||
me.L1 = ["----g/---", "", "blu"];
|
||||
me.L2 = ["----g/---", "", "blu"];
|
||||
me.L3 = ["----g/---", "", "blu"];
|
||||
me.L4 = ["----g/---", "", "blu"];
|
||||
me.L5 = ["----g/---", "", "blu"];
|
||||
me.L6 = [" CLIMB WIND", "", "wht"];
|
||||
me.C1 = ["FL050", "", "blu"];
|
||||
me.C2 = ["FL150", "", "blu"];
|
||||
me.C3 = ["FL250", "", "blu"];
|
||||
me.C4 = ["FL---", "", "blu"];
|
||||
me.C5 = ["FL370", "", "blu"];
|
||||
me.R6 = ["SELECT ", "", "amb"];
|
||||
# me.L2 = [" R", " TURN", "blu"];
|
||||
# if (pts.Instrumentation.Altimeter.indicatedFt.getValue() >= 14000) {
|
||||
# me.L2 = [" 1.5/----", "TIME/DIST", "blu"];
|
||||
# } else {
|
||||
# me.L2 = [" 1.0/----", "TIME/DIST", "blu"];
|
||||
# }
|
||||
# me.L6 = [" RETURN", nil, "wht"];
|
||||
# me.C4 = ["LAST EXIT", nil, "wht"];
|
||||
# me.C5 = ["---- ---.-", "UTC FUEL", "wht"];
|
||||
# me.R1 = ["COMPUTED ", nil, "wht"];
|
||||
# me.R2 = ["DATABASE ", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
makeTmpy: func() {
|
||||
# if (!fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
# fmgc.flightPlanController.createTemporaryFlightPlan(me.computer);
|
||||
# }
|
||||
},
|
||||
updateTmpy: func() {
|
||||
# if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
# me.L1[2] = "yel";
|
||||
# me.L2[2] = "yel";
|
||||
# me.L6 = [" F-PLN", " TMPY", "yel"];
|
||||
# me.R6 = ["INSERT* ", " TMPY", "yel"];
|
||||
# me.arrowsColour[0][5] = "yel";
|
||||
# me.titleColour = "yel";
|
||||
# canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
# } else {
|
||||
# me.L1[2] = "blu";
|
||||
# me.L2[2] = "blu";
|
||||
# me.L6 = [" RETURN", nil, "wht"];
|
||||
# me.R6 = [nil, nil, "ack"];
|
||||
# me.arrowsColour[0][5] = "wht";
|
||||
# me.titleColour = "wht";
|
||||
# canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
# }
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue