2020-05-31 14:05:44 +00:00
|
|
|
# A3XX mCDU by Joshua Davidson (Octal450), Jonathan Redpath, and Matthew Maring (mattmaring)
|
|
|
|
|
|
|
|
# Copyright (c) 2020 Matthew Maring (mattmaring)
|
|
|
|
|
2020-05-31 14:30:33 +00:00
|
|
|
var windHISTPage = {
|
2020-05-31 14:05:44 +00:00
|
|
|
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) {
|
2020-05-31 14:30:33 +00:00
|
|
|
var whp = {parents:[windHISTPage]};
|
2020-05-31 14:05:44 +00:00
|
|
|
whp.computer = computer;
|
|
|
|
whp._setupPageWithData();
|
2020-05-31 18:15:53 +00:00
|
|
|
whp.updateTmpy();
|
2020-05-31 14:05:44 +00:00
|
|
|
return whp;
|
|
|
|
},
|
|
|
|
del: func() {
|
|
|
|
return nil;
|
|
|
|
},
|
|
|
|
_setupPageWithData: func() {
|
2020-06-12 16:53:12 +00:00
|
|
|
me.title = "HISTORY WIND";
|
2020-05-31 14:05:44 +00:00
|
|
|
me.titleColour = "wht";
|
2020-06-11 17:55:52 +00:00
|
|
|
me.L1 = ["----/---", "", "blu"];
|
|
|
|
me.L2 = ["----/---", "", "blu"];
|
|
|
|
me.L3 = ["----/---", "", "blu"];
|
|
|
|
me.L4 = ["----/---", "", "blu"];
|
|
|
|
me.L5 = ["----/---", "", "blu"];
|
2020-05-31 14:05:44 +00:00
|
|
|
me.L6 = [" CLIMB WIND", "", "wht"];
|
|
|
|
me.C1 = ["FL050", "", "blu"];
|
|
|
|
me.C2 = ["FL150", "", "blu"];
|
|
|
|
me.C3 = ["FL250", "", "blu"];
|
2020-06-11 17:55:52 +00:00
|
|
|
me.C4 = [" FL--- CRZ FL", "", "blu"];
|
2020-05-31 14:05:44 +00:00
|
|
|
me.C5 = ["FL370", "", "blu"];
|
|
|
|
me.R6 = ["SELECT ", "", "amb"];
|
2020-06-11 17:55:52 +00:00
|
|
|
|
2020-05-31 14:05:44 +00:00
|
|
|
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"]];
|
2020-05-31 14:30:33 +00:00
|
|
|
me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]];
|
2020-05-31 14:05:44 +00:00
|
|
|
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
|
|
|
},
|
|
|
|
makeTmpy: func() {
|
2020-05-31 18:15:53 +00:00
|
|
|
if (!fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
|
|
|
fmgc.flightPlanController.createTemporaryFlightPlan(me.computer);
|
|
|
|
}
|
2020-05-31 14:05:44 +00:00
|
|
|
},
|
|
|
|
updateTmpy: func() {
|
2020-05-31 18:15:53 +00:00
|
|
|
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
|
|
|
me.L1[2] = "yel";
|
|
|
|
me.L2[2] = "yel";
|
|
|
|
me.L3[2] = "yel";
|
|
|
|
me.L4[2] = "yel";
|
|
|
|
me.L5[2] = "yel";
|
|
|
|
me.C1[2] = "yel";
|
|
|
|
me.C2[2] = "yel";
|
|
|
|
me.C3[2] = "yel";
|
|
|
|
me.C4[2] = "yel";
|
|
|
|
me.C5[2] = "yel";
|
|
|
|
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
|
|
|
} else {
|
|
|
|
me.L1[2] = "blu";
|
|
|
|
me.L2[2] = "blu";
|
|
|
|
me.L3[2] = "blu";
|
|
|
|
me.L4[2] = "blu";
|
|
|
|
me.L5[2] = "blu";
|
|
|
|
me.C1[2] = "blu";
|
|
|
|
me.C2[2] = "blu";
|
|
|
|
me.C3[2] = "blu";
|
|
|
|
me.C4[2] = "blu";
|
|
|
|
me.C5[2] = "blu";
|
|
|
|
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
|
|
|
}
|
2020-06-01 01:10:47 +00:00
|
|
|
},
|
|
|
|
reload: func() {
|
|
|
|
me._setupPageWithData();
|
|
|
|
me.updateTmpy();
|
2020-05-31 14:05:44 +00:00
|
|
|
}
|
|
|
|
};
|