1
0
Fork 0
A320-family/Nasal/MCDU/DATA.nas

75 lines
2.2 KiB
Text
Raw Normal View History

2020-04-30 19:26:36 +00:00
# A3XX mCDU by Joshua Davidson (Octal450), Jonathan Redpath, and Matthew Maring (mattmaring)
2019-10-14 16:48:35 +00:00
2022-01-11 02:17:41 +00:00
# Copyright (c) 2022 Josh Davidson (Octal450)
2019-10-14 16:48:35 +00:00
var dataInput = func(key, i) {
if (key == "L1") {
2020-02-07 16:10:54 +00:00
setprop("MCDU[" ~ i ~ "]/page", "POSMON");
2021-01-28 13:59:08 +00:00
} elsif (key == "L2") {
2020-02-07 16:10:54 +00:00
setprop("MCDU[" ~ i ~ "]/page", "IRSMON");
2021-01-28 13:59:08 +00:00
} elsif (key == "L3") {
setprop("MCDU[" ~ i ~ "]/page", "GPSMON");
} elsif (key == "L5") {
if (canvas_mcdu.myClosestAirport[i] != nil) {
2021-12-27 16:54:23 +00:00
canvas_mcdu.myClosestAirport[i].del();
}
canvas_mcdu.myClosestAirport[i] = nil;
canvas_mcdu.myClosestAirport[i] = closestAirportPage.new(i);
setprop("MCDU[" ~ i ~ "]/page", "CLOSESTAIRPORT");
2021-01-28 13:59:08 +00:00
} elsif (key == "R5") {
2021-12-27 16:54:23 +00:00
mcdu_message(i, "PRINTER NOT AVAILABLE");
2019-10-14 16:48:35 +00:00
}
}
var printInput = func(key, i) {
if (key == "L1") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page1/L1auto", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "L2") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page1/L2auto", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "L3") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page1/L3auto", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "L5") {
2020-02-07 16:10:54 +00:00
setprop("MCDU[" ~ i ~ "]/page", "DATA");
2021-01-28 13:59:08 +00:00
} elsif (key == "R1") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page1/R1req", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "R2") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page1/R2req", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "R3") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page1/R3req", 1);
2019-10-14 16:48:35 +00:00
}
}
var printInput2 = func(key, i) {
if (key == "L1") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page2/L1auto", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "L2") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page2/L2auto", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "L3") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page2/L3auto", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "L4") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page2/L4auto", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "L6") {
2020-02-07 16:10:54 +00:00
setprop("MCDU[" ~ i ~ "]/page", "DATA");
2021-01-28 13:59:08 +00:00
} elsif (key == "R1") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page2/R1req", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "R2") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page2/R2req", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "R3") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page2/R3req", 1);
2021-01-28 13:59:08 +00:00
} elsif (key == "R4") {
2020-02-07 16:10:54 +00:00
setprop("FMGC/print/mcdu/page2/R4req", 1);
2019-10-14 16:48:35 +00:00
}
}
2021-08-03 15:14:37 +00:00
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");
}
}