diff --git a/A320-main.xml b/A320-main.xml
index 2204be2a..55a36cf5 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -1394,6 +1394,14 @@
0
0
0
+
+ G-EZTB
+ EZY
+ U2
+ 0
+ 0
+ 0
+
@@ -4335,6 +4343,9 @@
Aircraft/A320-family/Nasal/Panels/atc.nas
+
+ Aircraft/A320-family/Nasal/Systems/Comm/Notification.nas
+
Aircraft/A320-family/Nasal/Displays/DMC.nas
diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas
index f2b8e01c..8137fe9b 100644
--- a/Models/Instruments/MCDU/MCDU.nas
+++ b/Models/Instruments/MCDU/MCDU.nas
@@ -197,6 +197,7 @@ var ldg_config_f_set = props.globals.getNode("/FMGC/internal/ldg-config-f-set",
# Fetch nodes into vectors
var pageProp = [props.globals.getNode("/MCDU[0]/page", 1), props.globals.getNode("/MCDU[1]/page", 1)];
var active = [props.globals.getNode("/MCDU[0]/active", 1), props.globals.getNode("/MCDU[1]/active", 1)];
+var activeAtsu = [props.globals.getNode("/MCDU[0]/atsu-active", 1), props.globals.getNode("/MCDU[1]/atsu-active", 1)];
# Create Nodes:
var pageSwitch = [props.globals.initNode("/MCDU[0]/internal/switch", 0, "BOOL"), props.globals.initNode("/MCDU[1]/internal/switch", 0, "BOOL")];
@@ -270,7 +271,7 @@ var canvas_MCDU_base = {
"FUELPRED_ZFWCG","FUELPRED_ZFWCG_S","PROG","PROG_UPDATE","PERFTO","PERFTO_V1","PERFTO_VR","PERFTO_V2","PERFTO_FE","PERFTO_SE","PERFTO_OE","PERFAPPR",
"PERFAPPR_FE","PERFAPPR_SE","PERFAPPR_OE","PERFAPPR_LDG_3","PERFAPPR_LDG_F","PERFGA","PERFGA_FE","PERFGA_SE","PERFGA_OE","FPLN","FPLN_From",
"FPLN_TMPY_group","FPLN_FROM","FPLN_Callsign","departureTMPY", "arrowsDepArr","arrow1L","arrow2L","arrow3L","arrow4L","arrow5L","arrow1R","arrow2R",
- "arrow3R","arrow4R","arrow5R","DIRTO_TMPY_group","IRSINIT","IRSINIT_1","IRSINIT_2","IRSINIT_star"];
+ "arrow3R","arrow4R","arrow5R","DIRTO_TMPY_group","IRSINIT","IRSINIT_1","IRSINIT_2","IRSINIT_star","NOTIFY","NOTIFY_FLTNBR","NOTIFY_AIRPORT","MODEVHF3","PRINTPAGE","COMM-ADS","COCALL","COCALLTUNE"];
},
update: func() {
if (systems.ELEC.Bus.ac1.getValue() >= 110 and mcdu1_lgt.getValue() > 0.01) {
@@ -286,8 +287,67 @@ var canvas_MCDU_base = {
MCDU_2.page.hide();
}
},
+ defaultHide: func() {
+ 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["PERFAPPR"].hide();
+ me["PERFGA"].hide();
+ me["Simple_Title"].show();
+ },
+ hideAllArrows: func() {
+ me["Simple_L1_Arrow"].hide();
+ me["Simple_L2_Arrow"].hide();
+ me["Simple_L3_Arrow"].hide();
+ me["Simple_L4_Arrow"].hide();
+ me["Simple_L5_Arrow"].hide();
+ me["Simple_L6_Arrow"].hide();
+ me["Simple_R1_Arrow"].hide();
+ me["Simple_R2_Arrow"].hide();
+ me["Simple_R3_Arrow"].hide();
+ me["Simple_R4_Arrow"].hide();
+ me["Simple_R5_Arrow"].hide();
+ me["Simple_R6_Arrow"].hide();
+ },
updateCommon: func(i) {
page = pageProp[i].getValue();
+ if (page != "NOTIFICATION") {
+ me["NOTIFY"].hide();
+ me["NOTIFY_FLTNBR"].hide();
+ me["NOTIFY_AIRPORT"].hide();
+ }
+ if (page != "COMPANYCALL") {
+ me["COCALL"].hide();
+ me["COCALLTUNE"].hide();
+ }
+ if (page != "CONNECTSTATUS") {
+ me["COMM-ADS"].hide();
+ } else {
+ me["COMM-ADS"].show();
+ }
+ if (page != "VOICEDIRECTORY") {
+ me["MODEVHF3"].hide();
+ } else {
+ me["MODEVHF3"].show();
+ }
+ if (page != "COMMINIT" and page != "COMPANYCALL" and page != "VOICEDIRECTORY" and page != "DATAMODE" and page != "COMMSTATUS") {
+ me["PRINTPAGE"].hide();
+ } else {
+ me["PRINTPAGE"].show();
+ if (page == "DATAMODE" or page == "COMMINIT") {
+ me["PRINTPAGE"].setColor(BLUE);
+ } else {
+ me["PRINTPAGE"].setColor(WHITE);
+ }
+ }
if (page == "F-PLNA" or page == "F-PLNB") {
if (!pageSwitch[i].getBoolValue()) {
me["Simple"].show();
@@ -312,18 +372,7 @@ var canvas_MCDU_base = {
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
- me["Simple_L1_Arrow"].hide();
- me["Simple_L2_Arrow"].hide();
- me["Simple_L3_Arrow"].hide();
- me["Simple_L4_Arrow"].hide();
- me["Simple_L5_Arrow"].hide();
- me["Simple_L6_Arrow"].hide();
- me["Simple_R1_Arrow"].hide();
- me["Simple_R2_Arrow"].hide();
- me["Simple_R3_Arrow"].hide();
- me["Simple_R4_Arrow"].hide();
- me["Simple_R5_Arrow"].hide();
- me["Simple_R6_Arrow"].hide();
+ me.hideAllArrows();
me.fontLeft(default, default, default, default, default, default);
me.fontLeftS(default, default, default, default, default, default);
@@ -404,20 +453,7 @@ var canvas_MCDU_base = {
}
} else if (page == "MCDU") {
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["PERFAPPR"].hide();
- me["PERFGA"].hide();
- me["Simple_Title"].show();
+ me.defaultHide();
me["Simple_Title"].setText("MCDU MENU");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("X/X");
@@ -429,9 +465,9 @@ var canvas_MCDU_base = {
me["Simple_L0S"].hide();
me.showLeftS(-1, -1, -1, -1, -1, -1);
me.showLeftArrow(1, 1, 1, 1, -1, -1);
- me.showRight(-1, -1, -1, -1, -1, 1);
+ me.showRight(-1, -1, -1, -1, -1, -1);
me.showRightS(-1, -1, -1, -1, -1, -1);
- me.showRightArrow(-1, -1, -1, -1, -1, 1);
+ me.showRightArrow(-1, -1, -1, -1, -1, -1);
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
@@ -450,6 +486,8 @@ var canvas_MCDU_base = {
me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me["Simple_L3"].setText(" AIDS");
+ me["Simple_L4"].setText(" CFDS");
pageSwitch[i].setBoolValue(1);
}
@@ -463,10 +501,732 @@ var canvas_MCDU_base = {
me["Simple_L1"].setText(" FMGC");
me["Simple_L1"].setColor(0.0509,0.7529,0.2941);
}
- me["Simple_L2"].setText(" ACARS");
- me["Simple_L3"].setText(" AIDS");
- me["Simple_L4"].setText(" CFDS");
- me["Simple_R6"].setText("RETURN ");
+
+ if (activeAtsu[i].getValue() == 0) {
+ me["Simple_L2"].setText(" ATSU");
+ me["Simple_L2"].setColor(1,1,1);
+ } else if (activeAtsu[i].getValue() == 1) {
+ me["Simple_L2"].setText(" ATSU(SEL)");
+ me["Simple_L2"].setColor(0.0901,0.6039,0.7176);
+ } else if (activeAtsu[i].getValue() == 2) {
+ me["Simple_L2"].setText(" ATSU");
+ me["Simple_L2"].setColor(0.0509,0.7529,0.2941);
+ }
+ } else if (page == "ATSUDLINK") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me.defaultHide();
+ me["Simple_Title"].setText("ATSU DATALINK");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me.showLeft(1, -1, -1, -1, -1, -1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(-1, -1, -1, -1, -1, -1);
+ me.showLeftArrow(1, -1, -1, -1, -1, -1);
+ me.showRight(1, -1, -1, -1, -1, 1);
+ me.showRightS(-1, -1, -1, -1, -1, -1);
+ me.showRightArrow(1, -1, -1, -1, -1, 1);
+ 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.colorLeft("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+
+ me["Simple_L1"].setText(" ATC MENU");
+ me["Simple_R1"].setText("AOC MENU ");
+ me["Simple_R6"].setText("COMM MENU ");
+ pageSwitch[i].setBoolValue(1);
+ }
+ } else if (page == "ATCMENU") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me.defaultHide();
+ me["Simple_Title"].setText("ATC MENU");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("1/2");
+ me["Simple_PageNum"].show();
+ me["ArrowLeft"].show();
+ me["ArrowRight"].show();
+
+ me.showLeft(1, 1, -1, 1, 1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(-1, -1, -1, -1, -1, 1);
+ me.showLeftArrow(1, 1, -1, 1, 1, 1);
+ me.showRight(1, 1, 1, -1, 1, 1);
+ me.showRightS(-1, -1, -1, -1, 1, -1);
+ me.showRightArrow(1, 1, 1, -1, 1, 1);
+ 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.colorLeft("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("wht", "wht", "wht", "wht", "wht", "amb");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "amb");
+
+
+ me["Simple_L1"].setText(" LAT REQ");
+ me["Simple_L2"].setText(" WHEN CAN WE");
+ me["Simple_L4"].setText(" MSG RECORD");
+ me["Simple_L5"].setText(" NOTIFICATION");
+ me["Simple_L6S"].setText(" ATSU DLK");
+ me["Simple_L6"].setText(" RETURN");
+
+ me["Simple_R1"].setText("VERT REQ ");
+ me["Simple_R2"].setText("OTHER ");
+ me["Simple_R3"].setText("TEXT ");
+ me["Simple_R3"].setText("REPORTS ");
+ me["Simple_R5"].setText("STATUS ");
+ me["Simple_R5S"].setText("CONNECTION ");
+ me["Simple_R6"].setText("EMERGENCY ");
+ pageSwitch[i].setBoolValue(1);
+ }
+ } else if (page == "ATCMENU2") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me.defaultHide();
+ me["Simple_Title"].setText("ATC MENU");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("2/2");
+ me["Simple_PageNum"].show();
+ me["ArrowLeft"].show();
+ me["ArrowRight"].show();
+
+ me.showLeft(1, 1, -1, -1, -1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(-1, -1, -1, -1, -1, 1);
+ me.showLeftArrow(1, 1, -1, -1, -1, 1);
+ me.showRight(1, -1, -1, -1, -1, -1);
+ me.showRightS(-1, -1, -1, -1, -1, -1);
+ me.showRightArrow(1, -1, -1, -1, -1, -1);
+ 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.colorLeft("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+
+
+ me["Simple_L1"].setText(" DEPART REQ");
+ me["Simple_L2"].setText(" OCEANIC REQ");
+ me["Simple_L6S"].setText(" ATSU DLK");
+ me["Simple_L6"].setText(" RETURN");
+
+ me["Simple_R1"].setText("ATIS ");
+ pageSwitch[i].setBoolValue(1);
+ }
+ } else if (page == "NOTIFICATION") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me["Simple"].show();
+ me["Simple_Center"].show();
+ 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["PERFAPPR"].hide();
+ me["PERFGA"].hide();
+ me["Simple_Title"].show();
+ me["Simple_Title"].setText("NOTIFICATION");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me.showLeft(1, 1, -1, -1, -1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(1, 1, -1, -1, -1, 1);
+ me.showLeftArrow(-1, -1, -1, -1, -1, 1);
+ me.showCenter(-1, 1, -1, -1, -1, -1);
+ me.showCenterS(-1, -1, -1, -1, -1, -1);
+ me.showRight(-1, 1, -1, -1, -1, 1);
+ me.showRightS(-1, -1, -1, -1, -1, 1);
+ me.showRightArrow(-1, -1, -1, -1, -1, 1);
+ 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(small, normal, normal, normal, normal, normal);
+ me.fontSizeCenter(normal, normal, normal, normal, small, normal);
+ me.fontSizeRight(normal, normal, normal, normal, normal, normal);
+
+ me.colorLeft("grn", "blu", "grn", "wht", "wht", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorCenter("wht", "wht", "wht", "wht", "amb", "wht");
+ me.colorRight("wht", "blu", "wht", "wht", "wht", "wht");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+
+ me["Simple_L1S"].setText(" ATC FLT NBR");
+ me["Simple_L2S"].setText(" ATC CENTER");
+ me["Simple_C2"].setText("------------ ");
+ me["Simple_R2"].setText("NOTIFY ");
+ me["Simple_C5"].setText("NOTIFICATION UNAVAILABLE");
+
+ me["Simple_L6S"].setText(" ATC MENU");
+ me["Simple_L6"].setText(" RETURN");
+ me["Simple_R6"].setText("STATUS ");
+ me["Simple_R6S"].setText("CONNECTION ");
+
+
+ if (fmgc.FMGCInternal.flightNumSet) {
+ me["NOTIFY_FLTNBR"].hide();
+ me["Simple_L1"].setText(fmgc.FMGCInternal.flightNum);
+ me["Simple_L1"].show();
+ me["Simple_C5"].hide();
+ } else {
+ me["Simple_L1"].hide();
+ me["NOTIFY_FLTNBR"].show();
+ me["Simple_C5"].show();
+ }
+ pageSwitch[i].setBoolValue(1);
+ }
+
+ if (atsu.notificationSystem.notifyAirport != nil) {
+ if (!atsu.notificationSystem.hasNotified) {
+ me["Simple_L2"].setText(atsu.notificationSystem.notifyAirport);
+ me["Simple_L2"].show();
+ me["NOTIFY_AIRPORT"].hide();
+ } else {
+ me["Simple_L2"].hide();
+ me["NOTIFY_AIRPORT"].show();
+ }
+ } else {
+ me["Simple_L2"].hide();
+ me["NOTIFY_AIRPORT"].show();
+ }
+
+ if (atsu.notificationSystem.hasNotified) {
+ me["NOTIFY"].hide();
+ me["Simple_L3"].setText(atsu.notificationSystem.notifyAirport);
+ me["Simple_L3"].show();
+ me["Simple_L3S"].setText(" ATC NOTIFIED");
+ me["Simple_L3S"].show();
+ } else {
+ me["NOTIFY"].show();
+ me["Simple_L3"].hide();
+ me["Simple_L3S"].hide();
+ }
+ } else if (page == "CONNECTSTATUS") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me["Simple"].show();
+ me["Simple_Center"].show();
+ 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["PERFAPPR"].hide();
+ me["PERFGA"].hide();
+ me["Simple_Title"].show();
+ me["Simple_Title"].setText("CONNECTION STATUS");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me.showLeft(1, 1, -1, 1, -1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(1, 1, -1, -1, -1, 1);
+ me.showLeftArrow(-1, -1, -1, -1, -1, 1);
+ me.showCenter(1, -1, -1, -1, -1, -1);
+ me.showCenterS(-1, -1, -1, 1, -1, -1);
+ me.showRight(1, -1, 1, -1, 1, 1);
+ me.showRightS(-1, -1, 1, -1, -1, -1);
+ me.showRightArrow(-1, -1, -1, -1, -1, 1);
+ 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.fontSizeCenter(small, normal, small, normal, normal, normal);
+ me.fontSizeRight(normal, normal, normal, normal, small, normal);
+
+ me.colorLeft("grn", "wht", "wht", "blu", "wht", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorCenter("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("blu", "blu", "blu", "wht", "wht", "wht");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+
+ me["Simple_L1S"].setText("ACTIVE ATC");
+ me["Simple_L2S"].setText("NEXT ATC");
+ me["Simple_L2"].setText("----");
+ me["Simple_C1"].setText("------------- ");
+ me["Simple_R1"].setText("NOTIFIED ");
+ me["Simple_R3S"].setText("MAX UPLINK DELAY");
+ me["Simple_R3"].setText("NONE");
+
+ me["Simple_R5"].setText("ADS DETAIL");
+ me["Simple_L6S"].setText(" ATC MENU");
+ me["Simple_L6"].setText(" RETURN");
+ me["Simple_R6"].setText("NOTIFICATION ");
+
+ pageSwitch[i].setBoolValue(1);
+ }
+
+ if (atsu.notificationSystem.notifyAirport != nil) {
+ if (atsu.notificationSystem.hasNotified) {
+ me["Simple_L1"].setText(atsu.notificationSystem.notifyAirport);
+ } else {
+ me["Simple_L1"].setText("----");
+ me["Simple_C1"].hide();
+ me["Simple_R1"].hide();
+ }
+ } else {
+ me["Simple_L1"].setText("----");
+ me["Simple_C1"].hide();
+ me["Simple_R1"].hide();
+ }
+
+ if (atsu.ADS.state == 0) {
+ me["Simple_C4S"].setText("--------------ADS - OFF--------");
+ me["Simple_L4"].setText(" SET ARMED");
+ } elsif (atsu.ADS.state == 1) {
+ me["Simple_C4S"].setText("-------------ADS - ARMED-------");
+ me["Simple_L4"].setText(" SET OFF");
+ } elsif (atsu.ADS.state == 2) {
+ me["Simple_C4S"].setText("-----------ADS - CONNECTED-----");
+ me["Simple_L4"].setText(" SET OFF");
+ }
+ } else if (page == "COMMMENU") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me.defaultHide();
+ me["Simple_Title"].setText("COMM MENU");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me.showLeft(1, 1, 1, -1, -1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(1, 1, 1, -1, -1, 1);
+ me.showLeftArrow(1, 1, 1, -1, -1, 1);
+ me.showRight(1, 1, -1, 1, -1, -1);
+ me.showRightS(1, 1, -1, -1, -1, -1);
+ me.showRightArrow(1, 1, -1, 1, -1, -1);
+ 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, small, normal);
+
+ me.colorLeft("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+
+ me["Simple_L1S"].setText(" COMM");
+ me["Simple_L1"].setText(" INIT");
+ me["Simple_L2S"].setText(" VHF3");
+ me["Simple_L2"].setText(" DATA MODE");
+ me["Simple_L3S"].setText(" VHF3 VOICE");
+ me["Simple_L3"].setText(" DIRECTORY");
+ me["Simple_L6S"].setText(" RETURN TO");
+ me["Simple_L6"].setText(" ATSU DLK");
+ me["Simple_R1S"].setText("COMM ");
+ me["Simple_R1"].setText("STATUS ");
+ me["Simple_R2S"].setText("COMPANY ");
+ me["Simple_R2"].setText("CALL ");
+ me["Simple_R4"].setText("MAINTENANCE ");
+
+ pageSwitch[i].setBoolValue(1);
+ }
+ } else if (page == "VOICEDIRECTORY") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me["Simple"].show();
+ me["Simple_Center"].show();
+ 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["PERFAPPR"].hide();
+ me["PERFGA"].hide();
+ me["Simple_Title"].show();
+ me["Simple_Title"].setText("VHF3 VOICE DIRECTORY");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me.showLeft(1, -1, -1, 1, -1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(1, -1, -1, 1, -1, -1);
+ me.showLeftArrow(-1, -1, -1, -1, -1, 1);
+ me.showCenter(-1, -1, -1, -1, -1, -1);
+ me.showCenterS(1, -1, -1, -1, -1, -1);
+ me.showRight(1, -1, -1, -1, 1, 1);
+ me.showRightS(1, -1, -1, -1, 1, 1);
+ me.showRightArrow(-1, -1, -1, -1, -1, -1);
+ 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.colorLeft("blu", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorCenterS("grn", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("blu", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+
+ me["Simple_L1S"].setText(" OPS");
+ me["Simple_L1"].setText(" 132.225");
+ me["Simple_L4S"].setText(" CO CALL");
+ me["Simple_L6S"].setText(" RETURN TO");
+ me["Simple_L6"].setText(" COMM MENU");
+ me["Simple_R1S"].setText("MAINT ");
+ me["Simple_R1"].setText("132.400 ");
+ me["Simple_R5S"].setText("MODE ");
+ me["Simple_R6S"].setText("PAGE ");
+ me["Simple_R6"].setText("PRINT ");
+ me["Simple_C1S"].setFontSize(normal);
+
+ pageSwitch[i].setBoolValue(1);
+ }
+ if (ecam.vhf3_voice.active) {
+ me["Simple_C1S"].setText("VOICE");
+ me["Simple_R5"].setText("DATA ");
+ } else {
+ me["Simple_C1S"].setText("DATA");
+ me["Simple_R5"].setText("VOICE ");
+ }
+ if (atsu.CompanyCall.frequency != 999.99) {
+ me["Simple_L4"].setText(" " ~ sprintf("%5.2f", atsu.CompanyCall.frequency));
+ } else {
+ me["Simple_L4"].setText(" ---.--");
+ }
+ } else if (page == "DATAMODE") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me["Simple"].show();
+ me["Simple_Center"].show();
+ 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["PERFAPPR"].hide();
+ me["PERFGA"].hide();
+ me["Simple_Title"].show();
+ me["Simple_Title"].setText("VHF3 DATA MODE");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me.showLeft(-1, 1, 1, 1, -1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(1, 1, 1, 1, -1, -1);
+ me.showLeftArrow(-1, 1, 1, 1, -1, 1);
+ me.showCenter(-1, -1, -1, -1, -1, -1);
+ me.showCenterS(1, -1, -1, -1, -1, -1);
+ me.showRight(-1, 1, 1, -1, -1, 1);
+ me.showRightS(1, 1, 1, -1, -1, 1);
+ me.showRightArrow(-1, 1, 1, -1, -1, -1);
+ 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.colorLeft("wht", "blu", "blu", "blu", "wht", "wht");
+ me.colorLeftS("grn", "blu", "blu", "blu", "wht", "wht");
+ me.colorLeftArrow("wht", "blu", "blu", "blu", "wht", "wht");
+ me.colorCenterS("grn", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("wht", "blu", "blu", "wht", "wht", "blu");
+ me.colorRightS("grn", "blu", "blu", "wht", "wht", "blu");
+ me.colorRightArrow("wht", "blu", "blu", "wht", "wht", "wht");
+
+ me["Simple_L1S"].setFontSize(normal);
+ me["Simple_C1S"].setFontSize(normal);
+ me["Simple_R1S"].setFontSize(normal);
+ me["Simple_L1S"].setText(" AUTO");
+ me["Simple_C1S"].setText("SITA725 ");
+ me["Simple_L2S"].setText(" SITA725");
+ me["Simple_L2"].setText(" EUROPE");
+ me["Simple_L3S"].setText(" SITA550");
+ me["Simple_L3"].setText(" ASIA/AUST");
+ me["Simple_L4S"].setText(" AVICOM");
+ me["Simple_L4"].setText(" JAPAN");
+ me["Simple_R1S"].setText(" 131.725");
+ me["Simple_R2S"].setText("ARINC ");
+ me["Simple_R2"].setText("USA ");
+ me["Simple_R3S"].setText("AIRCANADA ");
+ me["Simple_R3"].setText("CANADA ");
+ me["Simple_L6S"].setText(" RETURN TO");
+ me["Simple_L6"].setText(" COMM MENU");
+ me["Simple_R6S"].setText("PAGE ");
+ me["Simple_R6"].setText("PRINT ");
+
+ pageSwitch[i].setBoolValue(1);
+ }
+ } else if (page == "COMMINIT") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me.defaultHide();
+ me["Simple_Title"].setText("COMM INIT");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me.showLeft(-1, 1, 1, 1, -1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(-1, 1, 1, 1, -1, -1);
+ me.showLeftArrow(-1, -1, -1, -1, -1, 1);
+ me.showRight(-1, -1, 1, -1, -1, 1);
+ me.showRightS(-1, -1, 1, -1, -1, 1);
+ me.showRightArrow(-1, -1, 1, -1, -1, -1);
+ 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, small, normal);
+
+ me.colorLeft("wht", "blu", "blu", "blu", "wht", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("wht", "wht", "wht", "wht", "wht", "blu");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "blu");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+
+ me["Simple_L2S"].setText(" A/C REGISTR");
+ me["Simple_L2"].setText(getprop("/options/model-options/registration"));
+ me["Simple_L3S"].setText(" ACARS A/L ID");
+ me["Simple_L3"].setText(getprop("/options/model-options/two-letter"));
+ me["Simple_L4S"].setText(" STANDARD A/L ID");
+ me["Simple_L4"].setText(getprop("/options/model-options/three-letter"));
+ me["Simple_L6"].setText(" RETURN");
+ me["Simple_R3S"].setText("VHF3 ");
+ me["Simple_R3"].setText("SCAN SEL ");
+ me["Simple_R6S"].setText("PAGE ");
+ me["Simple_R6"].setText("PRINT ");
+
+ pageSwitch[i].setBoolValue(1);
+ }
+ } else if (page == "COMMSTATUS") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me.defaultHide();
+ me["Simple_Title"].setText("COMM STATUS");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me.showLeft(1, 1, -1, 1, 1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(-1, 1, 1, -1, 1, 1);
+ me.showLeftArrow(-1, -1, -1, -1, -1, 1);
+ me.showRight(1, 1, -1, 1, 1, 1);
+ me.showRightS(-1, 1, 1, 1, 1, 1);
+ me.showRightArrow(-1, -1, -1, -1, -1, -1);
+ 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, small, normal, normal, small, normal);
+ me.fontSizeRight(normal, small, normal, small, small, normal);
+
+ me.colorLeft("wht", "grn", "grn", "wht", "grn", "wht");
+ me.colorLeftS("wht", "grn", "grn", "wht", "grn", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("wht", "grn", "wht", "grn", "grn", "wht");
+ me.colorRightS("wht", "grn", "grn", "wht", "grn", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+
+ me["Simple_L1"].setText(" VHF3");
+ me["Simple_L2S"].setText(" OP");
+ me["Simple_L2"].setText(" COMM");
+ me["Simple_L4"].setText(" SATCOM");
+ me["Simple_L5"].setText(" COMM");
+ me["Simple_L6S"].setText(" RETURN TO");
+ me["Simple_L6"].setText(" COMM MENU");
+ me["Simple_R1"].setText("HF1 ");
+ me["Simple_R2S"].setText("OP ");
+ me["Simple_R2"].setText("COMM ");
+ me["Simple_R3S"].setText("VOICE ");
+ me["Simple_R4S"].setText("HF2 ");
+ me["Simple_R4S"].setFontSize(normal);
+ me["Simple_R4"].setText("OP ");
+ me["Simple_R5S"].setText("COMM ");
+ me["Simple_R5"].setText("VOICE ");
+ me["Simple_R6S"].setText("PAGE ");
+ me["Simple_R6"].setText("PRINT ");
+
+ pageSwitch[i].setBoolValue(1);
+ }
+ me["Simple_L3S"].setText(ecam.vhf3_voice.active == 1 ? " VOICE " : " DATA");
+ me["Simple_L5S"].setText(getprop("/options/model-options/wifi-aft") ? " OP" : " NOT INST");
+ me["Simple_L5"].setText(getprop("/options/model-options/wifi-aft") ? " COMM" : " DLK INOP");
+ } else if (page == "COMPANYCALL") {
+ if (!pageSwitch[i].getBoolValue()) {
+ me.defaultHide();
+ me["Simple_Title"].setText("COMPANY CALL");
+ me["Simple_Title"].setColor(1, 1, 1);
+ me["Simple_PageNum"].setText("X/X");
+ me["Simple_PageNum"].hide();
+ me["ArrowLeft"].hide();
+ me["ArrowRight"].hide();
+
+ me.showLeft(1, 1, -1, -1, -1, 1);
+ me["Simple_L0S"].hide();
+ me.showLeftS(1, 1, -1, -1, -1, 1);
+ me.showLeftArrow(-1, -1, -1, -1, -1, 1);
+ me.showRight(1, -1, -1, -1, -1, 1);
+ me.showRightS(1, -1, -1, -1, -1, 1);
+ me.showRightArrow(-1, -1, -1, -1, -1, -1);
+ 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, small, normal, normal, small, normal);
+ me.fontSizeRight(normal, small, normal, small, small, normal);
+
+ me.colorLeft("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRight("blu", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
+ me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
+
+ me["Simple_L1S"].setText(" VHF3 TUNE");
+ me["Simple_L2S"].setText(" TEXT");
+ me["Simple_L6S"].setText(" RETURN TO");
+ me["Simple_L6"].setText(" COMM MENU");
+ me["Simple_R1S"].setText("CO CALL ");
+ me["Simple_R1"].setText("CLEAR ");
+ me["Simple_R6S"].setText("CALL ");
+ me["Simple_R6"].setText("PRINT ");
+
+ pageSwitch[i].setBoolValue(1);
+ }
+
+ if (atsu.CompanyCall.received) {
+ me["COCALL"].hide();
+ } else {
+ me["COCALL"].show();
+ }
+
+ if (atsu.CompanyCall.frequency != 999.99) {
+ if (atsu.CompanyCall.tuned) {
+ me["COCALLTUNE"].hide();
+ } else {
+ me["COCALLTUNE"].show();
+ }
+ } else {
+ me["COCALLTUNE"].hide();
+ }
+
+ if (atsu.CompanyCall.activeMsg != "") {
+ me["Simple_L2"].setText(sprintf("%s", atsu.CompanyCall.activeMsg));
+ me["Simple_L2"].show();
+ } else {
+ me["Simple_L2"].hide();
+ }
+
+ if (atsu.CompanyCall.frequency != 999.99) {
+ me["Simple_L1"].setText(" " ~ sprintf("%5.2f", atsu.CompanyCall.frequency));
+ } else {
+ me["Simple_L1"].setText(" ---.--");
+ }
} else if (page == "STATUS") {
if (!pageSwitch[i].getBoolValue()) {
me["Simple"].show();
@@ -581,20 +1341,7 @@ var canvas_MCDU_base = {
}
} else if (page == "DATA") {
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["PERFAPPR"].hide();
- me["PERFGA"].hide();
- me["Simple_Title"].show();
+ me.defaultHide();
me["Simple_Title"].setText("DATA INDEX");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("1/2");
@@ -647,20 +1394,7 @@ var canvas_MCDU_base = {
}
} else if (page == "DATA2") {
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["PERFAPPR"].hide();
- me["PERFGA"].hide();
- me["Simple_Title"].show();
+ me.defaultHide();
me["Simple_Title"].setText("DATA INDEX");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("2/2");
@@ -714,20 +1448,7 @@ var canvas_MCDU_base = {
me["Simple_R4S"].setText("PILOTS ");
} else if (page == "PILOTWP") {
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["PERFAPPR"].hide();
- me["PERFGA"].hide();
- me["Simple_Title"].show();
+ me.defaultHide();
me["Simple_PageNum"].show();
me["ArrowLeft"].show();
me["ArrowRight"].show();
@@ -753,41 +1474,11 @@ var canvas_MCDU_base = {
me["Simple_Title"].setText(sprintf("%s", myPilotWP[i].title ~ " "));
- forindex (var matrixArrow; myPilotWP[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myPilotWP[i].arrowsMatrix[matrixArrow]) {
- if (myPilotWP[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].show();
- } else {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].hide();
- }
- }
- }
+ me.dynamicPageArrowFunc(myPilotWP[i]);
me.colorLeftArrow(myPilotWP[i].arrowsColour[0][0],myPilotWP[i].arrowsColour[0][1],myPilotWP[i].arrowsColour[0][2],myPilotWP[i].arrowsColour[0][3],myPilotWP[i].arrowsColour[0][4],myPilotWP[i].arrowsColour[0][5]);
me.colorRightArrow(myPilotWP[i].arrowsColour[1][0],myPilotWP[i].arrowsColour[1][1],myPilotWP[i].arrowsColour[1][2],myPilotWP[i].arrowsColour[1][3],myPilotWP[i].arrowsColour[1][4],myPilotWP[i].arrowsColour[1][5]);
-
- forindex (var matrixFont; myPilotWP[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myPilotWP[i].fontMatrix[matrixFont]) {
- if (myPilotWP[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.dynamicPageFontFunc(myPilotWP[i]);
me.dynamicPageFunc(myPilotWP[i].L1, "Simple_L1");
me.dynamicPageFunc(myPilotWP[i].L2, "Simple_L2");
@@ -880,20 +1571,7 @@ var canvas_MCDU_base = {
me["Simple_C5S"].setText("IRS2");
} else if (page == "RADNAV") {
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["PERFAPPR"].hide();
- me["PERFGA"].hide();
- me["Simple_Title"].show();
+ me.defaultHide();
me["Simple_Title"].setText("RADIO NAV");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("X/X");
@@ -3218,38 +3896,10 @@ var canvas_MCDU_base = {
}
me["Simple_Title"].setColor(getprop("/MCDUC/colors/" ~ myWind[i].titleColour ~ "/r"), getprop("/MCDUC/colors/" ~ myWind[i].titleColour ~ "/g"), getprop("/MCDUC/colors/" ~ myWind[i].titleColour ~ "/b"));
- forindex (var matrixArrow; myWind[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myWind[i].arrowsMatrix[matrixArrow]) {
- if (myWind[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].show();
- } else {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].hide();
- }
- }
- }
+ me.dynamicPageArrowFunc(myWind[i]);
me.colorLeftArrow(myWind[i].arrowsColour[0][0],myWind[i].arrowsColour[0][1],myWind[i].arrowsColour[0][2],myWind[i].arrowsColour[0][3],myWind[i].arrowsColour[0][4],myWind[i].arrowsColour[0][5]);
- forindex (var matrixFont; myWind[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myWind[i].fontMatrix[matrixFont]) {
- if (myWind[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.dynamicPageFontFunc(myWind[i]);
me.dynamicPageFunc(myWind[i].L1, "Simple_L1");
me.dynamicPageFunc(myWind[i].L2, "Simple_L2");
@@ -3340,39 +3990,11 @@ var canvas_MCDU_base = {
} else {
me["Simple_Center"].hide();
}
- forindex (var matrixArrow; myLatRev[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myLatRev[i].arrowsMatrix[matrixArrow]) {
- if (myLatRev[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].show();
- } else {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].hide();
- }
- }
- }
+
+ me.dynamicPageArrowFunc(myLatRev[i]);
me.colorLeftArrow(myLatRev[i].arrowsColour[0][0],myLatRev[i].arrowsColour[0][1],myLatRev[i].arrowsColour[0][2],myLatRev[i].arrowsColour[0][3],myLatRev[i].arrowsColour[0][4],myLatRev[i].arrowsColour[0][5]);
-
- forindex (var matrixFont; myLatRev[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myLatRev[i].fontMatrix[matrixFont]) {
- if (myLatRev[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.dynamicPageFontFunc(myLatRev[i]);
me.dynamicPageFunc(myLatRev[i].L1, "Simple_L1");
me.dynamicPageFunc(myLatRev[i].L2, "Simple_L2");
@@ -3452,39 +4074,11 @@ var canvas_MCDU_base = {
} else {
me["Simple_Center"].hide();
}
- forindex (var matrixArrow; myVertRev[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myVertRev[i].arrowsMatrix[matrixArrow]) {
- if (myVertRev[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].show();
- } else {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].hide();
- }
- }
- }
+
+ me.dynamicPageArrowFunc(myVertRev[i]);
me.colorLeftArrow(myVertRev[i].arrowsColour[0][0],myVertRev[i].arrowsColour[0][1],myVertRev[i].arrowsColour[0][2],myVertRev[i].arrowsColour[0][3],myVertRev[i].arrowsColour[0][4],myVertRev[i].arrowsColour[0][5]);
-
- forindex (var matrixFont; myVertRev[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myVertRev[i].fontMatrix[matrixFont]) {
- if (myVertRev[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.dynamicPageFontFunc(myVertRev[i]);
me.dynamicPageFunc(myVertRev[i].L1, "Simple_L1");
me.dynamicPageFunc(myVertRev[i].L2, "Simple_L2");
@@ -3556,42 +4150,8 @@ var canvas_MCDU_base = {
if (myDeparture[i] != nil) {
me["Simple_Title"].setText(sprintf("%s", myDeparture[i].title[0] ~ myDeparture[i].title[1] ~ myDeparture[i].title[2]));
- forindex (var matrixArrow; myDeparture[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myDeparture[i].arrowsMatrix[matrixArrow]) {
- if (item == 5) {
- me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[0][5] ~ "/b"));
- continue;
- }
- if (myDeparture[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["arrow" ~ (item + 1) ~ sign].show();
- me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[matrixArrow][item] ~ "/b"));
- } else {
- me["arrow" ~ (item + 1) ~ sign].hide();
- }
- }
- }
-
- forindex (var matrixFont; myDeparture[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myDeparture[i].fontMatrix[matrixFont]) {
- if (myDeparture[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.dynamicPageArrowFuncDepArr(myDeparture[i]);
+ me.dynamicPageFontFunc(myDeparture[i]);
me.dynamicPageFunc(myDeparture[i].L1, "Simple_L1");
me.dynamicPageFunc(myDeparture[i].L2, "Simple_L2");
@@ -3664,39 +4224,10 @@ var canvas_MCDU_base = {
if (myDuplicate[i] != nil) {
me["Simple_Title"].setText(sprintf("%s", myDuplicate[i].title));
- forindex (var matrixArrow; myDuplicate[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myDuplicate[i].arrowsMatrix[matrixArrow]) {
- if (myDuplicate[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].show();
- } else {
- me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].hide();
- }
- }
- }
+ me.dynamicPageArrowFunc(myDuplicate[i]);
me.colorLeftArrow(myDuplicate[i].arrowsColour[0][0],myDuplicate[i].arrowsColour[0][1],myDuplicate[i].arrowsColour[0][2],myDuplicate[i].arrowsColour[0][3],myDuplicate[i].arrowsColour[0][4],myDuplicate[i].arrowsColour[0][5]);
-
- forindex (var matrixFont; myDuplicate[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myDuplicate[i].fontMatrix[matrixFont]) {
- if (myDuplicate[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.dynamicPageFontFunc(myDuplicate[i]);
me.dynamicPageFunc(myDuplicate[i].L1, "Simple_L1");
me.dynamicPageFunc(myDuplicate[i].L2, "Simple_L2");
@@ -3786,43 +4317,8 @@ var canvas_MCDU_base = {
if (myArrival[i] != nil) {
me["Simple_Title"].setText(sprintf("%s", myArrival[i].title[0] ~ myArrival[i].title[1] ~ myArrival[i].title[2]));
- forindex (var matrixArrow; myArrival[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myArrival[i].arrowsMatrix[matrixArrow]) {
- if (item == 1) { continue; }
- if (item == 5) {
- me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[0][5] ~ "/b"));
- continue;
- }
- if (myArrival[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["arrow" ~ (item + 1) ~ sign].show();
- me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[matrixArrow][item] ~ "/b"));
- } else {
- me["arrow" ~ (item + 1) ~ sign].hide();
- }
- }
- }
-
- forindex (var matrixFont; myArrival[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myArrival[i].fontMatrix[matrixFont]) {
- if (myArrival[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.dynamicPageArrowFuncDepArr(myArrival[i]);
+ me.dynamicPageFontFunc(myArrival[i]);
me.dynamicPageFunc(myArrival[i].L1, "Simple_L1");
me.dynamicPageFunc(myArrival[i].L2, "Simple_L2");
@@ -3907,42 +4403,8 @@ var canvas_MCDU_base = {
me["Simple_Title"].setText(sprintf("%s", myHold[i].title[0] ~ myHold[i].title[1] ~ myHold[i].title[2]));
me["Simple_Title"].setColor(getprop("/MCDUC/colors/" ~ myHold[i].titleColour ~ "/r"), getprop("/MCDUC/colors/" ~ myHold[i].titleColour ~ "/g"), getprop("/MCDUC/colors/" ~ myHold[i].titleColour ~ "/b"));
- forindex (var matrixArrow; myHold[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myHold[i].arrowsMatrix[matrixArrow]) {
- if (item == 5) {
- me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[0][5] ~ "/b"));
- continue;
- }
- if (myHold[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["arrow" ~ (item + 1) ~ sign].show();
- me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[matrixArrow][item] ~ "/b"));
- } else {
- me["arrow" ~ (item + 1) ~ sign].hide();
- }
- }
- }
-
- forindex (var matrixFont; myHold[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myHold[i].fontMatrix[matrixFont]) {
- if (myHold[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.dynamicPageArrowFuncDepArr(myHold[i]);
+ me.dynamicPageFontFunc(myHold[i]);
me.dynamicPageFunc(myHold[i].L1, "Simple_L1");
me.dynamicPageFunc(myHold[i].L2, "Simple_L2");
@@ -4027,42 +4489,8 @@ var canvas_MCDU_base = {
me["Simple_Title"].setText(sprintf("%s", myAirways[i].title[0] ~ myAirways[i].title[1] ~ myAirways[i].title[2]));
me["Simple_Title"].setColor(getprop("/MCDUC/colors/" ~ myAirways[i].titleColour ~ "/r"), getprop("/MCDUC/colors/" ~ myAirways[i].titleColour ~ "/g"), getprop("/MCDUC/colors/" ~ myAirways[i].titleColour ~ "/b"));
- forindex (var matrixArrow; myAirways[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myAirways[i].arrowsMatrix[matrixArrow]) {
- if (item == 5) {
- me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myAirways[i].arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myAirways[i].arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myAirways[i].arrowsColour[0][5] ~ "/b"));
- continue;
- }
- if (myAirways[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["arrow" ~ (item + 1) ~ sign].show();
- me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ myAirways[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ myAirways[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ myAirways[i].arrowsColour[matrixArrow][item] ~ "/b"));
- } else {
- me["arrow" ~ (item + 1) ~ sign].hide();
- }
- }
- }
-
- forindex (var matrixFont; myAirways[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myAirways[i].fontMatrix[matrixFont]) {
- if (myAirways[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.dynamicPageArrowFuncDepArr(myAirways[i]);
+ me.dynamicPageFontFunc(myAirways[i]);
me.dynamicPageFunc(myAirways[i].L1, "Simple_L1");
me.dynamicPageFunc(myAirways[i].L2, "Simple_L2");
@@ -4148,22 +4576,8 @@ var canvas_MCDU_base = {
me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myClosestAirport[i].arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myClosestAirport[i].arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myClosestAirport[i].arrowsColour[0][5] ~ "/b"));
me["Simple_R6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myClosestAirport[i].arrowsColour[1][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myClosestAirport[i].arrowsColour[1][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myClosestAirport[i].arrowsColour[1][5] ~ "/b"));
- forindex (var matrixFont; myClosestAirport[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myClosestAirport[i].fontMatrix[matrixFont]) {
- if (myClosestAirport[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.dynamicPageFontFunc(myClosestAirport[i]);
me.dynamicPageFunc(myClosestAirport[i].L1, "Simple_L1");
me.dynamicPageFunc(myClosestAirport[i].L2, "Simple_L2");
@@ -4216,18 +4630,7 @@ var canvas_MCDU_base = {
me["Simple_Title"].show();
me["ArrowLeft"].hide();
me["ArrowRight"].hide();
- me["Simple_L1_Arrow"].hide();
- me["Simple_L2_Arrow"].hide();
- me["Simple_L3_Arrow"].hide();
- me["Simple_L4_Arrow"].hide();
- me["Simple_L5_Arrow"].hide();
- me["Simple_L6_Arrow"].hide();
- me["Simple_R1_Arrow"].hide();
- me["Simple_R2_Arrow"].hide();
- me["Simple_R3_Arrow"].hide();
- me["Simple_R4_Arrow"].hide();
- me["Simple_R5_Arrow"].hide();
- me["Simple_R6_Arrow"].hide();
+ me.hideAllArrows();
me["Simple_L0S"].hide();
me["Simple_C3B"].hide();
@@ -4250,39 +4653,8 @@ var canvas_MCDU_base = {
me["Simple_Title"].setText(sprintf("%s", myDirTo[i].title[0]));
me["Simple_Title"].setColor(getprop("/MCDUC/colors/" ~ myDirTo[i].titleColour ~ "/r"), getprop("/MCDUC/colors/" ~ myDirTo[i].titleColour ~ "/g"), getprop("/MCDUC/colors/" ~ myDirTo[i].titleColour ~ "/b"));
- forindex (var matrixArrow; myDirTo[i].arrowsMatrix) {
- if (matrixArrow == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myDirTo[i].arrowsMatrix[matrixArrow]) {
- if (item == 5) { continue; }
- if (myDirTo[i].arrowsMatrix[matrixArrow][item] == 1) {
- me["arrow" ~ (item + 1) ~ sign].show();
- me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ myDirTo[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ myDirTo[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ myDirTo[i].arrowsColour[matrixArrow][item] ~ "/b"));
- } else {
- me["arrow" ~ (item + 1) ~ sign].hide();
- }
- }
- }
-
- forindex (var matrixFont; myDirTo[i].fontMatrix) {
- if (matrixFont == 0) {
- var sign = "L";
- } else {
- var sign = "R";
- }
- forindex (var item; myDirTo[i].fontMatrix[matrixFont]) {
- if (myDirTo[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.dynamicPageArrowFuncDepArr(myDirTo[i]);
+ me.dynamicPageFontFunc(myDirTo[i]);
if (fmgc.flightPlanController.temporaryFlag[i] and mcdu.dirToFlag) {
me["DIRTO_TMPY_group"].show();
@@ -5061,6 +5433,62 @@ var canvas_MCDU_base = {
}
}
},
+ dynamicPageArrowFunc: func (dynamic) {
+ forindex (var matrixArrow; dynamic.arrowsMatrix) {
+ if (matrixArrow == 0) {
+ var sign = "L";
+ } else {
+ var sign = "R";
+ }
+ forindex (var item; dynamic.arrowsMatrix[matrixArrow]) {
+ if (dynamic.arrowsMatrix[matrixArrow][item] == 1) {
+ me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].show();
+ } else {
+ me["Simple_" ~ sign ~ (item + 1) ~ "_Arrow"].hide();
+ }
+ }
+ }
+ },
+ dynamicPageArrowFuncDepArr: func (dynamic) {
+ forindex (var matrixArrow; dynamic.arrowsMatrix) {
+ if (matrixArrow == 0) {
+ var sign = "L";
+ } else {
+ var sign = "R";
+ }
+ forindex (var item; dynamic.arrowsMatrix[matrixArrow]) {
+ if (item == 5) {
+ me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ dynamic.arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ dynamic.arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ dynamic.arrowsColour[0][5] ~ "/b"));
+ continue;
+ }
+ if (dynamic.arrowsMatrix[matrixArrow][item] == 1) {
+ me["arrow" ~ (item + 1) ~ sign].show();
+ me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ dynamic.arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ dynamic.arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ dynamic.arrowsColour[matrixArrow][item] ~ "/b"));
+ } else {
+ me["arrow" ~ (item + 1) ~ sign].hide();
+ }
+ }
+ }
+ },
+ dynamicPageFontFunc: func (dynamic) {
+ forindex (var matrixFont; dynamic.fontMatrix) {
+ if (matrixFont == 0) {
+ var sign = "L";
+ } else {
+ var sign = "R";
+ }
+ forindex (var item; dynamic.fontMatrix[matrixFont]) {
+ if (dynamic.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);
+ }
+ }
+ }
+ },
+
updateScratchpad: func(i) {
me["Scratchpad"].setText(sprintf("%s", mcdu_scratchpad.scratchpads[i].scratchpad));
var color_selected = mcdu_scratchpad.scratchpads[i].scratchpadColour;
diff --git a/Models/Instruments/MCDU/MCDU1.xml b/Models/Instruments/MCDU/MCDU1.xml
index 37e6bbc9..51439c6d 100644
--- a/Models/Instruments/MCDU/MCDU1.xml
+++ b/Models/Instruments/MCDU/MCDU1.xml
@@ -58,7 +58,7 @@
BRT
- false
+ true
@@ -70,7 +70,7 @@
controls/lighting/DU/mcdu1
0.0
1.0
- 0.2
+ 0.05
false
@@ -81,7 +81,7 @@
DIM
- false
+ true
@@ -93,7 +93,7 @@
controls/lighting/DU/mcdu1
0.0
1.0
- -0.2
+ -0.05
false
@@ -174,6 +174,31 @@
+
+ pick
+ atc_comm
+
+
+ false
+
+ nasal
+
+
+
+
+ systems/electrical/bus/ac-1
+ 110
+
+
+ controls/lighting/DU/mcdu1
+ 0.01
+
+
+
+
+
+
+
pick
mcdu
diff --git a/Models/Instruments/MCDU/MCDU2.xml b/Models/Instruments/MCDU/MCDU2.xml
index 7b3d3818..38324cf0 100644
--- a/Models/Instruments/MCDU/MCDU2.xml
+++ b/Models/Instruments/MCDU/MCDU2.xml
@@ -58,7 +58,7 @@
BRT
- false
+ true
@@ -70,7 +70,7 @@
controls/lighting/DU/mcdu2
0.0
1.0
- 0.2
+ 0.05
false
@@ -81,7 +81,7 @@
DIM
- false
+ true
@@ -93,7 +93,7 @@
controls/lighting/DU/mcdu2
0.0
1.0
- -0.2
+ -0.05
false
@@ -174,6 +174,31 @@
+
+ pick
+ atc_comm
+
+
+ false
+
+ nasal
+
+
+
+
+ systems/electrical/bus/ac-2
+ 110
+
+
+ controls/lighting/DU/mcdu2
+ 0.01
+
+
+
+
+
+
+
pick
mcdu
diff --git a/Models/Instruments/MCDU/res/mcdu.svg b/Models/Instruments/MCDU/res/mcdu.svg
index a2659979..29bea37f 100644
--- a/Models/Instruments/MCDU/res/mcdu.svg
+++ b/Models/Instruments/MCDU/res/mcdu.svg
@@ -12,7 +12,7 @@
viewBox="0 0 1024 864"
version="1.1"
id="svg2"
- inkscape:version="1.0beta2 (2b71d25, 2019-12-03)"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="mcdu.svg">
@@ -37,17 +37,17 @@
guidetolerance="20"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
- inkscape:window-width="1920"
- inkscape:window-height="1035"
+ inkscape:window-width="1366"
+ inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="1.1488097"
- inkscape:cx="846.91312"
- inkscape:cy="326.27773"
- inkscape:window-x="0"
- inkscape:window-y="23"
- inkscape:window-maximized="0"
- inkscape:current-layer="FUELPRED"
+ inkscape:cx="1021.6506"
+ inkscape:cy="302.3673"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2"
showguides="false"
inkscape:snap-global="false"
units="px"
@@ -2711,4 +2711,279 @@
y="385.6102"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas
index 67206bef..055c6453 100644
--- a/Nasal/ECAM/ECAM-logic.nas
+++ b/Nasal/ECAM/ECAM-logic.nas
@@ -2385,6 +2385,12 @@ var messages_right_memo = func {
ignition.active = 0;
}
+ if ((phaseVarMemo3 <= 2 or phaseVarMemo3 == 6 or phaseVarMemo3 >= 9) and atsu.CompanyCall.frequency != 999.99 and !atsu.CompanyCall.received) {
+ company_call.active = 1;
+ } else {
+ company_call.active = 0;
+ }
+
if (getprop("controls/pneumatics/switches/apu") == 1 and getprop("engines/engine[2]/n1") >= 95) {
apu_bleed.active = 1;
} else {
diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas
index a8f945b7..f268784c 100644
--- a/Nasal/ECAM/ECAM-messages.nas
+++ b/Nasal/ECAM/ECAM-messages.nas
@@ -489,7 +489,7 @@ var memos = std.Vector.new([
var terr_stby = memo.new(msg: "TERR STBY" ), # Not yet implemented
var tcas_stby = memo.new(msg: "TCAS STBY" ), # Not yet implemented
var acars_call = memo.new(msg: "ACARS CALL" ), # Not yet implemented
- var company_call = memo.new(msg: "COMPANY CALL"), # Not yet implemented
+ var company_call = memo.new(msg: "COMPANY CALL"),
var satcom_alert = memo.new(msg: "SATCOM ALERT"), # Not yet implemented
var acars_msg = memo.new(msg: "ACARS MSG" ), # Not yet implemented
var company_msg = memo.new(msg: "COMPANY MSG" ), # Not yet implemented
diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas
index 4b7e4901..d667bed6 100644
--- a/Nasal/Libraries/libraries.nas
+++ b/Nasal/Libraries/libraries.nas
@@ -208,6 +208,7 @@ var systemsInit = func {
dmc.DMController.init();
fmgc.flightPlanController.init();
fmgc.windController.init();
+ atsu.CompanyCall.init();
}
setlistener("/sim/signals/fdm-initialized", func {
diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas
index 958f97c4..7101d0ff 100644
--- a/Nasal/Libraries/property-tree-setup.nas
+++ b/Nasal/Libraries/property-tree-setup.nas
@@ -144,6 +144,9 @@ var Position = {
var Sim = {
aero: props.globals.getNode("/sim/aero"),
+ Multiplay: {
+ online: props.globals.getNode("/sim/multiplay/online"),
+ },
pause: props.globals.getNode("/sim/freeze/master"),
Replay: {
replayActive: props.globals.getNode("/sim/replay/replay-state"),
diff --git a/Nasal/MCDU/ATC.nas b/Nasal/MCDU/ATC.nas
new file mode 100644
index 00000000..c4f45c71
--- /dev/null
+++ b/Nasal/MCDU/ATC.nas
@@ -0,0 +1,33 @@
+var latReq = {
+ title: [nil, nil, nil],
+ titleColour: "wht",
+ subtitle: [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"],
+ R1: [nil, nil, "ack"],
+ R2: [nil, nil, "ack"],
+ R3: [nil, nil, "ack"],
+ R4: [nil, nil, "ack"],
+ R5: [nil, nil, "ack"],
+ R6: [nil, nil, "ack"],
+ computer: nil,
+ new: func(computer) {
+ var lr = {parents:[latReq]};
+ lr.computer = computer;
+ lr._setupPageWithData();
+ return lr;
+ },
+ del: func() {
+ return nil;
+ },
+ _setupPageWithData: func() {
+
+ },
+}
\ No newline at end of file
diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas
index aa6e21d5..90a46e41 100644
--- a/Nasal/MCDU/MCDU.nas
+++ b/Nasal/MCDU/MCDU.nas
@@ -10,9 +10,10 @@ var MCDU_init = func(i) {
var MCDU_reset = func(i) {
setprop("/MCDU[" ~ i ~ "]/active", 0);
+ setprop("/MCDU[" ~ i ~ "]/atsu-active", 0);
setprop("it-autoflight/settings/togaspd", 157); #aka v2 clone
- setprop("/MCDU[" ~ i ~ "]/last-page", "NONE");
setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS");
+ setprop("/MCDU[" ~ i ~ "]/last-atsu-page", "ATSUDLINK");
setprop("/MCDU[" ~ i ~ "]/page", "MCDU");
setprop("/FMGC/keyboard-left", 0);
@@ -199,17 +200,21 @@ var setMode = func(will) {
var lskbutton = func(btn, i) {
if (btn == "1") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "MCDU") {
- if (getprop("/MCDU[" ~ i ~ "]/active") != 2) {
- mcdu_message(i, "WAIT FOR SYSTEM RESPONSE");
- setprop("/MCDU[" ~ i ~ "]/active", 1);
- settimer(func(){
+ if (getprop("/MCDU[" ~ i ~ "]/atsu-active") == 1) {
+ mcdu_message(i, "NOT ALLOWED");
+ } else {
+ if (getprop("/MCDU[" ~ i ~ "]/active") != 2) {
+ mcdu_message(i, "WAIT FOR SYSTEM RESPONSE");
+ setprop("/MCDU[" ~ i ~ "]/active", 1);
+ settimer(func(){
+ setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
+ mcdu_scratchpad.scratchpads[i].empty();
+ setprop("/MCDU[" ~ i ~ "]/active", 2);
+ }, 2);
+ } else {
setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
mcdu_scratchpad.scratchpads[i].empty();
- setprop("/MCDU[" ~ i ~ "]/active", 2);
- }, 2);
- } else {
- setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
- mcdu_scratchpad.scratchpads[i].empty();
+ }
}
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "IRSINIT") {
initInputIRS("L1",i);
@@ -258,11 +263,38 @@ var lskbutton = func(btn, i) {
canvas_mcdu.myDirTo[i].fieldL1(mcdu_scratchpad.scratchpads[i].scratchpad);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
canvas_mcdu.myDuplicate[i].pushButtonLeft(1);
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATSUDLINK") {
+ setprop("/MCDU[" ~ i ~ "]/page", "ATCMENU");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "COMMMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "COMMINIT");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "COMPANYCALL") {
+ if (atsu.CompanyCall.frequency != 999.99) {
+ atsu.CompanyCall.tune();
+ } else {
+ mcdu_message(i, "NOT ALLOWED");
+ }
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (btn == "2") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("/MCDU[" ~ i ~ "]/page") == "MCDU") {
+ if (getprop("/MCDU[" ~ i ~ "]/active") == 1) {
+ mcdu_message(i, "NOT ALLOWED");
+ } else {
+ if (getprop("/MCDU[" ~ i ~ "]/atsu-active") != 2) {
+ mcdu_message(i, "WAIT FOR SYSTEM RESPONSE");
+ setprop("/MCDU[" ~ i ~ "]/atsu-active", 1);
+ settimer(func(){
+ setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-atsu-page"));
+ mcdu_scratchpad.scratchpads[i].empty();
+ setprop("/MCDU[" ~ i ~ "]/atsu-active", 2);
+ }, 2);
+ } else {
+ setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-atsu-page"));
+ mcdu_scratchpad.scratchpads[i].empty();
+ }
+ }
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("L2",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "WINDCLB") {
canvas_mcdu.myCLBWIND[i].pushButtonLeft(2);
@@ -298,6 +330,17 @@ var lskbutton = func(btn, i) {
canvas_mcdu.myDirTo[i].leftFieldBtn(2);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
canvas_mcdu.myDuplicate[i].pushButtonLeft(2);
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "NOTIFICATION") {
+ var result = atsu.notificationSystem.inputAirport(mcdu_scratchpad.scratchpads[i].scratchpad);
+ if (result == 1) {
+ mcdu_message(i, "NOT ALLOWED");
+ } elsif (result == 2) {
+ mcdu_message(i, "NOT IN DATA BASE");
+ } else {
+ mcdu_scratchpad.scratchpads[i].empty();
+ }
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "COMMMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "DATAMODE");
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -347,6 +390,8 @@ var lskbutton = func(btn, i) {
}
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
canvas_mcdu.myDuplicate[i].pushButtonLeft(3);
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "COMMMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "VOICEDIRECTORY");
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -381,6 +426,18 @@ var lskbutton = func(btn, i) {
canvas_mcdu.myDirTo[i].leftFieldBtn(4);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DUPLICATENAMES") {
canvas_mcdu.myDuplicate[i].pushButtonLeft(4);
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CONNECTSTATUS") {
+ if (atsu.ADS.state != 0) {
+ atsu.ADS.setState(0);
+ } else {
+ atsu.ADS.setState(1);
+ }
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "VOICEDIRECTORY") {
+ if (atsu.CompanyCall.frequency != 999.99) {
+ atsu.CompanyCall.tune();
+ } else {
+ mcdu_message(i, "NOT ALLOWED");
+ }
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -434,6 +491,8 @@ var lskbutton = func(btn, i) {
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLOSESTAIRPORT") {
canvas_mcdu.myClosestAirport[i].manAirportCall(mcdu_scratchpad.scratchpads[i].scratchpad);
mcdu_scratchpad.scratchpads[i].empty();
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATCMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "NOTIFICATION");
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -491,6 +550,14 @@ var lskbutton = func(btn, i) {
canvas_mcdu.myDirTo[i].fieldL6();
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLOSESTAIRPORT") {
canvas_mcdu.myClosestAirport[i].freeze();
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATCMENU" or getprop("/MCDU[" ~ i ~ "]/page") == "ATCMENU2") {
+ setprop("/MCDU[" ~ i ~ "]/page", "ATSUDLINK");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "NOTIFICATION" or getprop("/MCDU[" ~ i ~ "]/page") == "CONNECTSTATUS") {
+ setprop("/MCDU[" ~ i ~ "]/page", "ATCMENU");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "COMMMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "ATSUDLINK");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "COMMINIT" or getprop("/MCDU[" ~ i ~ "]/page") == "VOICEDIRECTORY" or getprop("/MCDU[" ~ i ~ "]/page") == "DATAMODE" or getprop("/MCDU[" ~ i ~ "]/page") == "COMMSTATUS" or getprop("/MCDU[" ~ i ~ "]/page") == "COMPANYCALL") {
+ setprop("/MCDU[" ~ i ~ "]/page", "COMMMENU");
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -545,6 +612,14 @@ var rskbutton = func(btn, i) {
} else {
mcdu_message(i, "NOT ALLOWED"); # todo spawn new waypoints page
}
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "COMMMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "COMMSTATUS");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "COMPANYCALL") {
+ if (atsu.CompanyCall.frequency != 999.99) {
+ atsu.CompanyCall.ack();
+ } else {
+ mcdu_message(i, "NOT ALLOWED");
+ }
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -565,6 +640,13 @@ var rskbutton = func(btn, i) {
canvas_mcdu.myArrival[i].arrPushbuttonRight(2);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("/MCDU[" ~ i ~ "]/page") == "F-PLNB") {
canvas_mcdu.myFpln[i].pushButtonRight(2);
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "NOTIFICATION") {
+ var result = atsu.notificationSystem.notify();
+ if (result == 1) {
+ mcdu_message(i, "NOT ALLOWED");
+ }
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "COMMMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "COMPANYCALL");
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -730,18 +812,19 @@ var rskbutton = func(btn, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATCMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "CONNECTSTATUS");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "VOICEDIRECTORY") {
+ for (var i = 0; i < 3; i = i + 1) {
+ if (getprop("/systems/radio/rmp[" ~ i ~ "]/sel_chan") == "vhf3") {
+ rmp.transfer(i + 1);
+ }
+ }
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (btn == "6") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "MCDU") {
- if (getprop("/MCDU[" ~ i ~ "]/last-page") != "NONE") {
- setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-page"));
- mcdu_scratchpad.scratchpads[i].empty();
- } else {
- mcdu_message(i, "NOT ALLOWED");
- }
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("R6",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "IRSINIT") {
initInputIRS("R6",i);
@@ -783,6 +866,12 @@ var rskbutton = func(btn, i) {
canvas_mcdu.myPilotWP[i].deleteCmd();
}
}
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "NOTIFICATION") {
+ setprop("/MCDU[" ~ i ~ "]/page", "CONNECTSTATUS");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATSUDLINK") {
+ setprop("/MCDU[" ~ i ~ "]/page", "COMMMENU");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CONNECTSTATUS") {
+ setprop("/MCDU[" ~ i ~ "]/page", "NOTIFICATION");
} else {
mcdu_message(i, "NOT ALLOWED");
}
@@ -813,6 +902,10 @@ var arrowbutton = func(btn, i) {
canvas_mcdu.myArrival[i].scrollLeft();
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PILOTWP") {
canvas_mcdu.myPilotWP[i].scrollLeft();
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATCMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "ATCMENU2");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATCMENU2") {
+ setprop("/MCDU[" ~ i ~ "]/page", "ATCMENU");
}
} else if (btn == "right") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
@@ -837,6 +930,10 @@ var arrowbutton = func(btn, i) {
canvas_mcdu.myArrival[i].scrollRight();
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PILOTWP") {
canvas_mcdu.myPilotWP[i].scrollRight();
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATCMENU") {
+ setprop("/MCDU[" ~ i ~ "]/page", "ATCMENU2");
+ } else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATCMENU2") {
+ setprop("/MCDU[" ~ i ~ "]/page", "ATCMENU");
}
} else if (btn == "up") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("/MCDU[" ~ i ~ "]/page") == "F-PLNB") {
@@ -908,8 +1005,12 @@ var pagebutton = func(btn, i) {
} else if (btn == "data") {
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
} else if (btn == "mcdu") {
- setprop("/MCDU[" ~ i ~ "]/last-page", getprop("/MCDU[" ~ i ~ "]/page"));
- setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", getprop("/MCDU[" ~ i ~ "]/page"));
+ var page = getprop("/MCDU[" ~ i ~ "]/page");
+ if (page != "ATSUDLINK" and page != "ATCMENU" and page != "ATCMENU2" and page != "NOTIFICATION" and page != "CONNECTSTATUS" and page != "COMPANYCALL" and page != "VOICEDIRECTORY" and page != "DATAMODE" and page != "COMMMENU" and page != "COMMSTATUS" and page != "COMMINIT") {
+ setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", getprop("/MCDU[" ~ i ~ "]/page"));
+ } else {
+ setprop("/MCDU[" ~ i ~ "]/last-atsu-page", getprop("/MCDU[" ~ i ~ "]/page"));
+ }
mcdu_message(i, "SELECT DESIRED SYSTEM");
setprop("/MCDU[" ~ i ~ "]/page", "MCDU");
} else if (btn == "f-pln" or btn == "airport") {
@@ -941,6 +1042,18 @@ var pagebutton = func(btn, i) {
canvas_mcdu.myDirTo[i] = dirTo.new(i);
}
setprop("/MCDU[" ~ i ~ "]/page", "DIRTO");
+ } else if (btn == "atc") {
+ if (getprop("/MCDU[" ~ i ~ "]/atsu-active") != 2) {
+ mcdu_message(i, "WAIT FOR SYSTEM RESPONSE");
+ setprop("/MCDU[" ~ i ~ "]/atsu-active", 1);
+ settimer(func(){
+ setprop("/MCDU[" ~ i ~ "]/page", "ATCMENU");
+ mcdu_scratchpad.scratchpads[i].empty();
+ setprop("/MCDU[" ~ i ~ "]/atsu-active", 2);
+ }, 2);
+ } else {
+ setprop("/MCDU[" ~ i ~ "]/page", "ATCMENU");
+ }
}
}
}
diff --git a/Nasal/Systems/Comm/Notification.nas b/Nasal/Systems/Comm/Notification.nas
new file mode 100644
index 00000000..5da8fe35
--- /dev/null
+++ b/Nasal/Systems/Comm/Notification.nas
@@ -0,0 +1,81 @@
+# A3XX Notification System
+# Jonathan Redpath
+
+# Copyright (c) 2020 Josh Davidson (Octal450)
+var notificationSystem = {
+ notifyAirport: nil,
+ hasNotified: 0,
+ inputAirport: func(airport) {
+ if (!fmgc.FMGCInternal.flightNumSet or size(airport) != 4) { return 1; }
+ var airportList = findAirportsByICAO(airport);
+ if (size(airportList) == 0) { return 2; }
+ if (me.hasNotified) { me.hasNotified = 0; }
+ me.notifyAirport = airportList[0].id;
+ return 0;
+ },
+ notify: func() {
+ if (me.notifyAirport != nil) {
+ me.hasNotified = 1;
+ # todo - send notification to ATC
+ return 0;
+ } else {
+ return 1;
+ }
+ },
+ automaticTransfer: func(station) {
+ var airportList = findAirportsByICAO(station);
+ if (size(airportList) == 0) { return 2; }
+ me.notifyAirport = airportList[0].id;
+ return 0;
+ },
+};
+
+var ADS = {
+ state: 1,
+ connections: [nil, nil, nil, nil],
+ setState: func(state) {
+ me.state = state;
+ },
+ getCount: func() {
+ var count = 0;
+ for (var i = 0; i < 4; i = i + 1) {
+ if (me.connections[i] != nil) {
+ count += 1;
+ }
+ }
+ return count;
+ },
+};
+
+var CompanyCall = {
+ activeMsg: "",
+ frequency: 999.99,
+ received: 0,
+ tuned: 0,
+ init: func() {
+ me.activeMsg = "";
+ me.frequency = 999.99;
+ me.received = 0;
+ },
+ newMsg: func(msg, freq) {
+ me.activeMsg = msg;
+ me.frequency = freq;
+ me.received = 0;
+ },
+ ack: func() {
+ me.received = 1;
+ ## assume that call remains until you receive another one or aircraft is reset
+ },
+ tune: func() {
+ if (!me.received) { me.ack(); }
+ if (rmp.act_vhf3.getValue() == 0) {
+ for (var i = 0; i < 3; i = i + 1) {
+ if (getprop("/systems/radio/rmp[" ~ i ~ "]/sel_chan") == "vhf3") {
+ setprop("/systems/radio/rmp[" ~ i ~ "]/vhf3-standby", me.frequency);
+ rmp.transfer(i + 1);
+ me.tuned = 1;
+ }
+ }
+ }
+ },
+};
\ No newline at end of file
diff --git a/gui/dialogs/mcdu1-dlg.xml b/gui/dialogs/mcdu1-dlg.xml
index 6a2f0fd8..b2abfed9 100644
--- a/gui/dialogs/mcdu1-dlg.xml
+++ b/gui/dialogs/mcdu1-dlg.xml
@@ -466,6 +466,16 @@
25
40
+
+ nasal
+
+
+
+ systems/electrical/bus/ac-1
+ 110
+
+
+