1
0
Fork 0

MCDU: font size + degrees

This commit is contained in:
Jonathan Redpath 2021-12-10 14:54:38 +00:00
parent fa09847806
commit a572a74c3d

View file

@ -28,8 +28,8 @@ var myHISTWIND = [nil, nil];
var myAtis = [nil, nil];
var default = "HoneywellMCDU.ttf";
var symbol = "HoneywellMCDU.ttf";
var normal = 70;
var small = 56;
var normal = 60;
var small = 46;
var page = "";
var fplnLineSize = 0;
var fplnl1 = "";
@ -2773,7 +2773,7 @@ var canvas_MCDU_base = {
if (!fmgc.FMGCInternal.toFromSet and !fmgc.FMGCInternal.crzSet) {
me["INITA_CruiseFLTemp"].hide();
me["Simple_L6"].setColor(WHITE);
me["Simple_L6"].setText("-----/---g");
me["Simple_L6"].setText("-----/---°");
} else if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.crzTempSet) {
me["INITA_CruiseFLTemp"].hide();
me["Simple_L6"].setColor(BLUE);
@ -2787,7 +2787,7 @@ var canvas_MCDU_base = {
} else {
me["INITA_CruiseFLTemp"].show();
me["Simple_L6"].setColor(AMBER);
me["Simple_L6"].setText(" g");
me["Simple_L6"].setText(" °");
}
if (fmgc.FMGCInternal.coRouteSet) { # show coRoute when valid
@ -2978,24 +2978,24 @@ var canvas_MCDU_base = {
degrees = int(dms);
minutes = sprintf("%.1f",abs((dms - degrees) * 60));
sign = degrees >= 0 ? "N" : "S";
me["Simple_L2"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign);
me["Simple_L2"].setText(abs(degrees) ~ "°" ~ minutes ~ " " ~ sign);
dms2 = getprop("/position/longitude-deg");
degrees2 = int(dms2);
minutes2 = sprintf("%.1f",abs((dms2 - degrees2) * 60));
sign2 = degrees2 >= 0 ? "E" : "W";
me["Simple_R2"].setText(abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2);
me["Simple_R2"].setText(abs(degrees2) ~ "°" ~ minutes2 ~ " " ~ sign2);
if (systems.ADIRS.ADIRunits[0].operative and getprop("/FMGC/internal/align1-done")) {
me["Simple_C3"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2);
me["Simple_C3"].setText(abs(degrees) ~ "°" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "°" ~ minutes2 ~ " " ~ sign2);
} else {
me["Simple_C3"].setText("-----.--/-----.--");
}
if (systems.ADIRS.ADIRunits[1].operative and getprop("/FMGC/internal/align2-done")) {
me["Simple_C4"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2);
me["Simple_C4"].setText(abs(degrees) ~ "°" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "°" ~ minutes2 ~ " " ~ sign2);
} else {
me["Simple_C4"].setText("-----.--/-----.--");
}
if (systems.ADIRS.ADIRunits[2].operative and getprop("/FMGC/internal/align3-done")) {
me["Simple_C5"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2);
me["Simple_C5"].setText(abs(degrees) ~ "°" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "°" ~ minutes2 ~ " " ~ sign2);
} else {
me["Simple_C5"].setText("-----.--/-----.--");
}
@ -4767,23 +4767,23 @@ var canvas_MCDU_base = {
me["Simple_L2S"].setText("TEMP");
if (dest_temp.getValue() != -999) {
me["Simple_L2"].setText(sprintf("%3.0fg", dest_temp.getValue()));
me["Simple_L2"].setText(sprintf("%3.0f°", dest_temp.getValue()));
} else {
me["Simple_L2"].setText("---g");
me["Simple_L2"].setText("---°");
}
me["Simple_L3S"].setText("MAG WIND");
if (fmgc.FMGCInternal.destMagSet and fmgc.FMGCInternal.destWindSet) {
me["Simple_L3"].setText(sprintf("%03.0fg", fmgc.FMGCInternal.destMag) ~ sprintf("/%.0f", fmgc.FMGCInternal.destWind));
me["Simple_L3"].setText(sprintf("%03.0f°", fmgc.FMGCInternal.destMag) ~ sprintf("/%.0f", fmgc.FMGCInternal.destWind));
me["Simple_L3"].setFontSize(normal);
} else {
me["Simple_L3"].setFontSize(small);
if (myDESWIND[i] != nil and myDESWIND[i].returnGRND() != nil) {
var result = myDESWIND[i].returnGRND();
me["Simple_L3"].setText(sprintf("%03.0fg", result[0]) ~ sprintf("/%.0f", result[1]));
me["Simple_L3"].setText(sprintf("%03.0f°", result[0]) ~ sprintf("/%.0f", result[1]));
} else if (myDESWIND[math.abs(i-1)] != nil and myDESWIND[math.abs(i-1)].returnGRND() != nil) {
var result = myDESWIND[math.abs(i-1)].returnGRND();
me["Simple_L3"].setText(sprintf("%03.0fg", result[0]) ~ sprintf("/%.0f", result[1]));
me["Simple_L3"].setText(sprintf("%03.0f°", result[0]) ~ sprintf("/%.0f", result[1]));
} else {
me["Simple_L3"].setText("---g/---");
}