Add access to wind pages from DATA2, save previous page in winds
This commit is contained in:
parent
2da3114861
commit
80ef332f29
8 changed files with 23 additions and 3 deletions
|
@ -4081,6 +4081,7 @@
|
|||
<file>Aircraft/A320-family/Nasal/MCDU/PERFTO.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/RADNAV.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/DATA.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/DATA2.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/STATUS.nas</file>
|
||||
</mcdu>
|
||||
<!-- Canvas -->
|
||||
|
|
|
@ -141,6 +141,7 @@ var windController = {
|
|||
winds: [[], [], []], #waypoint winds used if route includes navaids
|
||||
nav_indicies: [[], [], []],
|
||||
windSizes: [0, 0, 0],
|
||||
accessPage: ["", ""],
|
||||
#temporaryFlag: [0, 0],
|
||||
|
||||
init: func() {
|
||||
|
|
15
Nasal/MCDU/DATA2.nas
Normal file
15
Nasal/MCDU/DATA2.nas
Normal file
|
@ -0,0 +1,15 @@
|
|||
# A3XX mCDU by Joshua Davidson (Octal450), Jonathan Redpath, and Matthew Maring (mattmaring)
|
||||
|
||||
# Copyright (c) 2020 Matthew Maring (mattmaring)
|
||||
|
||||
var data2Input = func(key, i) {
|
||||
if (key == "L5") {
|
||||
if (canvas_mcdu.myCLBWIND[i] == nil) {
|
||||
canvas_mcdu.myCLBWIND[i] = windCLBPage.new(i);
|
||||
} else {
|
||||
canvas_mcdu.myCLBWIND[i].reload();
|
||||
}
|
||||
fmgc.windController.accessPage[i] = "DATA2";
|
||||
setprop("MCDU[" ~ i ~ "]/page", "WINDCLB");
|
||||
}
|
||||
}
|
|
@ -232,6 +232,7 @@ var initInputA = func(key, i) {
|
|||
} else {
|
||||
canvas_mcdu.myCLBWIND[i].reload();
|
||||
}
|
||||
fmgc.windController.accessPage[i] = "INITA";
|
||||
setprop("MCDU[" ~ i ~ "]/page", "WINDCLB");
|
||||
} else if (key == "R5") {
|
||||
if (scratchpad == "CLR") {
|
||||
|
|
|
@ -409,6 +409,8 @@ var lskbutton = func(btn, i) {
|
|||
printInput2("L5",i);
|
||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
|
||||
dataInput("L5",i);
|
||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA2") {
|
||||
data2Input("L5",i);
|
||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("/MCDU[" ~ i ~ "]/page") == "F-PLNB") {
|
||||
canvas_mcdu.myFpln[i].pushButtonLeft(5);
|
||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DEPARTURE") {
|
||||
|
|
|
@ -188,7 +188,7 @@ var windCLBPage = {
|
|||
}
|
||||
me.reload();
|
||||
} else if (index == 6) {
|
||||
setprop("/MCDU[" ~ me.computer ~ "]/page", "INITA");
|
||||
setprop("/MCDU[" ~ me.computer ~ "]/page", fmgc.windController.accessPage[me.computer]);
|
||||
} else if (me.items >= index) {
|
||||
if (size(mcdu_scratchpad.scratchpads[me.computer].scratchpad) == 13) {
|
||||
var winds = split("/", mcdu_scratchpad.scratchpads[me.computer].scratchpad);
|
||||
|
|
|
@ -269,7 +269,7 @@ var windCRZPage = {
|
|||
}
|
||||
me.reload();
|
||||
} else if (index == 6) {
|
||||
setprop("/MCDU[" ~ me.computer ~ "]/page", "INITA");
|
||||
setprop("/MCDU[" ~ me.computer ~ "]/page", fmgc.windController.accessPage[me.computer]);
|
||||
} else if (index == 5) {
|
||||
var sts = size(mcdu_scratchpad.scratchpads[me.computer].scratchpad);
|
||||
if (sts >= 7 and sts <= 9) {
|
||||
|
|
|
@ -203,7 +203,7 @@ var windDESPage = {
|
|||
}
|
||||
me.reload();
|
||||
} else if (index == 6) {
|
||||
setprop("/MCDU[" ~ me.computer ~ "]/page", "INITA");
|
||||
setprop("/MCDU[" ~ me.computer ~ "]/page", fmgc.windController.accessPage[me.computer]);
|
||||
} else if (me.items >= index) {
|
||||
if (size(mcdu_scratchpad.scratchpads[me.computer].scratchpad) == 13) {
|
||||
var winds = split("/", mcdu_scratchpad.scratchpads[me.computer].scratchpad);
|
||||
|
|
Loading…
Add table
Reference in a new issue