1
0
Fork 0

DATA / STATUS pages - cleanup with new font

This commit is contained in:
Jonathan Redpath 2022-01-15 17:47:00 +00:00
parent eb12d3ed4d
commit da624bfb2e
5 changed files with 80 additions and 51 deletions

View file

@ -4837,7 +4837,6 @@
<file>Aircraft/A320-family/Nasal/MCDU/PERFTO.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/RADNAV.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/DATA.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/STATUS.nas</file>
</mcdu>
<!-- Traffic layer from E-jet -->
<traffic>

View file

@ -373,7 +373,7 @@ var canvas_MCDU_base = {
var degrees2 = int(dms2);
var minutes2 = sprintf("%.1f",abs((dms2 - degrees2) * 60));
var sign2 = degrees2 >= 0 ? "E" : "W";
return sprintf("%d %.1f%s/%03s %.1f%s",abs(degrees),minutes,sign,abs(degrees2),minutes2,sign2);
return sprintf("%d°%.1f%s/%03s°%.1f%s",abs(degrees),minutes,sign,abs(degrees2),minutes2,sign2);
},
getIRSStatus: func(a,b = 0) {
var irsstatus = "INVAL";
@ -436,6 +436,33 @@ var canvas_MCDU_base = {
if (page != "ATISDETAIL") {
me["ATISArrows"].hide();
}
if (page == "STATUS") {
me["Simple_R5S"].setFont("HoneywellMCDU.ttf");
me["Simple_R5S"].setFontSize(normal);
} else {
me["Simple_R5S"].setFont("HoneywellMCDUSmall.ttf");
me["Simple_R5S"].setFontSize(small);
}
if (page == "IRSMON") {
me["Simple_R1S"].setFont("HoneywellMCDU.ttf");
me["Simple_R1S"].setFontSize(normal);
me["Simple_R2S"].setFont("HoneywellMCDU.ttf");
me["Simple_R2S"].setFontSize(normal);
me["Simple_R3S"].setFont("HoneywellMCDU.ttf");
me["Simple_R3S"].setFontSize(normal);
} else {
me["Simple_R1S"].setFont("HoneywellMCDUSmall.ttf");
me["Simple_R1S"].setFontSize(small);
me["Simple_R2S"].setFont("HoneywellMCDUSmall.ttf");
me["Simple_R2S"].setFontSize(small);
me["Simple_R3S"].setFont("HoneywellMCDUSmall.ttf");
me["Simple_R3S"].setFontSize(small);
}
if (page != "POSMON") {
me["Simple_Title"].setFontSize(normal);
me["Simple_Title2"].setFontSize(normal);
}
if (page == "F-PLNA" or page == "F-PLNB") {
if (!pageSwitch[i].getBoolValue()) {
me["Simple"].show();
@ -1989,7 +2016,7 @@ var canvas_MCDU_base = {
me["arrowsDepArr"].show();
me["arrow1L"].hide();
me["arrow2L"].hide();
me["arrow3L"].hide();
me["arrow3L"].show();
me["arrow4L"].hide();
me["arrow5L"].hide();
me["arrow1R"].hide();
@ -2007,15 +2034,15 @@ var canvas_MCDU_base = {
showLeft(me,1, 1, 1, -1, -1, 1);
me["Simple_L0S"].hide();
showLeftS(me,1, 1, 1, -1, -1, 1);
showLeftArrow(me,-1, -1, 1, -1, -1, -1);
showLeftArrow(me,-1, -1, -1, -1, -1, -1);
showRight(me,-1, 1, -1, 1, 1, 1);
showRightS(me,-1, -1, -1, 1, 1, 1);
showRightArrow(me,-1, -1, -1, -1, -1, 1);
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
me.fontSizeLeft(normal, normal, normal, normal, small, normal);
me.fontSizeRight(normal, normal, normal, small, normal, normal);
me.fontSizeLeft(normal, normal, small, normal, normal, small);
me.fontSizeRight(normal, normal, normal, normal, normal, normal);
me.colorLeft("grn", "blu", "blu", "wht", "blu", "grn");
me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
@ -2040,6 +2067,7 @@ var canvas_MCDU_base = {
me["Simple_R6S"].setText("SOFTWARE ");
me["Simple_R4S"].setText("PILOT STORED ");
me["Simple_R4"].setText("00RTES 00RWYS ");
me["arrow3L"].setColor(BLUE);
pageSwitch[i].setBoolValue(1);
}
@ -2231,7 +2259,7 @@ var canvas_MCDU_base = {
showRightArrow(me,-1, -1, -1, -1, -1, 1);
me.standardFontSize();
me.fontSizeLeft(small, small, small, small, small, normal);
me.colorLeft("wht", "wht", "wht", "wht", "grn", "blu");
me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "blu");
@ -2254,6 +2282,8 @@ var canvas_MCDU_base = {
if (pageFreezed[i] == nil) {
me["Simple_Title"].setText("POSITION MONITOR");
me["Simple_Title"].setFontSize(normal);
me["Simple_Title2"].setFontSize(normal);
me["Simple_Title2"].hide();
me["Simple_L6"].setText(" FREEZE");
@ -2306,7 +2336,7 @@ var canvas_MCDU_base = {
for ( var a=0; a<3; a+=1 ) {
if (systems.ADIRS.Operating.aligned[a].getValue()) {
me[Simple_row5[a]].setText(sprintf("%-8s",(systems.ADIRS.ADIRunits[a].mode == 2) ? "ATT" : "NAV 0.0"));
me[Simple_row5[a]].setText(sprintf("%-8s",(systems.ADIRS.ADIRunits[a].mode == 2) ? "ATT" : "NAV 0.1"));
} else {
me[Simple_row5[a]].setText(sprintf("%-8s",me.getIRSStatus(a)));
}
@ -2315,8 +2345,10 @@ var canvas_MCDU_base = {
} else {
me["Simple_Title"].setText("POSITION FROZEN AT ");
me["Simple_Title"].setFontSize(small);
me["Simple_Title2"].setText(sprintf("%23s ",pageFreezed[i]));
me["Simple_Title2"].show();
me["Simple_Title2"].setFontSize(small);
me["Simple_L6"].setText(" UNFREEZE");
}
@ -2330,7 +2362,12 @@ var canvas_MCDU_base = {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHideWithCenter();
me.standardFontSize();
me.fontSizeLeft(normal, normal, normal, normal, normal, normal);
me.fontSizeLeftS(0, 0, 0, small, small, small);
me.fontSizeRight(normal, normal, normal, normal, normal, normal);
me.fontSizeRightS(small, small, small, small, small, small);
me.fontSizeCenter(normal, normal, normal, normal, normal, normal);
me.fontSizeCenterS(small, small, small, small, small, small);
me.defaultPageNumbers();
@ -2376,7 +2413,7 @@ var canvas_MCDU_base = {
var rows = ["Simple_L2S","Simple_L3S","Simple_L4S"];
var center = ["Simple_C1","Simple_C2","Simple_C3"];
for (var a = 0; a<3; a+=1) {
me[rows[a]].setText(" " ~ me.getIRSStatus(a,1));
me[rows[a]].setText(me.getIRSStatus(a,1));
if (systems.ADIRS.ADIRunits[a]._excessMotion) {
me[center[a]].show();
} else {
@ -2385,8 +2422,8 @@ var canvas_MCDU_base = {
}
if (fmgc.FMGCInternal.phase == 7) { # DONE phase
if (fmgc.FMGCInternal.arrApt != nil and fmgc.flightPlanController.flightplans[2].departure_runway != nil) {
me["Simple_R1S"].setText(sprintf("DRIFT AT %7s ",fmgc.FMGCInternal.arrApt ~ fmgc.flightPlanController.flightplans[2].departure_runway.id));
if (fmgc.FMGCInternal.arrApt != nil and fmgc.flightPlanController.flightplans[2].destination_runway != nil) {
me["Simple_R1S"].setText(sprintf("DRIFT AT %7s ",fmgc.FMGCInternal.arrApt ~ fmgc.flightPlanController.flightplans[2].destination_runway.id));
}
me["Simple_R2S"].setText(sprintf("DRIFT %2.1fNM/H ",0));
me["Simple_R3S"].setText(sprintf("DRIFT %2.1fNM/H ",0));
@ -2432,11 +2469,11 @@ var canvas_MCDU_base = {
me["Simple_L1S"].setText("GPS1 POSITION");
me["Simple_L2S"].setText("TTRK");
me["Simple_L3S"].setText("MERIT");
me["Simple_L3"].setText(sprintf("%3d",((rand() * 50) - 25) + 50) ~ "M");
me["Simple_L3"].setText(sprintf("%s",int(((rand() * 50) - 25) + 50)) ~ "M");
me["Simple_L4S"].setText("GPS2 POSITION");
me["Simple_L5S"].setText("TTRK");
me["Simple_L6S"].setText("MERIT");
me["Simple_L6"].setText(sprintf("%3d",((rand() * 50) - 25) + 50) ~ "M");
me["Simple_L6"].setText(sprintf("%s",int(((rand() * 50) - 25) + 50)) ~ "M");
me["Simple_C2S"].setText("UTC");
me["Simple_C3S"].setText("GPS ALT");
me["Simple_C5S"].setText("UTC");

View file

@ -40,6 +40,8 @@ var closestAirportPage = {
me.C1[1] = " BRG DIST";
me.R1[1] = "UTC ";
me.L5 = ["[ ]", nil, "blu"];
me.C5 = [nil, nil, "grn"];
me.R5 = [nil, nil, "grn"];
me.L6 = [" FREEZE", nil, "blu"];
me.R6 = ["EFOB/WIND ", nil, "wht"];
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1]];
@ -96,31 +98,29 @@ var closestAirportPage = {
var magvarLocal = magvar();
if (size(me.airports) >= 1) {
me.cdVector[0] = courseAndDistance(me.airports[0]);
me.C1 = [math.round(me.cdVector[0][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[0][1]), " BRG DIST", "grn"];
me.C1 = [sprintf("%03d",me.cdVector[0][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[0][1]), " BRG DIST", "grn"];
}
if (size(me.airports) >= 2) {
me.cdVector[1] = courseAndDistance(me.airports[1]);
me.C2 = [math.round(me.cdVector[1][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[1][1]) , nil, "grn"];
me.C2 = [sprintf("%03d",me.cdVector[1][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[1][1]) , nil, "grn"];
}
if (size(me.airports) >= 3) {
me.cdVector[2] = courseAndDistance(me.airports[2]);
me.C3 = [math.round(me.cdVector[2][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[2][1]), nil, "grn"];
me.C3 = [sprintf("%03d",me.cdVector[2][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[2][1]), nil, "grn"];
}
if (size(me.airports) >= 4) {
me.cdVector[3] = courseAndDistance(me.airports[3]);
me.C4 = [math.round(me.cdVector[3][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[3][1]), nil, "grn"];
me.C4 = [sprintf("%03d",me.cdVector[3][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[3][1]), nil, "grn"];
}
if (me.manAirport != nil) {
me.C5 = [math.round(courseAndDistance(me.manAirport)[0] - magvarLocal) ~ " " ~ math.round(courseAndDistance(me.manAirport)[1]), nil, "grn"];
me.C5 = [sprintf("%03d",courseAndDistance(me.manAirport)[0] - magvarLocal) ~ "° " ~ math.round(courseAndDistance(me.manAirport)[1]), nil, "grn"];
}
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
},
manAirportCall: func(id) {
if (id == "CLR") {
me.manAirport = nil;
me.L5 = [nil, nil, "grn"];
me.C5 = [nil, nil, "grn"];
me.R5 = [nil, nil, "grn"];
me._setupPageWithData();
return;
}
if (size(id) > 4) {
@ -131,6 +131,7 @@ var closestAirportPage = {
me.manAirport = airportinfo(id);
me.L5 = [id, nil, "grn"];
me.R5 = ["----", nil, "grn"];
mcdu_scratchpad.scratchpads[i].empty();
}
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
}

View file

@ -522,7 +522,7 @@ var lskbutton = func(btn, i) {
} else if (page == "PERFAPPR") {
perfAPPRInput("L3",i);
} else if (page == "STATUS") {
statusInput("L3",i);
fmgc.switchDatabase();
} else if (page == "RADNAV") {
radnavInput("L3",i);
} else if (page == "DATA") {
@ -786,7 +786,6 @@ var lskbutton = func(btn, i) {
canvas_mcdu.myDuplicate[i].pushButtonLeft(5);
} else if (page == "CLOSESTAIRPORT") {
canvas_mcdu.myClosestAirport[i].manAirportCall(mcdu_scratchpad.scratchpads[i].scratchpad);
mcdu_scratchpad.scratchpads[i].empty();
} else if (page == "ATCMENU") {
pageNode[i].setValue("NOTIFICATION");
} else if (page == "FLTLOG") {
@ -1171,7 +1170,16 @@ var rskbutton = func(btn, i) {
}
pageNode[i].setValue("WINDDES");
} else if (page == "STATUS") {
statusInput("R5",i);
if (fmgc.WaypointDatabase.getCount() >= 1) {
if (fmgc.WaypointDatabase.confirm[i]) {
fmgc.WaypointDatabase.delete(i);
fmgc.WaypointDatabase.confirm[i] = 0;
} else {
fmgc.WaypointDatabase.confirm[i] = 1;
}
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (page == "PERFTO") {
perfTOInput("R5",i);
} else if (page == "PERFAPPR") {

View file

@ -1,16 +0,0 @@
# A3XX mCDU by Joshua Davidson (Octal450), Jonathan Redpath, and Matthew Maring (mattmaring)
# Copyright (c) 2020 Josh Davidson (Octal450)
var statusInput = func(key, i) {
if (key == "L3") {
fmgc.switchDatabase();
} elsif (key == "R5") {
if (fmgc.WaypointDatabase.confirm[i]) {
fmgc.WaypointDatabase.delete(i);
fmgc.WaypointDatabase.confirm[i] = 0;
} else {
fmgc.WaypointDatabase.confirm[i] = 1;
}
}
}