1
0
Fork 0

Company call

This commit is contained in:
legoboyvdlp R 2020-07-23 15:29:44 +01:00
parent b1a71ccfbf
commit 05bde5aa40
10 changed files with 607 additions and 164 deletions

View file

@ -1372,6 +1372,14 @@
<steep-ils-avail type="bool">0</steep-ils-avail>
<enable-ecam-actions>0</enable-ecam-actions>
<test-canvas type="bool">0</test-canvas>
<model-options>
<registration type="string">G-EZTB</registration>
<three-letter type="string">EZY</three-letter>
<two-letter type="string">U2</two-letter>
<sharklet type="bool">0</sharklet>
<wifi-aft type="bool">0</wifi-aft> <!-- Iridium / inmarsat satcom + wireless -->
<wifi-fwd type="bool">0</wifi-fwd> <!-- Fly-fy-->
</model-options>
</options>
<instrumentation n="0">

View file

@ -271,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","NOTIFY","NOTIFY_FLTNBR","NOTIFY_AIRPORT"];
"arrow3R","arrow4R","arrow5R","DIRTO_TMPY_group","IRSINIT","IRSINIT_1","IRSINIT_2","IRSINIT_star","NOTIFY","NOTIFY_FLTNBR","NOTIFY_AIRPORT","COCALL","COCALLTUNE"];
},
update: func() {
if (systems.ELEC.Bus.ac1.getValue() >= 110 and mcdu1_lgt.getValue() > 0.01) {
@ -287,6 +287,22 @@ 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();
},
updateCommon: func(i) {
page = pageProp[i].getValue();
if (page != "NOTIFICATION") {
@ -294,6 +310,10 @@ var canvas_MCDU_base = {
me["NOTIFY_FLTNBR"].hide();
me["NOTIFY_AIRPORT"].hide();
}
if (page != "COMPANYCALL") {
me["COCALL"].hide();
me["COCALLTUNE"].hide();
}
if (page == "F-PLNA" or page == "F-PLNB") {
if (!pageSwitch[i].getBoolValue()) {
me["Simple"].show();
@ -410,20 +430,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");
@ -484,20 +491,7 @@ var canvas_MCDU_base = {
}
} else if (page == "ATSUDLINK") {
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("ATSU DATALINK");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("X/X");
@ -509,9 +503,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.showRightS(-1, -1, -1, -1, 1, -1);
me.showRightArrow(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();
@ -532,27 +526,12 @@ var canvas_MCDU_base = {
me["Simple_L1"].setText(" ATC MENU");
me["Simple_R1"].setText("AOC MENU ");
me["Simple_R5S"].setText("DATALINK ");
me["Simple_R5"].setText("STATUS ");
me["Simple_R6"].setText("COMM MENU ");
pageSwitch[i].setBoolValue(1);
}
} else if (page == "ATCMENU") {
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("ATC MENU");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("1/2");
@ -588,7 +567,7 @@ var canvas_MCDU_base = {
me["Simple_L1"].setText(" LAT REQ");
me["Simple_L2"].setText(" WHEN CAN WE");
me["Simple_L4"].setText(" MSG LOG");
me["Simple_L4"].setText(" MSG RECORD");
me["Simple_L5"].setText(" NOTIFICATION");
me["Simple_L6S"].setText(" ATSU DLK");
me["Simple_L6"].setText(" RETURN");
@ -604,20 +583,7 @@ var canvas_MCDU_base = {
}
} else if (page == "ATCMENU2") {
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("ATC MENU");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("2/2");
@ -761,6 +727,332 @@ var canvas_MCDU_base = {
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 == "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", "wht");
me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
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 != "" and !atsu.CompanyCall.received) {
me["Simple_L2"].setText(sprintf("%s", atsu.CompanyCall.activeMsg));
me["Simple_L2"].show();
} else {
me["Simple_L2"].hide();
}
if (atsu.CompanyCall.frequency != 999.99 and !atsu.CompanyCall.received) {
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();
@ -875,20 +1167,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");
@ -941,20 +1220,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");
@ -1008,20 +1274,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();
@ -1174,20 +1427,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");

View file

@ -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">
<metadata
id="metadata375">
@ -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="169.16726"
inkscape:cy="883.37609"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="false"
inkscape:snap-global="false"
units="px"
@ -2712,7 +2712,7 @@
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">=</tspan></text>
</g>
<g
style="stroke:#179ab7;stroke-opacity:1;opacity:0.98"
style="stroke:#179ab7;stroke-opacity:1;opacity:0.94000004"
id="NOTIFY"
inkscape:label="#g4324"
transform="matrix(1.0807111,0,0,1.0807111,-76.372598,-23.411021)">
@ -2804,36 +2804,96 @@
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#bb6100;stroke-width:4.03199005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
</g>
<g
id="NOTIFY_AIRPORT"
transform="translate(-549.98102,-4.468198)"
inkscape:label="#g1271">
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#bb6100;stroke-width:4.03199005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
id="rect4312-2"
width="39.4547"
height="41.350403"
x="684.51605"
y="268.18988" />
<rect
y="268.18988"
x="645.05713"
height="41.350403"
width="39.4547"
id="rect4314-6"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#bb6100;stroke-width:4.03199005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#bb6100;stroke-width:4.03199005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
id="rect4316-8"
width="39.4547"
height="41.350403"
x="605.59985"
y="268.18988" />
<rect
y="268.18988"
x="566.14355"
height="41.350403"
width="39.4547"
id="rect4318-9"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#bb6100;stroke-width:4.03199005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
</g>
id="NOTIFY_AIRPORT"
transform="translate(-549.98102,-4.468198)"
inkscape:label="#g1271">
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#bb6100;stroke-width:4.03199005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
id="rect4312-2"
width="39.4547"
height="41.350403"
x="684.51605"
y="268.18988" />
<rect
y="268.18988"
x="645.05713"
height="41.350403"
width="39.4547"
id="rect4314-6"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#bb6100;stroke-width:4.03199005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<rect
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#bb6100;stroke-width:4.03199005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
id="rect4316-8"
width="39.4547"
height="41.350403"
x="605.59985"
y="268.18988" />
<rect
y="268.18988"
x="566.14355"
height="41.350403"
width="39.4547"
id="rect4318-9"
style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#bb6100;stroke-width:4.03199005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
</g>
<g
transform="matrix(1.0807111,0,0,1.0807111,-76.372598,-141.09805)"
inkscape:label="#g4324"
id="COCALL"
style="opacity:0.94000005;stroke:#179ab7;stroke-opacity:1">
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 998.71909,284.70793 H 970.18944"
id="path1272"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1274"
d="m 994.54102,294.79468 -20.17351,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 984.45427,298.97275 -10e-6,-28.52964"
id="path1276"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1278"
d="m 974.36752,294.79468 20.17349,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
style="opacity:0.88;stroke:#ffffff;stroke-opacity:1"
id="COCALLTUNE"
inkscape:label="#g4324"
transform="matrix(1.0807111,0,0,1.0807111,-1029.0108,-141.09805)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1280"
d="M 998.71909,284.70793 H 970.18944"
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 994.54102,294.79468 -20.17351,-20.1735"
id="path1282"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1284"
d="m 984.45427,298.97275 -10e-6,-28.52964"
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 974.36752,294.79468 20.17349,-20.1735"
id="path1286"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View file

@ -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 {

View file

@ -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

View file

@ -212,6 +212,7 @@ var systemsInit = func {
dmc.DMController.init();
fmgc.flightPlanController.init();
fmgc.windController.init();
atsu.CompanyCall.init();
}
setlistener("/sim/signals/fdm-initialized", func {

View file

@ -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"),

33
Nasal/MCDU/ATC.nas Normal file
View file

@ -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() {
},
}

View file

@ -265,6 +265,14 @@ var lskbutton = func(btn, i) {
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");
}
@ -414,6 +422,12 @@ 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 {
mcdu_message(i, "NOT ALLOWED");
}
@ -528,8 +542,12 @@ var lskbutton = func(btn, i) {
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") {
} 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") == "COMMSTATUS" or getprop("/MCDU[" ~ i ~ "]/page") == "COMPANYCALL") {
setprop("/MCDU[" ~ i ~ "]/page", "COMMMENU");
} else {
mcdu_message(i, "NOT ALLOWED");
}
@ -584,6 +602,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");
}
@ -609,6 +635,8 @@ var rskbutton = func(btn, i) {
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");
}
@ -774,6 +802,8 @@ var rskbutton = func(btn, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "ATCMENU") {
setprop("/MCDU[" ~ i ~ "]/page", "CONNECTSTATUS");
} else {
mcdu_message(i, "NOT ALLOWED");
}
@ -820,6 +850,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");
}
@ -954,7 +990,7 @@ var pagebutton = func(btn, i) {
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
} else if (btn == "mcdu") {
var page = getprop("/MCDU[" ~ i ~ "]/page");
if (page != "ATSUDLINK" and page != "ATCMENU" and page != "ATCMENU2" and page != "NOTIFICATION") {
if (page != "ATSUDLINK" and page != "ATCMENU" and page != "ATCMENU2" and page != "NOTIFICATION" and page != "CONNECTSTATUS" and page != "COMPANYCALL" 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"));

View file

@ -22,4 +22,60 @@ var notificationSystem = {
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;
}
}
}
},
};