From 1f44ce74c60a14cdfbd352bb5125271f8dd40ec2 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Thu, 13 Jan 2022 21:33:12 +0000 Subject: [PATCH 01/11] Only allow ovfy once --- Nasal/MCDU/MCDU.nas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 55c0df44..d28566ef 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -1528,11 +1528,18 @@ var button = func(btn, i, event = "") { if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "-") { mcdu_scratchpad.scratchpads[i].clear(); mcdu_scratchpad.scratchpads[i].addChar("+"); + } else if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "+") { + mcdu_scratchpad.scratchpads[i].clear(); + mcdu_scratchpad.scratchpads[i].addChar("-"); } else { mcdu_scratchpad.scratchpads[i].addChar("-"); } } else if (btn == "OVFY") { - mcdu_scratchpad.scratchpads[i].addChar("@"); + if (mcdu_scratchpad.scratchpads[i].scratchpad == "") { + mcdu_scratchpad.scratchpads[i].addChar("@"); + } else { + mcdu_message(i, "NOT ALLOWED"); + } } else { mcdu_scratchpad.scratchpads[i].addChar(btn); } From c5994412d5ca55ab224e8f582b3aceeefe3aa364 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Fri, 14 Jan 2022 11:41:33 +0000 Subject: [PATCH 02/11] INITA page - restore degreess symbol --- Models/Instruments/MCDU/MCDU.nas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index f87c04ac..51c61149 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -2773,13 +2773,13 @@ var canvas_MCDU_base = { } else if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.crzTempSet) { me["INITA_CruiseFLTemp"].hide(); me["Simple_L6"].setColor(BLUE); - me["Simple_L6"].setText(sprintf("%s", "FL" ~ fmgc.FMGCInternal.crzFl) ~ sprintf("/%sg", fmgc.FMGCInternal.crzTemp)); + me["Simple_L6"].setText(sprintf("%s", "FL" ~ fmgc.FMGCInternal.crzFl) ~ sprintf("/%s°", fmgc.FMGCInternal.crzTemp)); } else if (fmgc.FMGCInternal.crzSet) { me["INITA_CruiseFLTemp"].hide(); me["Simple_L6"].setColor(BLUE); fmgc.FMGCInternal.crzTemp = 15 - (2 * fmgc.FMGCInternal.crzFl / 10); fmgc.FMGCInternal.crzTempSet = 1; - me["Simple_L6"].setText(sprintf("%s", "FL" ~ fmgc.FMGCInternal.crzFl) ~ sprintf("/%sg", fmgc.FMGCInternal.crzTemp)); + me["Simple_L6"].setText(sprintf("%s", "FL" ~ fmgc.FMGCInternal.crzFl) ~ sprintf("/%s°", fmgc.FMGCInternal.crzTemp)); } else { me["INITA_CruiseFLTemp"].show(); me["Simple_L6"].setColor(AMBER); @@ -2842,7 +2842,7 @@ var canvas_MCDU_base = { me["Simple_R6S"].setText("GND TEMP"); if (fmgc.FMGCInternal.phase == 0 and !fmgc.FMGCInternal.gndTempSet) { fmgc.FMGCInternal.gndTemp = 15 - (2 * getprop("/position/gear-agl-ft") / 1000); - me["Simple_R6"].setText(sprintf("%.0fg", fmgc.FMGCInternal.gndTemp)); + me["Simple_R6"].setText(sprintf("%.0f°", fmgc.FMGCInternal.gndTemp)); me["Simple_R6"].setFontSize(small); } else { if (fmgc.FMGCInternal.gndTempSet) { @@ -2850,7 +2850,7 @@ var canvas_MCDU_base = { } else { me["Simple_R6"].setFontSize(small); } - me["Simple_R6"].setText(sprintf("%.0fg", fmgc.FMGCInternal.gndTemp)); + me["Simple_R6"].setText(sprintf("%.0f°", fmgc.FMGCInternal.gndTemp)); } me["Simple_L1S"].setText(" CO RTE"); From b4ead731275dae5e93bf56a31ec75d3ce5691686 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Fri, 14 Jan 2022 12:15:50 +0000 Subject: [PATCH 03/11] Fontmatrix and setfont not needed in mcdu anymore --- Models/Instruments/MCDU/MCDU.nas | 369 +------------------------------ Nasal/MCDU/AIRWAYS.nas | 3 - Nasal/MCDU/ARRIVAL.nas | 3 - Nasal/MCDU/ATC.nas | 1 - Nasal/MCDU/ATIS.nas | 2 - Nasal/MCDU/CLOSESTAIRPORT.nas | 2 - Nasal/MCDU/DEPARTURE.nas | 3 - Nasal/MCDU/DIRTO.nas | 6 - Nasal/MCDU/DUPLICATE.nas | 2 - Nasal/MCDU/F-PLN.nas | 1 - Nasal/MCDU/HOLD.nas | 3 - Nasal/MCDU/LATREV.nas | 6 - Nasal/MCDU/PILOTWAYPOINT.nas | 1 - Nasal/MCDU/RECEIVEDMESSAGES.nas | 5 - Nasal/MCDU/VERTREV.nas | 9 - Nasal/MCDU/WINDCLB.nas | 12 - Nasal/MCDU/WINDCRZ.nas | 22 -- Nasal/MCDU/WINDDES.nas | 14 -- Nasal/MCDU/WINDHIST.nas | 2 - 19 files changed, 1 insertion(+), 465 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 51c61149..5d15f866 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -27,7 +27,6 @@ var myDESWIND = [nil, nil]; var myHISTWIND = [nil, nil]; var myAtis = [nil, nil]; var default = "HoneywellMCDU.ttf"; -var symbol = "HoneywellMCDU.ttf"; var normal = 60; var small = 46; var page = ""; @@ -194,23 +193,14 @@ var canvas_MCDU_base = { } } - me["PERFTO_FE"].setFont(symbol); - me["PERFTO_SE"].setFont(symbol); - me["PERFTO_OE"].setFont(symbol); me["PERFTO_FE"].setColor(BLUE); me["PERFTO_SE"].setColor(BLUE); me["PERFTO_OE"].setColor(BLUE); - me["PERFAPPR_FE"].setFont(symbol); - me["PERFAPPR_SE"].setFont(symbol); - me["PERFAPPR_OE"].setFont(symbol); me["PERFAPPR_FE"].setColor(BLUE); me["PERFAPPR_SE"].setColor(BLUE); me["PERFAPPR_OE"].setColor(BLUE); - me["PERFGA_FE"].setFont(symbol); - me["PERFGA_SE"].setFont(symbol); - me["PERFGA_OE"].setFont(symbol); me["PERFGA_FE"].setColor(BLUE); me["PERFGA_SE"].setColor(BLUE); me["PERFGA_OE"].setColor(BLUE); @@ -331,16 +321,10 @@ var canvas_MCDU_base = { me["Simple_R6_Arrow"].hide(); }, standardFontSize: func() { - 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.fontSizeLeftS(small, small, small, small, small, small); me.fontSizeRight(normal, normal, normal, normal, normal, normal); me.fontSizeRightS(small, small, small, small, small, small); - me.fontCenter(default, default, default, default, default, default); - me.fontCenterS(default, default, default, default, default, default); me.fontSizeCenter(normal, normal, normal, normal, normal, normal); me.fontSizeCenterS(small, small, small, small, small, small); }, @@ -462,11 +446,6 @@ var canvas_MCDU_base = { me.hideAllArrows(); - 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(normal, normal, normal, normal, normal, normal); me.fontSizeRight(normal, normal, normal, normal, normal, normal); @@ -901,10 +880,6 @@ var canvas_MCDU_base = { 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(symbol, symbol, symbol, 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"); @@ -925,7 +900,6 @@ var canvas_MCDU_base = { } if (atsu.AOC.station != nil) { - me["Simple_R1"].setFont(default); me["Simple_R1"].setText(atsu.AOC.station); if (atsu.AOC.sent and !atsu.AOC.received) { me["WEATHERREQSEND"].hide(); @@ -940,7 +914,6 @@ var canvas_MCDU_base = { } } else { me["Simple_R5"].setText("SEND "); - me["Simple_R1"].setFont(symbol); me["Simple_R1"].setText("[ ]"); me["WEATHERREQSEND"].hide(); } @@ -987,11 +960,6 @@ var canvas_MCDU_base = { 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(normal, normal, normal, normal, normal, normal); me.fontSizeRight(normal, normal, normal, normal, normal, normal); @@ -1019,7 +987,6 @@ var canvas_MCDU_base = { me["ArrowRight"].hide(); } - me.dynamicPageFontFunc(myReceivedMessages[i]); me.dynamicPageArrowFunc(myReceivedMessages[i]); me.dynamicPageFunc(myReceivedMessages[i].L1, "Simple_L1"); @@ -1053,11 +1020,6 @@ var canvas_MCDU_base = { 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, small, small, small, small, normal); me.fontSizeCenter(normal, normal, normal, normal, normal, normal); me.fontSizeRight(normal, normal, normal, normal, normal, normal); @@ -1078,21 +1040,6 @@ var canvas_MCDU_base = { me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myReceivedMessage[i].arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myReceivedMessage[i].arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myReceivedMessage[i].arrowsColour[0][5] ~ "/b")); - forindex (var matrixFont; myReceivedMessages[i].fontMatrix) { - if (matrixFont == 0) { - var sign = "L"; - } else { - var sign = "R"; - } - forindex (var item; myReceivedMessages[i].fontMatrix[matrixFont]) { - if (myReceivedMessages[i].fontMatrix[matrixFont][item] == 1) { - me["Simple_" ~ sign ~ (item + 1)].setFont(symbol); - } else { - me["Simple_" ~ sign ~ (item + 1)].setFont(default); - } - } - } - me.dynamicPageArrowFunc(myReceivedMessage[i]); if (myReceivedMessage[i].L1[0] != nil) { @@ -1220,7 +1167,6 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); me.standardFontSize(); - me["Simple_L4"].setFont(symbol); me.colorLeft("wht", "wht", "wht", "blu", "wht", "wht"); me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht"); @@ -1334,11 +1280,6 @@ var canvas_MCDU_base = { 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, small, small, small, normal, normal); me.fontSizeCenter(normal, normal, normal, normal, normal, normal); me.fontSizeRight(normal, normal, normal, normal, normal, normal); @@ -1420,7 +1361,6 @@ var canvas_MCDU_base = { me["Simple_L1S"].setText(" ARPT/TYPE"); me["Simple_L6S"].setText(" ATC MENU"); me["Simple_L4"].setText(" [ ]/[ ]"); - me["Simple_L4"].setFont(symbol); me["Simple_L6"].setText(" RETURN"); me["Simple_C1"].setFontSize(small); @@ -1445,7 +1385,6 @@ var canvas_MCDU_base = { if (atsu.ATISInstances[0].station != nil) { me["Simple_L1"].setText(" " ~ atsu.ATISInstances[0].station ~ "/" ~ (atsu.ATISInstances[0].type == 0 ? "ARR" : "DEP")); - me["Simple_L1"].setFont(default); if (atsu.ATISInstances[0].received) { me["Simple_L1_Arrow"].show(); } else { @@ -1453,7 +1392,6 @@ var canvas_MCDU_base = { } } else { me["Simple_L1"].setText(" [ ]/[ ]"); - me["Simple_L1"].setFont(symbol); me["Simple_L1_Arrow"].hide(); } @@ -1466,7 +1404,6 @@ var canvas_MCDU_base = { if (atsu.ATISInstances[1].station != nil) { me["Simple_L2"].setText(" " ~ atsu.ATISInstances[1].station ~ "/" ~ (atsu.ATISInstances[1].type == 0 ? "ARR" : "DEP")); - me["Simple_L2"].setFont(default); me["Simple_L2_Arrow"].show(); if (atsu.ATISInstances[1].received) { me["Simple_L2_Arrow"].show(); @@ -1475,7 +1412,6 @@ var canvas_MCDU_base = { } } else { me["Simple_L2"].setText(" [ ]/[ ]"); - me["Simple_L2"].setFont(symbol); me["Simple_L2_Arrow"].hide(); } @@ -1488,7 +1424,6 @@ var canvas_MCDU_base = { if (atsu.ATISInstances[2].station != nil) { me["Simple_L3"].setText(" " ~ atsu.ATISInstances[2].station ~ "/" ~ (atsu.ATISInstances[2].type == 0 ? "ARR" : "DEP")); - me["Simple_L3"].setFont(default); if (atsu.ATISInstances[2].received) { me["Simple_L3_Arrow"].show(); } else { @@ -1496,7 +1431,6 @@ var canvas_MCDU_base = { } } else { me["Simple_L3"].setText(" [ ]/[ ]"); - me["Simple_L3"].setFont(symbol); me["Simple_L3_Arrow"].hide(); } @@ -1509,7 +1443,6 @@ var canvas_MCDU_base = { if (atsu.ATISInstances[3].station != nil) { me["Simple_L4"].setText(" " ~ atsu.ATISInstances[3].station ~ "/" ~ (atsu.ATISInstances[3].type == 0 ? "ARR" : "DEP")); - me["Simple_L4"].setFont(default); if (atsu.ATISInstances[3].received) { me["Simple_L4_Arrow"].show(); } else { @@ -1517,7 +1450,6 @@ var canvas_MCDU_base = { } } else { me["Simple_L4"].setText(" [ ]/[ ]"); - me["Simple_L4"].setFont(symbol); me["Simple_L4_Arrow"].hide(); } @@ -1573,11 +1505,6 @@ var canvas_MCDU_base = { 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); @@ -1662,11 +1589,6 @@ var canvas_MCDU_base = { 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); @@ -1735,11 +1657,6 @@ var canvas_MCDU_base = { 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.standardFontColour(); @@ -1898,11 +1815,6 @@ var canvas_MCDU_base = { 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); @@ -1943,11 +1855,6 @@ var canvas_MCDU_base = { 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); @@ -1998,11 +1905,6 @@ var canvas_MCDU_base = { 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); @@ -2094,11 +1996,6 @@ var canvas_MCDU_base = { me["Simple_C3B"].hide(); me["Simple_C4B"].hide(); - me.fontLeft(default, default, default, default, symbol, 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, small, normal); me.fontSizeRight(normal, normal, normal, small, normal, normal); @@ -2273,8 +2170,6 @@ var canvas_MCDU_base = { 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]); - me.dynamicPageFontFunc(myPilotWP[i]); - me.dynamicPageFunc(myPilotWP[i].L1, "Simple_L1"); me.dynamicPageFunc(myPilotWP[i].L2, "Simple_L2"); me.dynamicPageFunc(myPilotWP[i].L3, "Simple_L3"); @@ -2563,11 +2458,6 @@ var canvas_MCDU_base = { me["Simple_C3B"].hide(); me["Simple_C4B"].hide(); - me.fontLeft(default, default, default, default, 0, default); - me.fontLeftS(default, default, default, default, default, default); - me.fontRight(default, default, symbol, symbol, 0, default); - me.fontRightS(default, default, default, default, default, default); - me.fontSizeLeft(0, 0, 0, 0, 0, normal); me.fontSizeRight(0, 0, small, small, 0, normal); @@ -2608,7 +2498,6 @@ var canvas_MCDU_base = { me["Simple_R6"].setText("ADF2 BFO "); if (fmgc.FMGCInternal.ADF1.freqSet) { - me["Simple_L5"].setFont(default); me["Simple_L5"].setFontSize(normal); me["Simple_L5"].setText(sprintf(" %s", fmgc.FMGCInternal.ADF1.mcdu)); me["Simple_L6"].show(); @@ -2620,7 +2509,6 @@ var canvas_MCDU_base = { me["Simple_L6_Arrow"].show(); } } else { - me["Simple_L5"].setFont(symbol); me["Simple_L5"].setFontSize(small); me["Simple_L5"].setText("[ ]/[ .]"); me["Simple_L6"].hide(); @@ -2639,7 +2527,6 @@ var canvas_MCDU_base = { } if (fmgc.FMGCInternal.ADF2.freqSet) { - me["Simple_R5"].setFont(default); me["Simple_R5"].setFontSize(normal); me["Simple_R5"].setText(sprintf("%s ", fmgc.FMGCInternal.ADF2.mcdu)); me["Simple_R6"].show(); @@ -2650,8 +2537,7 @@ var canvas_MCDU_base = { } else { me["Simple_R6_Arrow"].show(); } - } else { - me["Simple_R5"].setFont(symbol); + } else { me["Simple_R5"].setFontSize(small); me["Simple_R5"].setText("[ .]/[ ]"); me["Simple_R6"].hide(); @@ -2726,11 +2612,6 @@ var canvas_MCDU_base = { 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, 0); @@ -2901,11 +2782,6 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,1, 1, 1, 1, 1, -1); - me.fontLeft(default, default, 0, 0, 0, default); - me.fontLeftS(default, default, 0, 0, 0, 0); - me.fontRight(default, default, 0, 0, 0, default); - me.fontRightS(default, default, 0, 0, 0, 0); - me.fontSizeLeft(small, small, 0, 0, 0, small); me.fontSizeRight(small, small, 0, 0, 0, normal); me.fontSizeCenter(normal, small, small, small, small, 0); @@ -3138,11 +3014,6 @@ var canvas_MCDU_base = { showRightS(me,1, 1, 1, 1, 1, 1); showRightArrow(me,-1, -1, 1, -1, -1, -1); - 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, small, small, small, small, small); me.fontSizeCenter(normal, small, small, small, small, small); me.fontSizeRight(normal, normal, normal, small, small, small); @@ -3588,11 +3459,6 @@ var canvas_MCDU_base = { showRightS(me,1, -1, 1, 1, 1, 1); showRightArrow(me,-1, -1, -1, -1, -1, -1); - 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, small, small, small, small); me.fontSizeCenter(small, small, normal, small, small, small); me.fontSizeRight(small, small, normal, small, small, small); @@ -3928,11 +3794,6 @@ var canvas_MCDU_base = { me["Simple_C3B"].hide(); me["Simple_C4B"].hide(); showCenterS(me,1, -1, -1, -1, -1, 1); - - me.fontLeft(default, default, symbol, default, default, default); - me.fontLeftS(default, default, default, default, default, default); - me.fontRight(default, symbol, symbol, symbol, default, default); - me.fontRightS(default, default, default, default, default, default); me.fontSizeLeft(normal, normal, small, small, normal, small); me.fontSizeLeftS(small, small, small, small, small, small); @@ -3956,7 +3817,6 @@ var canvas_MCDU_base = { showLeftS(me,0, 0, -1, 0, 0, 0); showCenterS(me,0, 0, 1, 0, 0, 0); #showRight(me,0, 0, 1, 0, 0, 0); #Add when implement cruise phase - me.fontLeft(0, 0, default, 0, 0, 0); } else if (page == "PROGDES" or page == "PROGAPPR") { showCenter(me,0, 1, 0, 0, 0, 0); showRight(me,0, 1, 0, 0, 0, 0); @@ -4024,11 +3884,9 @@ var canvas_MCDU_base = { } if (mcdu.bearingDistances[i].displayID != nil) { - me["Simple_R4"].setFont(default); me["Simple_R4"].setFontSize(normal); me["Simple_R4"].setText(mcdu.bearingDistances[i].displayID); } else { - me["Simple_R4"].setFont(symbol); me["Simple_R4"].setFontSize(small); me["Simple_R4"].setText("[ ]"); } @@ -4095,11 +3953,6 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,1, 1, 1, -1, -1, -1); - me.fontLeft(default, default, default, default, default, default); - me.fontLeftS(default, default, default, default, default, default); - me.fontRight(default, symbol, 0, 0, default, default); - me.fontRightS(default, default, default, default, default, default); - me.fontSizeLeft(normal, normal, normal, normal, 0, normal); me.fontSizeRight(normal, small, 0, 0, 0, normal); me.fontSizeCenter(small, small, small, 0, 0, 0); @@ -4206,7 +4059,6 @@ var canvas_MCDU_base = { } if (flapTHSSet.getValue() == 1) { - me["Simple_R3"].setFont(default); me["Simple_R3"].setFontSize(normal); if (THSTO.getValue() >= 0) { me["Simple_R3"].setText(sprintf("%s", flapTO.getValue()) ~ sprintf("/UP%2.1f", THSTO.getValue())); @@ -4214,16 +4066,13 @@ var canvas_MCDU_base = { me["Simple_R3"].setText(sprintf("%s", flapTO.getValue()) ~ sprintf("/DN%2.1f", -1 * THSTO.getValue())); } } else { - me["Simple_R3"].setFont(symbol); me["Simple_R3"].setFontSize(small); me["Simple_R3"].setText("[ ]/[ ]"); } if (flexSet.getValue() == 1) { - me["Simple_R4"].setFont(default); me["Simple_R4"].setFontSize(normal); me["Simple_R4"].setText(sprintf("%3.0f", flex.getValue())); } else { - me["Simple_R4"].setFont(symbol); me["Simple_R4"].setFontSize(small); me["Simple_R4"].setText("[ ]"); } @@ -4269,11 +4118,6 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,-1, -1, 1, -1, 1, -1); - me.fontLeft(default, default, default, symbol, 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, small, small, normal, normal); me.fontSizeLeftS(0, 0, 0, 0, small, 0); me.fontSizeRight(normal, normal, normal, normal, normal, normal); @@ -4355,7 +4199,6 @@ var canvas_MCDU_base = { if (managedSpeed.getValue() == 1) { me["Simple_L1"].setText("MANAGED"); me["Simple_L4"].setText(" [ ]"); - me.fontLeft(0, 0, 0, symbol, 0, 0); } else { me["Simple_L1"].setText("SELECTED"); if (fmgc.Input.ktsMach.getValue()) { @@ -4363,7 +4206,6 @@ var canvas_MCDU_base = { } else { me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/kts")))); } - me.fontLeft(0, 0, 0, default, 0, 0); } me["Simple_L2S"].setText(" CI"); @@ -4424,11 +4266,6 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,1, -1, -1, -1, -1, -1); - me.fontLeft(default, default, default, symbol, 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, small, small, normal, normal); me.fontSizeRight(normal, normal, normal, normal, small, normal); me.fontSizeCenterS(small, small, small, small, small, small); @@ -4497,7 +4334,6 @@ var canvas_MCDU_base = { if (managedSpeed.getValue() == 1) { me["Simple_L1"].setText("MANAGED"); me["Simple_L4"].setText(" [ ]"); - me.fontLeft(0, 0, 0, symbol, 0, 0); } else { me["Simple_L1"].setText("SELECTED"); if (fmgc.Input.ktsMach.getValue()) { @@ -4505,7 +4341,6 @@ var canvas_MCDU_base = { } else { me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/kts")))); } - me.fontLeft(0, 0, 0, default, 0, 0); } if (fmgc.FMGCInternal.costIndexSet) { @@ -4561,11 +4396,6 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,1, -1, 1, -1, -1, -1); - me.fontLeft(default, default, default, symbol, 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, small, small, small, normal); me.fontSizeLeftS(0, 0, 0, 0, small, 0); me.fontSizeRight(normal, normal, normal, normal, normal, normal); @@ -4645,7 +4475,6 @@ var canvas_MCDU_base = { if (managedSpeed.getValue() == 1) { me["Simple_L1"].setText("MANAGED"); me["Simple_L4"].setText(" [ ]"); - me.fontLeft(0, 0, 0, symbol, 0, 0); } else { me["Simple_L1"].setText("SELECTED"); if (fmgc.Input.ktsMach.getValue()) { @@ -4653,7 +4482,6 @@ var canvas_MCDU_base = { } else { me["Simple_L4"].setText(sprintf(" %3.0f", getprop("/it-autoflight/input/kts"))); } - me.fontLeft(0, 0, 0, default, 0, 0); } if (fmgc.FMGCInternal.costIndexSet) { @@ -4720,11 +4548,6 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,1, 1, 1, -1, 1, -1); - me.fontLeft(symbol, default, default, default, symbol, default); - me.fontLeftS(default, default, default, default, default, default); - me.fontRight(default, symbol, symbol, default, default, default); - me.fontRightS(default, default, default, default, default, default); - me.fontSizeLeft(small, small, small, small, small, normal); me.fontSizeRight(normal, small, small, small, normal, normal); me.fontSizeCenter(small, small, small, 0, small, 0); @@ -4755,10 +4578,8 @@ var canvas_MCDU_base = { } else { me["Simple_L1"].setText(sprintf("%4.0f", dest_qnh.getValue())); } - me.fontLeft(default, 0, 0, 0, 0, 0); } else { me["Simple_L1"].setText("[ ] "); - me.fontLeft(symbol, 0, 0, 0, 0, 0); } me["Simple_L2S"].setText("TEMP"); @@ -4806,26 +4627,21 @@ var canvas_MCDU_base = { me["Simple_R2S"].setText("BARO"); if (getprop("/FMGC/internal/baro") != 99999) { me["Simple_R2"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro"))); - me.fontRight(0, default, 0, 0, 0, 0); me.fontSizeRight(0, normal, 0, 0, 0, 0); } else { me["Simple_R2"].setText(" [ ]"); - me.fontRight(0, symbol, 0, 0, 0, 0); me.fontSizeRight(0, small, 0, 0, 0, 0); } me["Simple_R3S"].setText("RADIO"); if (getprop("/FMGC/internal/radio") != 99999) { me["Simple_R3"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio"))); - me.fontRight(0, 0, default, 0, 0, 0); me.fontSizeRight(0, 0, normal, 0, 0, 0); } else if (fmgc.FMGCInternal.radioNo) { me["Simple_R3"].setText("NO"); - me.fontRight(0, 0, default, 0, 0, 0); me.fontSizeRight(0, 0, normal, 0, 0, 0); } else { me["Simple_R3"].setText(" [ ]"); - me.fontRight(0, 0, symbol, 0, 0, 0); me.fontSizeRight(0, 0, small, 0, 0, 0); } @@ -4855,7 +4671,6 @@ var canvas_MCDU_base = { me["Simple_C3"].setText(sprintf("%3.0f", fmgc.FMGCInternal.clean_appr)); me["Simple_C5"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vls_appr)); me["Simple_L5"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vapp_appr)); - me.fontLeft(0, 0, 0, 0, default, 0); if (fmgc.FMGCInternal.vappSpeedSet) { me.fontSizeLeft(0, 0, 0, 0, normal, 0); } else { @@ -4868,11 +4683,9 @@ var canvas_MCDU_base = { me["Simple_C5"].setText(" ---"); if (fmgc.FMGCInternal.vappSpeedSet) { me["Simple_L5"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vapp_appr)); - me.fontLeft(0, 0, 0, 0, default, 0); me.fontSizeLeft(0, 0, 0, 0, normal, 0); } else { me["Simple_L5"].setText("[ ] "); - me.fontLeft(0, 0, 0, 0, symbol, 0); me.fontSizeLeft(0, 0, 0, 0, small, 0); } } @@ -4904,11 +4717,6 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,1, 1, 1, -1, -1, -1); - me.fontLeft(default, default, default, default, default, default); - me.fontLeftS(default, default, default, default, default, default); - me.fontRight(default, symbol, 0, 0, default, default); - me.fontRightS(default, default, default, default, default, default); - me.fontSizeLeft(normal, normal, normal, normal, 0, normal); me.fontSizeRight(normal, small, 0, 0, 0, normal); me.fontSizeCenter(small, small, small, 0, 0, 0); @@ -4976,11 +4784,6 @@ var canvas_MCDU_base = { 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.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht"); @@ -5051,8 +4854,6 @@ var canvas_MCDU_base = { 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]); - me.dynamicPageFontFunc(myWind[i]); - me.dynamicPageFunc(myWind[i].L1, "Simple_L1"); me.dynamicPageFunc(myWind[i].L2, "Simple_L2"); me.dynamicPageFunc(myWind[i].L3, "Simple_L3"); @@ -5131,8 +4932,6 @@ var canvas_MCDU_base = { 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]); - me.dynamicPageFontFunc(myLatRev[i]); - me.dynamicPageFunc(myLatRev[i].L1, "Simple_L1"); me.dynamicPageFunc(myLatRev[i].L2, "Simple_L2"); me.dynamicPageFunc(myLatRev[i].L3, "Simple_L3"); @@ -5201,9 +5000,6 @@ var canvas_MCDU_base = { 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]); me.colorRightArrow(myVertRev[i].arrowsColour[1][0],myVertRev[i].arrowsColour[1][1],myVertRev[i].arrowsColour[1][2],myVertRev[i].arrowsColour[1][3],myVertRev[i].arrowsColour[1][4],myVertRev[i].arrowsColour[1][5]); - - me.dynamicPageFontFunc(myVertRev[i]); - me.dynamicPageFunc(myVertRev[i].L1, "Simple_L1"); me.dynamicPageFunc(myVertRev[i].L2, "Simple_L2"); me.dynamicPageFunc(myVertRev[i].L3, "Simple_L3"); @@ -5255,7 +5051,6 @@ var canvas_MCDU_base = { me["Simple_Title"].setText(sprintf("%s", myDeparture[i].title[0] ~ myDeparture[i].title[1] ~ myDeparture[i].title[2])); me.dynamicPageArrowFuncDepArr(myDeparture[i]); - me.dynamicPageFontFunc(myDeparture[i]); me.dynamicPageFunc(myDeparture[i].L1, "Simple_L1"); me.dynamicPageFunc(myDeparture[i].L2, "Simple_L2"); @@ -5316,8 +5111,6 @@ var canvas_MCDU_base = { 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]); - me.dynamicPageFontFunc(myDuplicate[i]); - me.dynamicPageFunc(myDuplicate[i].L1, "Simple_L1"); me.dynamicPageFunc(myDuplicate[i].L2, "Simple_L2"); me.dynamicPageFunc(myDuplicate[i].L3, "Simple_L3"); @@ -5381,7 +5174,6 @@ var canvas_MCDU_base = { me["Simple_Title"].setText(sprintf("%s", myArrival[i].title[0] ~ myArrival[i].title[1] ~ myArrival[i].title[2])); me.dynamicPageArrowFuncDepArr(myArrival[i]); - me.dynamicPageFontFunc(myArrival[i]); me.dynamicPageFunc(myArrival[i].L1, "Simple_L1"); me.dynamicPageFunc(myArrival[i].L2, "Simple_L2"); @@ -5429,11 +5221,6 @@ var canvas_MCDU_base = { 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(normal, normal, normal, small, normal, normal); # if updating watch out - this is needed me.fontSizeRight(normal, normal, normal, normal, normal, normal); @@ -5447,7 +5234,6 @@ var canvas_MCDU_base = { 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")); me.dynamicPageArrowFuncDepArr(myHold[i]); - me.dynamicPageFontFunc(myHold[i]); me.dynamicPageFunc(myHold[i].L1, "Simple_L1"); me.dynamicPageFunc(myHold[i].L2, "Simple_L2"); @@ -5495,11 +5281,6 @@ var canvas_MCDU_base = { 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(normal, normal, normal, small, normal, normal); # if updating watch out - this is needed me.fontSizeRight(normal, normal, normal, normal, normal, normal); @@ -5513,7 +5294,6 @@ var canvas_MCDU_base = { 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")); me.dynamicPageArrowFuncDepArr(myAirways[i]); - me.dynamicPageFontFunc(myAirways[i]); me.dynamicPageFunc(myAirways[i].L1, "Simple_L1"); me.dynamicPageFunc(myAirways[i].L2, "Simple_L2"); @@ -5572,11 +5352,6 @@ var canvas_MCDU_base = { 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(normal, normal, normal, normal, normal, normal); me.fontSizeRight(normal, normal, normal, normal, normal, normal); @@ -5591,8 +5366,6 @@ var canvas_MCDU_base = { 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")); - me.dynamicPageFontFunc(myClosestAirport[i]); - me.dynamicPageFunc(myClosestAirport[i].L1, "Simple_L1"); me.dynamicPageFunc(myClosestAirport[i].L2, "Simple_L2"); me.dynamicPageFunc(myClosestAirport[i].L3, "Simple_L3"); @@ -5663,7 +5436,6 @@ var canvas_MCDU_base = { 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")); me.dynamicPageArrowFuncDepArr(myDirTo[i]); - me.dynamicPageFontFunc(myDirTo[i]); if (fmgc.flightPlanController.temporaryFlag[i] and mcdu.dirToFlag) { me["DIRTO_TMPY_group"].show(); @@ -5874,127 +5646,6 @@ var canvas_MCDU_base = { me["Simple_C6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b")); } }, - # 0 = ignore - fontLeft: func (a, b, c, d, e, f) { - if (a != 0) { - me["Simple_L1"].setFont(a); - } - if (b != 0) { - me["Simple_L2"].setFont(b); - } - if (c != 0) { - me["Simple_L3"].setFont(c); - } - if (d != 0) { - me["Simple_L4"].setFont(d); - } - if (e != 0) { - me["Simple_L5"].setFont(e); - } - if (f != 0) { - me["Simple_L6"].setFont(f); - } - }, - fontLeftS: func (a, b, c, d, e, f) { - if (a != 0) { - me["Simple_L1S"].setFont(a); - } - if (b != 0) { - me["Simple_L2S"].setFont(b); - } - if (c != 0) { - me["Simple_L3S"].setFont(c); - } - if (d != 0) { - me["Simple_L4S"].setFont(d); - } - if (e != 0) { - me["Simple_L5S"].setFont(e); - } - if (f != 0) { - me["Simple_L6S"].setFont(f); - } - }, - fontCenter: func (a, b, c, d, e, f) { - if (a != 0) { - me["Simple_C1"].setFont(a); - } - if (b != 0) { - me["Simple_C2"].setFont(b); - } - if (c != 0) { - me["Simple_C3"].setFont(c); - } - if (d != 0) { - me["Simple_C4"].setFont(d); - } - if (e != 0) { - me["Simple_C5"].setFont(e); - } - if (f != 0) { - me["Simple_C6"].setFont(f); - } - }, - fontCenterS: func (a, b, c, d, e, f) { - if (a != 0) { - me["Simple_C1S"].setFont(a); - } - if (b != 0) { - me["Simple_C2S"].setFont(b); - } - if (c != 0) { - me["Simple_C3S"].setFont(c); - } - if (d != 0) { - me["Simple_C4S"].setFont(d); - } - if (e != 0) { - me["Simple_C5S"].setFont(e); - } - if (f != 0) { - me["Simple_C6S"].setFont(f); - } - }, - fontRight: func (a, b, c, d, e, f) { - if (a != 0) { - me["Simple_R1"].setFont(a); - } - if (b != 0) { - me["Simple_R2"].setFont(b); - } - if (c != 0) { - me["Simple_R3"].setFont(c); - } - if (d != 0) { - me["Simple_R4"].setFont(d); - } - if (e != 0) { - me["Simple_R5"].setFont(e); - } - if (f != 0) { - me["Simple_R6"].setFont(f); - } - }, - fontRightS: func (a, b, c, d, e, f) { - if (a != 0) { - me["Simple_R1S"].setFont(a); - } - if (b != 0) { - me["Simple_R2S"].setFont(b); - } - if (c != 0) { - me["Simple_R3S"].setFont(c); - } - if (d != 0) { - me["Simple_R4S"].setFont(d); - } - if (e != 0) { - me["Simple_R5S"].setFont(e); - } - if (f != 0) { - me["Simple_R6S"].setFont(f); - } - }, fontSizeLeft: func (a, b, c, d, e, f) { if (a != 0) { me["Simple_L1"].setFontSize(a); @@ -6164,24 +5815,6 @@ var canvas_MCDU_base = { } } }, - 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)); diff --git a/Nasal/MCDU/AIRWAYS.nas b/Nasal/MCDU/AIRWAYS.nas index 273c8486..d14be37a 100644 --- a/Nasal/MCDU/AIRWAYS.nas +++ b/Nasal/MCDU/AIRWAYS.nas @@ -1,7 +1,6 @@ var airwaysPage = { title: [nil, nil, nil], 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 @@ -45,7 +44,6 @@ var airwaysPage = { me.R1 = [nil, "TO ", "blu"]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; - me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]]; canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); }, makeTmpy: func() { @@ -67,7 +65,6 @@ var airwaysPage = { } }, updateAirways: func(index, airwayName) { - me.fontMatrix[0][index - 1] = 0; if (index == 1) { me.L1[0] = airwayName; } elsif (index == 2) { diff --git a/Nasal/MCDU/ARRIVAL.nas b/Nasal/MCDU/ARRIVAL.nas index 34851938..69c936fd 100644 --- a/Nasal/MCDU/ARRIVAL.nas +++ b/Nasal/MCDU/ARRIVAL.nas @@ -5,7 +5,6 @@ var isNoVia = [0, 0, 0]; var arrivalPage = { title: [nil, nil, nil], 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 @@ -132,7 +131,6 @@ var arrivalPage = { _setupPageWithData: func() { me.title = ["ARRIVAL", " TO ", left(me.id, 4)]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; @@ -178,7 +176,6 @@ var arrivalPage = { me.R4 = [nil, nil, "ack"]; me.R5 = [nil, nil, "ack"]; me.R6 = [nil, nil, "ack"]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "ack"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; }, diff --git a/Nasal/MCDU/ATC.nas b/Nasal/MCDU/ATC.nas index c4f45c71..a4b252d9 100644 --- a/Nasal/MCDU/ATC.nas +++ b/Nasal/MCDU/ATC.nas @@ -2,7 +2,6 @@ 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 diff --git a/Nasal/MCDU/ATIS.nas b/Nasal/MCDU/ATIS.nas index 06672670..ef7d1e4f 100644 --- a/Nasal/MCDU/ATIS.nas +++ b/Nasal/MCDU/ATIS.nas @@ -1,6 +1,5 @@ var atisPage = { title: 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 @@ -77,7 +76,6 @@ var atisPage = { me.R6 = ["PRINT ", nil, "blu"]; me.arrowsMatrix = [[0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "wht", "wht"], ["ack", "ack", "ack", "ack", "ack", "blu"]]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); }, update: func() { diff --git a/Nasal/MCDU/CLOSESTAIRPORT.nas b/Nasal/MCDU/CLOSESTAIRPORT.nas index 033ae1e6..9fedc938 100644 --- a/Nasal/MCDU/CLOSESTAIRPORT.nas +++ b/Nasal/MCDU/CLOSESTAIRPORT.nas @@ -1,6 +1,5 @@ var closestAirportPage = { title: 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 @@ -45,7 +44,6 @@ var closestAirportPage = { me.R6 = ["EFOB/WIND ", nil, "wht"]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "blu"], ["ack", "ack", "ack", "ack", "ack", "wht"]]; - me.fontMatrix = [[0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0]]; canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); me.update(); me.updateBrgDist(); diff --git a/Nasal/MCDU/DEPARTURE.nas b/Nasal/MCDU/DEPARTURE.nas index a4a1b0b8..ee3ab6b7 100644 --- a/Nasal/MCDU/DEPARTURE.nas +++ b/Nasal/MCDU/DEPARTURE.nas @@ -4,7 +4,6 @@ var isNoTransDep = [0, 0, 0]; var departurePage = { title: [nil, nil, nil], 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 @@ -106,7 +105,6 @@ var departurePage = { _setupPageWithData: func() { me.title = ["DEPARTURE", " FROM ", left(me.id, 4)]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; @@ -147,7 +145,6 @@ var departurePage = { me.R4 = [nil, nil, "ack"]; me.R5 = [nil, nil, "ack"]; me.R6 = [nil, nil, "ack"]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "ack"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; }, diff --git a/Nasal/MCDU/DIRTO.nas b/Nasal/MCDU/DIRTO.nas index 81480ff2..b4c89c49 100644 --- a/Nasal/MCDU/DIRTO.nas +++ b/Nasal/MCDU/DIRTO.nas @@ -3,7 +3,6 @@ var dirToFlag = 0; var dirTo = { title: [nil], 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 @@ -46,7 +45,6 @@ var dirTo = { me.R5 = ["[ ] ", "RADIAL OUT ", "blu"]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "blu", "blu", "blu", "blu", "ack"], ["ack", "blu", "blu", "ack", "ack", "ack"]]; - me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]]; me.updateFromFpln(); me.updateTmpy(); canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); @@ -148,7 +146,6 @@ var dirTo = { fieldL1: func(text, override = 0, overrideIndex = -1) { me.makeTmpy(); me.L1[0] = text; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]]; if (size(text) == 16) { # lat lon var lat = split("/", text)[0]; @@ -237,7 +234,6 @@ var dirTo = { leftFieldBtn: func(index) { me.makeTmpy(); me.L1[0] = me.vector[index - 2].wp_name; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]]; fmgc.flightPlanController.directTo(me.vector[index - 2], me.computer); me.arrowsMatrix[0][1] = 0; # FIGURE OUT HOW TO MAKE IT SO IT DOESN'T DELETE THE WAYPOINTS ON DIR TO BUT DOES IN FLIGHTPLAN @@ -254,7 +250,6 @@ var dirTo = { dirToFlag = 0; fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0); me.L1 = [" [ ]", " WAYPOINT", "blu"]; - me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]]; me.R1 = ["---- --- ", "UTC DIST ", "wht"]; } else { mcdu_message(me.computer, "NOT ALLOWED"); @@ -265,7 +260,6 @@ var dirTo = { dirToFlag = 0; fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1); me.L1 = [" [ ]", " WAYPOINT", "blu"]; - me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]]; me.R1 = ["---- --- ", "UTC DIST ", "wht"]; setprop("MCDU[" ~ me.computer ~ "]/page", "F-PLNA"); # todo - remember horizontal srcoll of f-plna? } else { diff --git a/Nasal/MCDU/DUPLICATE.nas b/Nasal/MCDU/DUPLICATE.nas index c5496993..84e70b61 100644 --- a/Nasal/MCDU/DUPLICATE.nas +++ b/Nasal/MCDU/DUPLICATE.nas @@ -1,7 +1,6 @@ var duplicateNamesPage = { title: nil, 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 @@ -49,7 +48,6 @@ var duplicateNamesPage = { me.title = "DUPLICATE NAMES"; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; me.distances = []; for (var i = 0; i < size(me.vector); i += 1) { diff --git a/Nasal/MCDU/F-PLN.nas b/Nasal/MCDU/F-PLN.nas index c2f22fcc..bf17d749 100644 --- a/Nasal/MCDU/F-PLN.nas +++ b/Nasal/MCDU/F-PLN.nas @@ -291,7 +291,6 @@ var staticText = { }; var fplnPage = { # this one is only created once, and then updated - remember this - fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]], L1: [nil, nil, "ack"], # content, title, colour L2: [nil, nil, "ack"], L3: [nil, nil, "ack"], diff --git a/Nasal/MCDU/HOLD.nas b/Nasal/MCDU/HOLD.nas index 4b0399da..9333ed54 100644 --- a/Nasal/MCDU/HOLD.nas +++ b/Nasal/MCDU/HOLD.nas @@ -1,7 +1,6 @@ var holdPage = { title: [nil, nil, nil], 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 @@ -42,11 +41,9 @@ var holdPage = { me.titleColour = "wht"; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["wht", "wht", "ack", "ack", "ack", "ack"]]; - me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; if (me.waypoint.fly_type == "Hold") { me.makeTmpy(); me.L1 = [" " ~ sprintf("%03.0f", me.waypoint.hold_inbound_radial), "INB CRS", "blu"]; - me.fontMatrix[0][0] = 0; if (me.waypoint.hold_is_left_handed) { me.L2 = [" L", " TURN", "blu"]; diff --git a/Nasal/MCDU/LATREV.nas b/Nasal/MCDU/LATREV.nas index 0e0491bd..e8e58f28 100644 --- a/Nasal/MCDU/LATREV.nas +++ b/Nasal/MCDU/LATREV.nas @@ -2,7 +2,6 @@ var latRev = { 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 @@ -55,7 +54,6 @@ var latRev = { me.R2 = ["[ ]°/[ ]°/[ ]", "LL XING/INCR/NO", "blu"]; me.arrowsMatrix = [[0, 1, 1, 0, 0, 1], [1, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "wht", "wht", "ack", "ack", "wht"], ["wht", "ack", "ack", "ack", "ack", "ack"]]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0]]; } elsif (me.type == 4) { me.title = ["LAT REV", " FROM ", "DISCON"]; me.R3 = ["[ ]", "NEXT WPT ", "blu"]; @@ -63,7 +61,6 @@ var latRev = { me.L6 = [" RETURN", nil, "wht"]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0]]; } else { if (me.type == 0) { me.title = ["LAT REV", " FROM ", left(me.wpt.wp_name, 4)]; @@ -82,7 +79,6 @@ var latRev = { me.R4 = ["[ ]", "NEW DEST", "blu"]; me.arrowsMatrix = [[1, 1, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0]]; me.arrowsColour = [["wht", "wht", "ack", "ack", "ack", "wht"], ["wht", "ack", "ack", "ack", "ack", "ack"]]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0]]; } elsif (me.type == 1) { me.title = ["LAT REV", " FROM ", left(me.wpt.wp_name, 4)]; me.arrowsMatrix = [[0, 0, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0]]; @@ -103,7 +99,6 @@ var latRev = { me.L6 = [" RETURN", nil, "wht"]; me.R1 = ["ARRIVAL ", nil, "wht"]; me.R3 = ["[ ]", "NEXT WPT ", "blu"]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0]]; } elsif (me.type == 3) { me.title = ["LAT REV", " FROM ", me.wpt.wp_name]; me.arrowsMatrix = [[0, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0]]; @@ -124,7 +119,6 @@ var latRev = { me.R3 = ["[ ]", "NEXT WPT ", "blu"]; me.R4 = ["[ ]", "NEW DEST", "blu"]; me.R5 = ["AIRWAYS ", nil, "wht"]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0]]; } } }, diff --git a/Nasal/MCDU/PILOTWAYPOINT.nas b/Nasal/MCDU/PILOTWAYPOINT.nas index b238183b..ffc67c56 100644 --- a/Nasal/MCDU/PILOTWAYPOINT.nas +++ b/Nasal/MCDU/PILOTWAYPOINT.nas @@ -1,6 +1,5 @@ var pilotWaypointPage = { title: 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 diff --git a/Nasal/MCDU/RECEIVEDMESSAGES.nas b/Nasal/MCDU/RECEIVEDMESSAGES.nas index 13018346..f2c683ba 100644 --- a/Nasal/MCDU/RECEIVEDMESSAGES.nas +++ b/Nasal/MCDU/RECEIVEDMESSAGES.nas @@ -1,6 +1,5 @@ var receivedMessagesPage = { title: 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 @@ -63,7 +62,6 @@ var receivedMessagesPage = { me.L6 = [" RETURN", nil, "wht"]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["blu", "blu", "blu", "blu", "blu", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); }, update: func() { @@ -155,8 +153,6 @@ var receivedMessagesPage = { var receivedMessagePage = { title: 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"], @@ -229,7 +225,6 @@ var receivedMessagePage = { me.L6 = [" RETURN", nil, "wht"]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["blu", "blu", "blu", "blu", "blu", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); }, update: func() { diff --git a/Nasal/MCDU/VERTREV.nas b/Nasal/MCDU/VERTREV.nas index 6cd6df08..5f947901 100644 --- a/Nasal/MCDU/VERTREV.nas +++ b/Nasal/MCDU/VERTREV.nas @@ -4,7 +4,6 @@ var scratchpadSplit = nil; var vertRev = { title: [nil, nil, nil], 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 @@ -85,20 +84,16 @@ var vertRev = { me.R2 = ["RTA ", nil, "wht"]; me.arrowsMatrix = [[0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "wht", "wht", "wht"], ["ack", "wht", "ack", "ack", "wht", "wht"]]; - me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; } elsif (me.type == 2) { me.title = ["VERT REV", " AT ", me.id]; - me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0]]; me.L1 = ["", " EFOB ---.-", "wht"]; me.R1 = ["", "EXTRA ---.- ", "wht"]; me.L2 = [fmgc.FMGCInternal.clbSpdLim ~ "/" ~ fmgc.FMGCInternal.clbSpdLimAlt, " CLB SPD LIM", "mag"]; me.speed = me.getSpd(); if (me.speed[0] == nil) { me.L3 = [" [ ]", " SPD CSTR", "blu"]; - me.fontMatrix[0][2] = 1; } else { me.L3 = [me.speed[0], " SPD CSTR", me.speed[1]]; - me.fontMatrix[0][2] = 0; } me.L4 = [" CONSTANT MACH", nil, "wht"]; me.L5 = [" WIND DATA", nil, "wht"]; @@ -107,10 +102,8 @@ var vertRev = { me.alt = me.getAlt(); if (me.alt[0] == nil) { me.R3 = ["[ ] ", "ALT CSTR ", "blu"]; - me.fontMatrix[1][2] = 1; } else { me.R3 = [me.alt[0], "ALT CSTR ", me.alt[1]]; - me.fontMatrix[1][2] = 0; } me.R6 = ["DES ", nil, "amb"]; # When the system does vertical planning, L6 should be RETURN and R6 not used if the MCDU knows the waypoint is during climb or descent. @@ -138,7 +131,6 @@ var vertRev = { me.R2 = ["RTA ", nil, "wht"]; me.arrowsMatrix = [[0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "wht", "wht", "wht"], ["ack", "wht", "ack", "ack", "wht", "wht"]]; - me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; } elsif (me.type == 1) { if (size(me.id) > 4) { me.arrAirport = findAirportsByICAO(left(me.id, 4)); @@ -155,7 +147,6 @@ var vertRev = { me.R3 = ["3000", "G/S INTCP", "grn"]; me.arrowsMatrix = [[0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "wht", "wht", "wht"], ["ack", "wht", "ack", "ack", "wht", "wht"]]; - me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; } } me.updateR5(); diff --git a/Nasal/MCDU/WINDCLB.nas b/Nasal/MCDU/WINDCLB.nas index 88923868..64016d1f 100644 --- a/Nasal/MCDU/WINDCLB.nas +++ b/Nasal/MCDU/WINDCLB.nas @@ -5,7 +5,6 @@ var windCLBPage = { title: nil, titleColour: "wht", - 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 @@ -46,7 +45,6 @@ var windCLBPage = { me.titleColour = "wht"; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 1, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "ack"], ["wht", "ack", "ack", "ack", "wht", "ack"]]; - me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]]; var computer_temp = 2; if (fmgc.flightPlanController.temporaryFlag[me.computer]) { @@ -69,10 +67,8 @@ var windCLBPage = { var windStore = fmgc.windController.clb_winds[computer_temp].wind5; if (windStore.set) { me.L5 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][4] = 1; } else { me.L5 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][4] = 1; } } else { me.L5 = [nil, nil, "ack"]; @@ -82,10 +78,8 @@ var windCLBPage = { var windStore = fmgc.windController.clb_winds[computer_temp].wind4; if (windStore.set) { me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][3] = 1; } else { me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][3] = 1; } } else { me.L4 = [nil, nil, "ack"]; @@ -95,10 +89,8 @@ var windCLBPage = { var windStore = fmgc.windController.clb_winds[computer_temp].wind3; if (windStore.set) { me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][2] = 1; } else { me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][2] = 1; } } else { me.L3 = [nil, nil, "ack"]; @@ -108,10 +100,8 @@ var windCLBPage = { var windStore = fmgc.windController.clb_winds[computer_temp].wind2; if (windStore.set) { me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][1] = 1; } else { me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][1] = 1; } } else { me.L2 = [nil, nil, "ack"]; @@ -121,10 +111,8 @@ var windCLBPage = { var windStore = fmgc.windController.clb_winds[computer_temp].wind1; if (windStore.set) { me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"]; - me.fontMatrix[0][0] = 1; } else { me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"]; - me.fontMatrix[0][0] = 1; } } diff --git a/Nasal/MCDU/WINDCRZ.nas b/Nasal/MCDU/WINDCRZ.nas index 3ff01aba..2effb5da 100644 --- a/Nasal/MCDU/WINDCRZ.nas +++ b/Nasal/MCDU/WINDCRZ.nas @@ -5,7 +5,6 @@ var windCRZPage = { title: [nil, nil, nil], titleColour: "wht", - 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 @@ -60,7 +59,6 @@ var windCRZPage = { me.titleColour = "wht"; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 1, 1, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "wht", "wht", "ack"]]; - me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]]; var computer_temp = 2; if (fmgc.flightPlanController.temporaryFlag[me.computer]) { @@ -96,10 +94,8 @@ var windCRZPage = { var windStore = fmgc.windController.crz_winds[computer_temp].wind4; if (windStore.set) { me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][3] = 1; } else { me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][3] = 1; } } else { me.L4 = [nil, nil, "ack"]; @@ -109,10 +105,8 @@ var windCRZPage = { var windStore = fmgc.windController.crz_winds[computer_temp].wind3; if (windStore.set) { me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][2] = 1; } else { me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][2] = 1; } } else { me.L3 = [nil, nil, "ack"]; @@ -122,10 +116,8 @@ var windCRZPage = { var windStore = fmgc.windController.crz_winds[computer_temp].wind2; if (windStore.set) { me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][1] = 1; } else { me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][1] = 1; } } else { me.L2 = [nil, nil, "ack"]; @@ -135,30 +127,24 @@ var windCRZPage = { var windStore = fmgc.windController.crz_winds[computer_temp].wind1; if (windStore.set) { me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"]; - me.fontMatrix[0][0] = 1; } else { me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"]; - me.fontMatrix[0][0] = 1; } } var windStore = fmgc.windController.crz_winds[computer_temp].sat1; if (windStore.set) { me.L5 = [windStore.temp ~ "/" ~ windStore.altitude, "SAT / ALT", "blu"]; - me.fontMatrix[0][4] = 1; } else { me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"]; - me.fontMatrix[0][4] = 1; } } else { if (me.items >= 4) { var windStore = fmgc.windController.winds[computer_temp][me.match_location].wind4; if (windStore.set) { me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][3] = 1; } else { me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][3] = 1; } } else { me.L4 = [nil, nil, "ack"]; @@ -168,10 +154,8 @@ var windCRZPage = { var windStore = fmgc.windController.winds[computer_temp][me.match_location].wind3; if (windStore.set) { me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][2] = 1; } else { me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][2] = 1; } } else { me.L3 = [nil, nil, "ack"]; @@ -181,10 +165,8 @@ var windCRZPage = { var windStore = fmgc.windController.winds[computer_temp][me.match_location].wind2; if (windStore.set) { me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][1] = 1; } else { me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][1] = 1; } } else { me.L2 = [nil, nil, "ack"]; @@ -194,20 +176,16 @@ var windCRZPage = { var windStore = fmgc.windController.winds[computer_temp][me.match_location].wind1; if (windStore.set) { me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"]; - me.fontMatrix[0][0] = 1; } else { me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"]; - me.fontMatrix[0][0] = 1; } } var windStore = fmgc.windController.winds[computer_temp][me.match_location].sat1; if (windStore.set) { me.L5 = [windStore.temp ~ "/" ~ windStore.altitude, "SAT / ALT", "blu"]; - me.fontMatrix[0][4] = 1; } else { me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"]; - me.fontMatrix[0][4] = 1; } } diff --git a/Nasal/MCDU/WINDDES.nas b/Nasal/MCDU/WINDDES.nas index ad7ced64..dac9a472 100644 --- a/Nasal/MCDU/WINDDES.nas +++ b/Nasal/MCDU/WINDDES.nas @@ -8,7 +8,6 @@ var magVar = nil; var windDESPage = { title: nil, titleColour: "wht", - 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 @@ -50,7 +49,6 @@ var windDESPage = { me.titleColour = "wht"; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 1, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "wht", "ack", "ack"]]; - me.fontMatrix = [[1, 1, 1, 1, 1, 0], [1, 0, 0, 0, 0, 0]]; var computer_temp = 2; if (fmgc.flightPlanController.temporaryFlag[me.computer]) { @@ -73,10 +71,8 @@ var windDESPage = { var windStore = fmgc.windController.des_winds[computer_temp].wind5; if (windStore.set) { me.L5 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][4] = 1; } else { me.L5 = ["[ ]/°[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][4] = 1; } } else { me.L5 = [nil, nil, "ack"]; @@ -86,10 +82,8 @@ var windDESPage = { var windStore = fmgc.windController.des_winds[computer_temp].wind4; if (windStore.set) { me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][3] = 1; } else { me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][3] = 1; } } else { me.L4 = [nil, nil, "ack"]; @@ -99,10 +93,8 @@ var windDESPage = { var windStore = fmgc.windController.des_winds[computer_temp].wind3; if (windStore.set) { me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][2] = 1; } else { me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][2] = 1; } } else { me.L3 = [nil, nil, "ack"]; @@ -112,10 +104,8 @@ var windDESPage = { var windStore = fmgc.windController.des_winds[computer_temp].wind2; if (windStore.set) { me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; - me.fontMatrix[0][1] = 1; } else { me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; - me.fontMatrix[0][1] = 1; } } else { me.L2 = [nil, nil, "ack"]; @@ -125,10 +115,8 @@ var windDESPage = { var windStore = fmgc.windController.des_winds[computer_temp].wind1; if (windStore.set) { me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"]; - me.fontMatrix[0][0] = 1; } else { me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"]; - me.fontMatrix[0][0] = 1; } } @@ -138,10 +126,8 @@ var windDESPage = { var windStore = fmgc.windController.des_winds[computer_temp].alt1; if (windStore.set) { me.R1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude), "ALTN WIND ", "blu"]; - me.fontMatrix[1][0] = 1; } else { me.R1 = ["[ ]°/[ ]", "ALTN WIND ", "blu"]; - me.fontMatrix[1][0] = 1; } } else { me.R1 = ["", "", "blu"]; diff --git a/Nasal/MCDU/WINDHIST.nas b/Nasal/MCDU/WINDHIST.nas index ba5bfc21..e5b058f0 100644 --- a/Nasal/MCDU/WINDHIST.nas +++ b/Nasal/MCDU/WINDHIST.nas @@ -4,7 +4,6 @@ var windHISTPage = { title: 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 @@ -137,7 +136,6 @@ var windHISTPage = { me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; - me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]]; canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); }, # makeTmpy: func() { From 5242d55bdf18f771a5a0ab99d3ce28a510fb6597 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Fri, 14 Jan 2022 13:07:51 +0000 Subject: [PATCH 04/11] LAT REV pages: cleanup post font change --- Models/Instruments/MCDU/MCDU.nas | 2 ++ Nasal/MCDU/F-PLN.nas | 40 ++++++++++++++++---------------- Nasal/MCDU/HOLD.nas | 28 +++++++++++----------- Nasal/MCDU/LATREV.nas | 30 ++++++++++++++---------- Nasal/MCDU/VERTREV.nas | 6 ++--- 5 files changed, 58 insertions(+), 48 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 5d15f866..48992007 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -423,6 +423,7 @@ var canvas_MCDU_base = { if (!pageSwitch[i].getBoolValue()) { me["Simple"].show(); me["Simple_Center"].show(); + me["Simple_C1S"].setColor(WHITE); me["FPLN"].show(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); @@ -4913,6 +4914,7 @@ var canvas_MCDU_base = { if (myLatRev[i].subtitle[0] != nil) { me["Simple_Center"].show(); me["Simple_C1S"].setText(sprintf("%s", myLatRev[i].subtitle[0] ~ "/" ~ myLatRev[i].subtitle[1])); + me["Simple_C1S"].setColor(fmgc.flightPlanController.temporaryFlag[i] ? YELLOW : GREEN); me["Simple_C1S"].show(); me["Simple_C1"].hide(); me["Simple_C2"].hide(); diff --git a/Nasal/MCDU/F-PLN.nas b/Nasal/MCDU/F-PLN.nas index bf17d749..54ce3b13 100644 --- a/Nasal/MCDU/F-PLN.nas +++ b/Nasal/MCDU/F-PLN.nas @@ -160,22 +160,22 @@ var fplnItem = { if (me.wp.wp_name == "DISCONTINUITY") { canvas_mcdu.myLatRev[me.computer] = latRev.new(4, me.wp, me.index, me.computer); } elsif (fmgc.flightPlanController.temporaryFlag[me.computer]) { - if (me.index == fmgc.flightPlanController.arrivalIndex[me.computer]) { - canvas_mcdu.myLatRev[me.computer] = latRev.new(1, me.wp, me.index, me.computer); - } elsif (left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[me.computer].departure.id) { - canvas_mcdu.myLatRev[me.computer] = latRev.new(0, me.wp, me.index, me.computer); - } elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) { + if (me.wp.wp_name == "PPOS" or me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) { canvas_mcdu.myLatRev[me.computer] = latRev.new(2, me.wp, me.index, me.computer); + } elsif (me.index == fmgc.flightPlanController.arrivalIndex[me.computer]) { + canvas_mcdu.myLatRev[me.computer] = latRev.new(1, me.wp, me.index, me.computer); + } elsif (fmgc.flightPlanController.flightplans[me.computer].departure != nil and left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[me.computer].departure.id) { + canvas_mcdu.myLatRev[me.computer] = latRev.new(0, me.wp, me.index, me.computer); } else { canvas_mcdu.myLatRev[me.computer] = latRev.new(3, me.wp, me.index, me.computer); } } else { - if (me.index == fmgc.flightPlanController.arrivalIndex[2]) { - canvas_mcdu.myLatRev[me.computer] = latRev.new(1, me.wp, me.index, me.computer); - } elsif (left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[2].departure.id) { - canvas_mcdu.myLatRev[me.computer] = latRev.new(0, me.wp, me.index, me.computer); - } elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) { + if (me.wp.wp_name == "PPOS" or me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) { canvas_mcdu.myLatRev[me.computer] = latRev.new(2, me.wp, me.index, me.computer); + } elsif (me.index == fmgc.flightPlanController.arrivalIndex[2]) { + canvas_mcdu.myLatRev[me.computer] = latRev.new(1, me.wp, me.index, me.computer); + } elsif (fmgc.flightPlanController.flightplans[2].departure != nil and left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[2].departure.id) { + canvas_mcdu.myLatRev[me.computer] = latRev.new(0, me.wp, me.index, me.computer); } else { canvas_mcdu.myLatRev[me.computer] = latRev.new(3, me.wp, me.index, me.computer); } @@ -190,22 +190,22 @@ var fplnItem = { canvas_mcdu.myVertRev[me.computer] = nil; if (fmgc.flightPlanController.temporaryFlag[me.computer]) { - if (me.index == fmgc.flightPlanController.arrivalIndex[me.computer]) { - canvas_mcdu.myVertRev[me.computer] = vertRev.new(1, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan); - } if (left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[me.computer].departure.id) { - canvas_mcdu.myVertRev[me.computer] = vertRev.new(0, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan); - } elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) { + if (me.wp.wp_name == "PPOS" or me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) { canvas_mcdu.myVertRev[me.computer] = vertRev.new(3, me.wp.wp_name, me.index, me.computer, me.wp, me.plan); + } elsif (me.index == fmgc.flightPlanController.arrivalIndex[me.computer]) { + canvas_mcdu.myVertRev[me.computer] = vertRev.new(1, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan); + } if (fmgc.flightPlanController.flightplans[me.computer].departure != nil and left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[me.computer].departure.id) { + canvas_mcdu.myVertRev[me.computer] = vertRev.new(0, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan); } else { canvas_mcdu.myVertRev[me.computer] = vertRev.new(2, me.wp.wp_name, me.index, me.computer, me.wp, me.plan); } } else { - if (me.index == fmgc.flightPlanController.arrivalIndex[2]) { - canvas_mcdu.myVertRev[me.computer] = vertRev.new(1, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan); - } elsif (left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[2].departure.id) { - canvas_mcdu.myVertRev[me.computer] = vertRev.new(0, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan); - } elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) { + if (me.wp.wp_name == "PPOS" or me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) { canvas_mcdu.myVertRev[me.computer] = vertRev.new(3, me.wp.wp_name, me.index, me.computer, me.wp, me.plan); + } elsif (me.index == fmgc.flightPlanController.arrivalIndex[2]) { + canvas_mcdu.myVertRev[me.computer] = vertRev.new(1, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan); + } elsif (fmgc.flightPlanController.flightplans[2].departure != nil and left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[2].departure.id) { + canvas_mcdu.myVertRev[me.computer] = vertRev.new(0, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan); } else { canvas_mcdu.myVertRev[me.computer] = vertRev.new(2, me.wp.wp_name, me.index, me.computer, me.wp, me.plan); } diff --git a/Nasal/MCDU/HOLD.nas b/Nasal/MCDU/HOLD.nas index 9333ed54..1bb16b33 100644 --- a/Nasal/MCDU/HOLD.nas +++ b/Nasal/MCDU/HOLD.nas @@ -40,35 +40,35 @@ var holdPage = { me.title = ["HOLD", " AT ", me.waypoint.wp_name]; me.titleColour = "wht"; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0]]; - me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["wht", "wht", "ack", "ack", "ack", "ack"]]; + me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["blu", "blu", "ack", "ack", "ack", "ack"]]; if (me.waypoint.fly_type == "Hold") { me.makeTmpy(); - me.L1 = [" " ~ sprintf("%03.0f", me.waypoint.hold_inbound_radial), "INB CRS", "blu"]; + me.L1 = [sprintf("%03.0f°", me.waypoint.hold_inbound_radial), "INB CRS", "blu"]; if (me.waypoint.hold_is_left_handed) { - me.L2 = [" L", " TURN", "blu"]; + me.L2 = ["L", " TURN", "blu"]; } else { - me.L2 = [" R", " TURN", "blu"]; + me.L2 = ["R", " TURN", "blu"]; } if (me.waypoint.hold_is_distance) { - me.L2 = [" -.-/" ~ me.waypoint.hold_time_or_distance, "TIME/DIST", "blu"]; + me.L3 = [" -.-/" ~ me.waypoint.hold_time_or_distance, "TIME/DIST", "blu"]; } else { - me.L2 = [" " ~ sprintf("%3.1f", (me.waypoint.hold_time_or_distance / 60)) ~ "/----", "TIME/DIST", "blu"]; + me.L3 = [sprintf("%3.1f", (me.waypoint.hold_time_or_distance / 60)) ~ "/----", "TIME/DIST", "blu"]; } - me.R1 = ["COMPUTED ", nil, "wht"]; + me.R1 = ["COMPUTED ", nil, "blu"]; me.R2 = ["DATABASE ", nil, "yel"]; me.arrowsMatrix[1][1] = 0; } else { - me.L1 = [" 100", "INB CRS", "blu"]; - me.L2 = [" R", " TURN", "blu"]; + me.L1 = ["100°", "INB CRS", "blu"]; + me.L2 = ["R", " TURN", "blu"]; if (pts.Instrumentation.Altimeter.indicatedFt.getValue() >= 14000) { - me.L2 = [" 1.5/----", "TIME/DIST", "blu"]; + me.L3 = ["1.5/----", "TIME/DIST", "blu"]; } else { - me.L2 = [" 1.0/----", "TIME/DIST", "blu"]; + me.L3 = ["1.0/----", "TIME/DIST", "blu"]; } - me.R1 = ["COMPUTED ", nil, "wht"]; - me.R2 = ["DATABASE ", nil, "wht"]; + me.R1 = ["COMPUTED ", nil, "blu"]; + me.R2 = ["DATABASE ", nil, "blu"]; } me.L6 = [" RETURN", nil, "wht"]; me.C4 = ["LAST EXIT", nil, "wht"]; @@ -84,6 +84,7 @@ var holdPage = { if (fmgc.flightPlanController.temporaryFlag[me.computer]) { me.L1[2] = "yel"; me.L2[2] = "yel"; + me.L3[2] = "yel"; me.L6 = [" F-PLN", " TMPY", "yel"]; me.R6 = ["INSERT ", " TMPY", "yel"]; me.arrowsColour[0][5] = "yel"; @@ -92,6 +93,7 @@ var holdPage = { } else { me.L1[2] = "blu"; me.L2[2] = "blu"; + me.L3[2] = "blu"; me.L6 = [" RETURN", nil, "wht"]; me.R6 = [nil, nil, "ack"]; me.arrowsColour[0][5] = "wht"; diff --git a/Nasal/MCDU/LATREV.nas b/Nasal/MCDU/LATREV.nas index e8e58f28..2f63ed54 100644 --- a/Nasal/MCDU/LATREV.nas +++ b/Nasal/MCDU/LATREV.nas @@ -47,17 +47,19 @@ var latRev = { _setupPageWithData: func() { if (me.type == 2) { me.title = ["LAT REV", " FROM ", "PPOS"]; + var acPos = geo.aircraft_position(); + me.subtitle = [dmsToString(sprintf(acPos.lat()), "lat"), dmsToString(sprintf(acPos.lon()), "lon")]; me.L2 = [" OFFSET", nil, "wht"]; me.L3 = [" HOLD", nil, "wht"]; me.L6 = [" RETURN", nil, "wht"]; me.R1 = ["FIX INFO ", nil, "wht"]; - me.R2 = ["[ ]°/[ ]°/[ ]", "LL XING/INCR/NO", "blu"]; + me.R2 = ["[ ]°/[]°/[]", "LL XING/INCR/NO", "blu"]; me.arrowsMatrix = [[0, 1, 1, 0, 0, 1], [1, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "wht", "wht", "ack", "ack", "wht"], ["wht", "ack", "ack", "ack", "ack", "ack"]]; } elsif (me.type == 4) { me.title = ["LAT REV", " FROM ", "DISCON"]; - me.R3 = ["[ ]", "NEXT WPT ", "blu"]; - me.R4 = ["[ ]", "NEW DEST", "blu"]; + me.R3 = ["[ ]", "NEXT WPT ", "blu"]; + me.R4 = ["[ ]", "NEW DEST ", "blu"]; me.L6 = [" RETURN", nil, "wht"]; me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]]; me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]]; @@ -69,14 +71,16 @@ var latRev = { } else { me.depAirport = findAirportsByICAO(me.wpt.wp_name); } - me.subtitle = [dmsToString(sprintf(me.depAirport[0].lat), "lat"), dmsToString(sprintf(me.depAirport[0].lon), "lon")]; + if (size(me.depAirport) > 0) { + me.subtitle = [dmsToString(sprintf(me.depAirport[0].lat), "lat"), dmsToString(sprintf(me.depAirport[0].lon), "lon")]; + } me.L1 = [" DEPARTURE", nil, "wht"]; me.L2 = [" OFFSET", nil, "wht"]; me.L6 = [" RETURN", nil, "wht"]; me.R1 = ["FIX INFO ", nil, "wht"]; - me.R2 = ["[ ]°/[ ]°/[ ]", "LL XING/INCR/NO", "blu"]; - me.R3 = ["[ ]", "NEXT WPT ", "blu"]; - me.R4 = ["[ ]", "NEW DEST", "blu"]; + me.R2 = ["[ ]°/[]°/[]", "LL XING/INCR/NO", "blu"]; + me.R3 = ["[ ]", "NEXT WPT ", "blu"]; + me.R4 = ["[ ]", "NEW DEST ", "blu"]; me.arrowsMatrix = [[1, 1, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0]]; me.arrowsColour = [["wht", "wht", "ack", "ack", "ack", "wht"], ["wht", "ack", "ack", "ack", "ack", "ack"]]; } elsif (me.type == 1) { @@ -88,7 +92,9 @@ var latRev = { } else { me.arrAirport = findAirportsByICAO(me.wpt.wp_name); } - me.subtitle = [dmsToString(sprintf(me.arrAirport[0].lat), "lat"), dmsToString(sprintf(me.arrAirport[0].lon), "lon")]; + if (size(me.arrAirport) > 0) { + me.subtitle = [dmsToString(sprintf(me.arrAirport[0].lat), "lat"), dmsToString(sprintf(me.arrAirport[0].lon), "lon")]; + } me.L3 = [" ALTN", nil, "wht"]; if (fmgc.FMGCInternal.altAirportSet) { me.L4 = [" ALTN", " ENABLE", "blu"]; @@ -98,7 +104,7 @@ var latRev = { } me.L6 = [" RETURN", nil, "wht"]; me.R1 = ["ARRIVAL ", nil, "wht"]; - me.R3 = ["[ ]", "NEXT WPT ", "blu"]; + me.R3 = ["[ ]", "NEXT WPT ", "blu"]; } elsif (me.type == 3) { me.title = ["LAT REV", " FROM ", me.wpt.wp_name]; me.arrowsMatrix = [[0, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0]]; @@ -116,8 +122,8 @@ var latRev = { } me.L6 = [" RETURN", nil, "wht"]; me.R1 = ["FIX INFO ", nil, "wht"]; - me.R3 = ["[ ]", "NEXT WPT ", "blu"]; - me.R4 = ["[ ]", "NEW DEST", "blu"]; + me.R3 = ["[ ]", "NEXT WPT ", "blu"]; + me.R4 = ["[ ]", "NEW DEST ", "blu"]; me.R5 = ["AIRWAYS ", nil, "wht"]; } } @@ -158,7 +164,7 @@ var dmsToString = func(dms, type) { } else { var sign = degrees >= 0 ? "E" : "W"; } - return abs(degrees) ~ "g" ~ minutes ~ " " ~ sign; + return abs(degrees) ~ "°" ~ minutes ~ sign; } diff --git a/Nasal/MCDU/VERTREV.nas b/Nasal/MCDU/VERTREV.nas index 5f947901..d76f34d5 100644 --- a/Nasal/MCDU/VERTREV.nas +++ b/Nasal/MCDU/VERTREV.nas @@ -91,7 +91,7 @@ var vertRev = { me.L2 = [fmgc.FMGCInternal.clbSpdLim ~ "/" ~ fmgc.FMGCInternal.clbSpdLimAlt, " CLB SPD LIM", "mag"]; me.speed = me.getSpd(); if (me.speed[0] == nil) { - me.L3 = [" [ ]", " SPD CSTR", "blu"]; + me.L3 = ["[ ]", " SPD CSTR", "blu"]; } else { me.L3 = [me.speed[0], " SPD CSTR", me.speed[1]]; } @@ -101,9 +101,9 @@ var vertRev = { me.R2 = ["RTA ", nil, "wht"]; me.alt = me.getAlt(); if (me.alt[0] == nil) { - me.R3 = ["[ ] ", "ALT CSTR ", "blu"]; + me.R3 = ["[ ]", "ALT CSTR ", "blu"]; } else { - me.R3 = [me.alt[0], "ALT CSTR ", me.alt[1]]; + me.R3 = [me.alt[0], "ALT CSTR ", me.alt[1]]; } me.R6 = ["DES ", nil, "amb"]; # When the system does vertical planning, L6 should be RETURN and R6 not used if the MCDU knows the waypoint is during climb or descent. From 8cc67bf50875f083a2c11f3d5aa97e27e5a2eb07 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Fri, 14 Jan 2022 16:33:58 +0000 Subject: [PATCH 05/11] Rewrite rendering warning --- AircraftConfig/rendering.xml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/AircraftConfig/rendering.xml b/AircraftConfig/rendering.xml index 8cf032ca..13f5cc78 100644 --- a/AircraftConfig/rendering.xml +++ b/AircraftConfig/rendering.xml @@ -34,39 +34,44 @@ <text> <halign>left</halign> - <label>The Aircraft Config has detected that rendering settings are not set properly!</label> + <label>Your rendering settings will not allow all graphical features of the aircraft to be visible!</label> </text> <text> <halign>left</halign> - <label>This means lighting effects on the exterior and in the virtual cockpit will not be visible.</label> + <label>This means certain lighting effects will not be usable, including cockpit floodlights. </label> </text> <text> <halign>left</halign> - <label>ALS, and custom shader settings must be on.</label> + <label>For the best experience:</label> </text> <text> <halign>left</halign> - <label>Landmass shader must be at least 4 for lightspots to work.</label> + <label>* Atmospheric Light Scattering should be enabled</label> </text> <text> <halign>left</halign> - <label>Model shader must be at least 2 for lightmaps to work.</label> + <label>* Landmass shader should be at least 4 for external lights to illuminate the ground</label> + </text> + + <text> + <halign>left</halign> + <label>* Model shader should be at least 2 for lighting to illuminate the aircraft model</label> </text> <hrule/> <text> <halign>left</halign> - <label>Would you like the Aircraft Config to automatically turn on ALS and fix shader settings?</label> + <label>Would you like Aircraft Config to automatically set these minimum basic settings?</label> </text> <text> <halign>left</halign> - <label>If the settings do not save after fixing, try quitting FlightGear through File -> Exit after fixing.</label> + <label>To save these settings, make sure to quit FlightGear with File -> Exit after your flight is complete.</label> </text> </group> @@ -105,8 +110,8 @@ <button> <halign>center</halign> - <legend>Yes, fix all settings</legend> - <pref-width>180</pref-width> + <legend>Apply minimum settings</legend> + <pref-width>200</pref-width> <binding> <command>nasal</command> <script> @@ -120,8 +125,8 @@ <button> <halign>center</halign> - <legend>Yes, but I'll fix shaders myself</legend> - <pref-width>180</pref-width> + <legend>Advanced: View Shader Settings</legend> + <pref-width>200</pref-width> <binding> <command>nasal</command> <script> @@ -143,8 +148,8 @@ <button> <halign>center</halign> - <legend>I don't care</legend> - <pref-width>180</pref-width> + <legend>Ignore</legend> + <pref-width>150</pref-width> <binding> <command>dialog-close</command> </binding> From 0989e43118749997bee2d3115b352d35bdbb09da Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Fri, 14 Jan 2022 21:00:31 +0000 Subject: [PATCH 06/11] INITA / INITB pages - fix formatting post new font --- Models/Instruments/MCDU/MCDU.nas | 166 +++++++++++++++++-------------- Nasal/MCDU/WINDCLB.nas | 16 +-- Nasal/MCDU/WINDCRZ.nas | 24 ++--- Nasal/MCDU/WINDDES.nas | 12 +-- 4 files changed, 115 insertions(+), 103 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 48992007..05189971 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -193,6 +193,18 @@ var canvas_MCDU_base = { } } + me["Simple_L1S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L2S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L3S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L4S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L5S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L6S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R1S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R2S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R4S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R5S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R6S"].setFont("HoneywellMCDUSmall.ttf"); + me["PERFTO_FE"].setColor(BLUE); me["PERFTO_SE"].setColor(BLUE); me["PERFTO_OE"].setColor(BLUE); @@ -2697,7 +2709,7 @@ var canvas_MCDU_base = { me["INITA_FromTo"].show(); me["Simple_L1"].hide(); me["Simple_L2"].setColor(WHITE); - me["Simple_L2"].setText("----/----------"); + me["Simple_L2"].setText("----/------"); showRight(me,-1, 1, 0, 0, 0, 0); me["Simple_R2S"].show(); if (!Simbrief.SimbriefParser.inhibit) { @@ -2735,7 +2747,7 @@ var canvas_MCDU_base = { me["Simple_R6"].setText(sprintf("%.0f°", fmgc.FMGCInternal.gndTemp)); } - me["Simple_L1S"].setText(" CO RTE"); + me["Simple_L1S"].setText("CO RTE"); me["Simple_L2S"].setText("ALTN/CO RTE"); me["Simple_L3S"].setText("FLT NBR"); me["Simple_L5S"].setText("COST INDEX"); @@ -2783,8 +2795,8 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,1, 1, 1, 1, 1, -1); - me.fontSizeLeft(small, small, 0, 0, 0, small); - me.fontSizeRight(small, small, 0, 0, 0, normal); + me.fontSizeLeft(normal, normal, normal, normal, normal, normal); + me.fontSizeRight(normal, normal, normal, normal, normal, normal); me.fontSizeCenter(normal, small, small, small, small, 0); me.colorLeft("blu", "blu", "ack", "ack", "ack", "wht"); @@ -2795,12 +2807,19 @@ var canvas_MCDU_base = { me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "blu"); me.colorCenter("grn", "ack", "grn", "grn", "grn", "grn"); me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht"); + + + me["Simple_L1S"].setText("LAT"); + me["Simple_L2S"].setText("LAT"); + me["Simple_R1S"].setText("LONG"); + me["Simple_R2S"].setText("LONG"); + me["Simple_L6"].setText(" RETURN"); + me["Simple_C1S"].setText("REFERENCE"); + me["Simple_C2S"].setText("GPS POSITION"); pageSwitch[i].setBoolValue(1); } - me["Simple_L1S"].setText("LAT"); - me["Simple_R1S"].setText("LONG"); if (getprop("/FMGC/internal/align-ref-lat-edit")) { me["IRSINIT_1"].show(); me["IRSINIT_2"].hide(); @@ -2821,7 +2840,7 @@ var canvas_MCDU_base = { minutes_lat = sprintf("%.1f",abs((dms_lat - degrees_lat) * 60)); sign_lat = degrees_lat >= 0 ? "N" : "S"; lat_same = degrees_lat == degrees and minutes_lat == minutes and sign_lat == sign; - me["Simple_L1"].setText(abs(sprintf("%.0f", degrees)) ~ "g" ~ sprintf("%.1f", minutes) ~ " " ~ sign); + me["Simple_L1"].setText(abs(sprintf("%.0f", degrees)) ~ "°" ~ sprintf("%.1f", minutes) ~ sign); degrees = getprop("/FMGC/internal/align-ref-long-degrees"); minutes = getprop("/FMGC/internal/align-ref-long-minutes"); @@ -2831,7 +2850,7 @@ var canvas_MCDU_base = { minutes_long = sprintf("%.1f",abs((dms_long - degrees_long) * 60)); sign_long = degrees_long >= 0 ? "E" : "W"; long_same = degrees_long == degrees and minutes_long == minutes and sign_long == sign; - me["Simple_R1"].setText(abs(sprintf("%.0f", degrees)) ~ "g" ~ sprintf("%.1f", minutes) ~ " " ~ sign); + me["Simple_R1"].setText(abs(sprintf("%.0f", degrees)) ~ "°" ~ sprintf("%.1f", minutes) ~ sign); if (lat_same and long_same) { me["Simple_C1"].setText(getprop("/FMGC/flightplan[2]/wp[0]/id")); @@ -2851,26 +2870,35 @@ 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) ~ "°" ~ minutes ~ " " ~ sign); dms2 = getprop("/position/longitude-deg"); degrees2 = int(dms2); minutes2 = sprintf("%.1f",abs((dms2 - degrees2) * 60)); sign2 = degrees2 >= 0 ? "E" : "W"; + + # GPS POS + me["Simple_L2"].setText(abs(degrees) ~ "°" ~ minutes ~ sign); 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) ~ "°" ~ 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) ~ "°" ~ 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) ~ "°" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "°" ~ minutes2 ~ " " ~ sign2); - } else { - me["Simple_C5"].setText("-----.--/-----.--"); + + # IRS POS + for (var ADR = 0; ADR < 3; ADR += 1) { + if (systems.ADIRS.ADIRunits[ADR].operative and getprop("/FMGC/internal/align" ~ (ADR + 1) ~ "-done")) { + me["Simple_C" ~ (ADR + 3)].setText(abs(degrees) ~ "°" ~ minutes ~ sign ~ "/" ~ abs(degrees2) ~ "°" ~ minutes2 ~ sign2); + me["Simple_C" ~ (ADR + 3)].setColor(GREEN); + } else { + me["Simple_C" ~ (ADR + 3)].setText("--°---.--/---°--.--"); + me["Simple_C" ~ (ADR + 3)].setColor(WHITE); + } + + + if (systems.ADIRS.Operating.aligned[ADR].getValue()) { + if (systems.ADIRS.ADIRunits[ADR].mode == 2) { + me["Simple_C" ~ (ADR + 3) ~ "S"].setText("IRS" ~ (ADR + 1) ~ " IN ATT"); + } else { + me["Simple_C" ~ (ADR + 3) ~ "S"].setText("IRS" ~ (ADR + 1) ~ " ALIGNED ON GPS"); + } + } else { + me["Simple_C" ~ (ADR + 3) ~ "S"].setText("IRS" ~ (ADR + 1) ~ " ALIGNING ON GPS"); + } } if (align_set.getValue() == 1) { @@ -2883,42 +2911,6 @@ var canvas_MCDU_base = { me["IRSINIT_star"].hide(); showRightArrow(me,0, 0, 0, 0, 0, 1); } - - if (systems.ADIRS.Operating.aligned[0].getValue()) { - if (systems.ADIRS.ADIRunits[0].mode == 2) { - me["Simple_C3S"].setText("IRS1 IN ATT"); - } else { - me["Simple_C3S"].setText("IRS1 ALIGNED ON GPS"); - } - } else { - me["Simple_C3S"].setText("IRS1 ALIGNING ON GPS"); - } - - if (systems.ADIRS.Operating.aligned[1].getValue()) { - if (systems.ADIRS.ADIRunits[1].mode == 2) { - me["Simple_C4S"].setText("IRS2 IN ATT"); - } else { - me["Simple_C4S"].setText("IRS2 ALIGNED ON GPS"); - } - } else { - me["Simple_C4S"].setText("IRS2 ALIGNING ON GPS"); - } - - if (systems.ADIRS.Operating.aligned[2].getValue()) { - if (systems.ADIRS.ADIRunits[2].mode == 2) { - me["Simple_C5S"].setText("IRS3 IN ATT"); - } else { - me["Simple_C5S"].setText("IRS3 ALIGNED ON GPS"); - } - } else { - me["Simple_C5S"].setText("IRS3 ALIGNING ON GPS"); - } - - me["Simple_L2S"].setText("LAT"); - me["Simple_L6"].setText(" RETURN"); - me["Simple_R2S"].setText("LONG"); - me["Simple_C1S"].setText("REFERENCE"); - me["Simple_C2S"].setText("GPS POSITION"); } else if (page == "ROUTESELECTION") { if (!pageSwitch[i].getBoolValue()) { @@ -2994,7 +2986,16 @@ var canvas_MCDU_base = { me["WIND"].hide(); me["PROG"].hide(); me["PERFTO"].hide(); - me["arrowsDepArr"].hide(); + me["arrowsDepArr"].show(); + me["arrow1L"].hide(); + me["arrow2L"].hide(); + me["arrow3L"].hide(); + me["arrow4L"].hide(); + me["arrow5L"].hide(); + me["arrow1R"].hide(); + me["arrow2R"].hide(); + me["arrow4R"].hide(); + me["arrow5R"].hide(); me["PERFAPPR"].hide(); me["PERFGA"].hide(); me["Simple_Title"].show(); @@ -3013,7 +3014,7 @@ var canvas_MCDU_base = { showCenterS(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); + showRightArrow(me,-1, -1, -1, -1, -1, -1); me.fontSizeLeft(small, small, small, small, small, small); me.fontSizeCenter(normal, small, small, small, small, small); @@ -3032,14 +3033,15 @@ var canvas_MCDU_base = { pageSwitch[i].setBoolValue(1); } - me["Simple_L1S"].setText("TAXI"); if (acconfig_weight_kgs.getValue() == 1) { me["Simple_L1"].setText(sprintf("%2.1f", fmgc.FMGCInternal.taxiFuel * LBS2KGS)); } else { me["Simple_L1"].setText(sprintf("%2.1f", fmgc.FMGCInternal.taxiFuel)); } + + me["Simple_L1S"].setText("TAXI"); me["Simple_L2S"].setText("TRIP/TIME"); - me["Simple_L3S"].setText("RTE RSV/PCT"); + me["Simple_L3S"].setText("RTE RSV/%"); me["Simple_L4S"].setText("ALTN/TIME"); me["Simple_L5S"].setText("FINAL/TIME"); me["Simple_L6S"].setText("MIN DEST FOB"); @@ -3077,12 +3079,12 @@ var canvas_MCDU_base = { me["Simple_R3"].show(); me["Simple_R3S"].setText("FUEL"); me["Simple_R3"].setText("PLANNING "); - me["Simple_R3_Arrow"].show(); - me["Simple_R3_Arrow"].setColor(AMBER); + me["arrow3R"].show(); + me["arrow3R"].setColor(AMBER); } else { me["Simple_R3S"].hide(); me["Simple_R3"].hide(); - me["Simple_R3_Arrow"].hide(); + me["arrow3R"].hide(); } me["Simple_C4B"].hide(); me["Simple_R4"].setText("---.-/---.-"); @@ -3114,8 +3116,7 @@ var canvas_MCDU_base = { me["Simple_R3"].show(); me["Simple_R3S"].setText("FUEL"); me["Simple_R3"].setText("PLANNING "); - me["Simple_R3_Arrow"].show(); - me["Simple_R3_Arrow"].setColor(GREEN); + me["arrow3R"].hide(); me["Simple_C4B"].hide(); me["Simple_R4"].setText("---.-/---.-"); me["Simple_R6"].setText("---.-/----"); @@ -3144,8 +3145,8 @@ var canvas_MCDU_base = { me["Simple_R3"].show(); me["Simple_R3S"].setText("BLOCK"); me["Simple_R3"].setText("CONFIRM "); - me["Simple_R3_Arrow"].show(); - me["Simple_R3_Arrow"].setColor(AMBER); + me["arrow3R"].show(); + me["arrow3R"].setColor(AMBER); me["Simple_C4B"].show(); if (num(fmgc.FMGCInternal.tow) >= 100.0) { if (acconfig_weight_kgs.getValue() == 1) { @@ -3199,7 +3200,7 @@ var canvas_MCDU_base = { } me["Simple_R3S"].hide(); me["Simple_R3"].hide(); - me["Simple_R3_Arrow"].hide(); + me["arrow3R"].hide(); me["Simple_C4B"].show(); if (num(fmgc.FMGCInternal.tow) >= 100.0) { if (acconfig_weight_kgs.getValue() == 1) { @@ -3331,7 +3332,7 @@ var canvas_MCDU_base = { } me["Simple_R3S"].hide(); me["Simple_R3"].hide(); - me["Simple_R3_Arrow"].hide(); + me["arrow3R"].hide(); me["Simple_C4B"].hide(); if (acconfig_weight_kgs.getValue() == 1) { @@ -3489,9 +3490,20 @@ var canvas_MCDU_base = { me["Simple_L2"].setText(fmgc.FMGCInternal.altAirport); } + me["Simple_L1S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L3S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L4S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L5S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L6S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_C1S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R1S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R3S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R4S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R5S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_R6S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_L1S"].setText("AT"); - me["Simple_L2S"].setText("X"); - me["Simple_L3S"].setText("RTE RSV/PCT"); + me["Simple_L3S"].setText("RTE RSV/%"); me["Simple_L4S"].setText("ALTN /TIME"); me["Simple_L5S"].setText("FINAL/TIME"); me["Simple_L6S"].setText("MIN DEST FOB"); @@ -3503,7 +3515,6 @@ var canvas_MCDU_base = { me["Simple_R1"].setText("---.-"); me["Simple_R2"].setText("---.-"); me["Simple_R1S"].setText("EFOB"); - me["Simple_R2S"].setText("X"); me["Simple_R4S"].setText("FOB "); me["Simple_R5S"].setText(" GW/ CG"); me["Simple_R6S"].setText("EXTRA/TIME"); @@ -3894,10 +3905,10 @@ var canvas_MCDU_base = { if (mcdu.bearingDistances[i].selectedPoint != nil) { me["Simple_L4"].setColor(GREEN); - me["Simple_L4"].setText(sprintf("%3.0fg /%4.1f",mcdu.bearingDistances[i].bearing,mcdu.bearingDistances[i].distance)); + me["Simple_L4"].setText(sprintf("%3.0f° /%4.1f",mcdu.bearingDistances[i].bearing,mcdu.bearingDistances[i].distance)); } else { me["Simple_L4"].setColor(WHITE); - me["Simple_L4"].setText(" ---g /----.-"); + me["Simple_L4"].setText(" ---° /----.-"); } me["Simple_R5"].setText("GPS PRIMARY"); @@ -4786,6 +4797,7 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); me.fontSizeLeft(normal, normal, normal, normal, normal, normal); + me.fontSizeRight(normal, normal, normal, normal, normal, normal); me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht"); me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht"); diff --git a/Nasal/MCDU/WINDCLB.nas b/Nasal/MCDU/WINDCLB.nas index 64016d1f..bc9a7909 100644 --- a/Nasal/MCDU/WINDCLB.nas +++ b/Nasal/MCDU/WINDCLB.nas @@ -68,7 +68,7 @@ var windCLBPage = { if (windStore.set) { me.L5 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L5 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L5 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L5 = [nil, nil, "ack"]; @@ -79,7 +79,7 @@ var windCLBPage = { if (windStore.set) { me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L4 = [nil, nil, "ack"]; @@ -90,7 +90,7 @@ var windCLBPage = { if (windStore.set) { me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L3 = [nil, nil, "ack"]; @@ -101,7 +101,7 @@ var windCLBPage = { if (windStore.set) { me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L2 = [nil, nil, "ack"]; @@ -110,15 +110,15 @@ var windCLBPage = { if (me.items >= 1) { var windStore = fmgc.windController.clb_winds[computer_temp].wind1; if (windStore.set) { - me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"]; + me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, " TRU WIND/ALT", "blu"]; } else { - me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"]; + me.L1 = ["[ ]°/[ ]/[ ]", " TRU WIND/ALT", "blu"]; } } me.L6 = [" RETURN", nil, "wht"]; - me.R1 = [" HISTORY ", "WIND ", "wht"]; - me.R3 = [" REQUEST ", "WIND ", "amb"]; + me.R1 = ["WIND ", "HISTORY ", "wht"]; + me.R3 = ["REQUEST ", "WIND ", "amb"]; me.R5 = [" PHASE ", "NEXT ", "wht"]; canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); diff --git a/Nasal/MCDU/WINDCRZ.nas b/Nasal/MCDU/WINDCRZ.nas index 2effb5da..1df45a69 100644 --- a/Nasal/MCDU/WINDCRZ.nas +++ b/Nasal/MCDU/WINDCRZ.nas @@ -95,7 +95,7 @@ var windCRZPage = { if (windStore.set) { me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L4 = [nil, nil, "ack"]; @@ -106,7 +106,7 @@ var windCRZPage = { if (windStore.set) { me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L3 = [nil, nil, "ack"]; @@ -117,7 +117,7 @@ var windCRZPage = { if (windStore.set) { me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L2 = [nil, nil, "ack"]; @@ -126,9 +126,9 @@ var windCRZPage = { if (me.items >= 1) { var windStore = fmgc.windController.crz_winds[computer_temp].wind1; if (windStore.set) { - me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"]; + me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, " TRU WIND/ALT", "blu"]; } else { - me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"]; + me.L1 = ["[ ]°/[ ]/[ ]", " TRU WIND/ALT", "blu"]; } } @@ -136,7 +136,7 @@ var windCRZPage = { if (windStore.set) { me.L5 = [windStore.temp ~ "/" ~ windStore.altitude, "SAT / ALT", "blu"]; } else { - me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"]; + me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"]; } } else { if (me.items >= 4) { @@ -144,7 +144,7 @@ var windCRZPage = { if (windStore.set) { me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L4 = [nil, nil, "ack"]; @@ -155,7 +155,7 @@ var windCRZPage = { if (windStore.set) { me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L3 = [nil, nil, "ack"]; @@ -166,7 +166,7 @@ var windCRZPage = { if (windStore.set) { me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L2 = [nil, nil, "ack"]; @@ -175,9 +175,9 @@ var windCRZPage = { if (me.items >= 1) { var windStore = fmgc.windController.winds[computer_temp][me.match_location].wind1; if (windStore.set) { - me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"]; + me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, " TRU WIND/ALT", "blu"]; } else { - me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"]; + me.L1 = ["[ ]°/[ ]/[ ]", " TRU WIND/ALT", "blu"]; } } @@ -185,7 +185,7 @@ var windCRZPage = { if (windStore.set) { me.L5 = [windStore.temp ~ "/" ~ windStore.altitude, "SAT / ALT", "blu"]; } else { - me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"]; + me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"]; } } diff --git a/Nasal/MCDU/WINDDES.nas b/Nasal/MCDU/WINDDES.nas index dac9a472..f5ce0145 100644 --- a/Nasal/MCDU/WINDDES.nas +++ b/Nasal/MCDU/WINDDES.nas @@ -83,7 +83,7 @@ var windDESPage = { if (windStore.set) { me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L4 = [nil, nil, "ack"]; @@ -94,7 +94,7 @@ var windDESPage = { if (windStore.set) { me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L3 = [nil, nil, "ack"]; @@ -105,7 +105,7 @@ var windDESPage = { if (windStore.set) { me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"]; } else { - me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; + me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"]; } } else { me.L2 = [nil, nil, "ack"]; @@ -116,7 +116,7 @@ var windDESPage = { if (windStore.set) { me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"]; } else { - me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"]; + me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"]; } } @@ -125,9 +125,9 @@ var windDESPage = { if (fmgc.FMGCInternal.altAirportSet) { var windStore = fmgc.windController.des_winds[computer_temp].alt1; if (windStore.set) { - me.R1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude), "ALTN WIND ", "blu"]; + me.R1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude), "ALTN WIND", "blu"]; } else { - me.R1 = ["[ ]°/[ ]", "ALTN WIND ", "blu"]; + me.R1 = ["[ ]°/[ ]", "ALTN WIND", "blu"]; } } else { me.R1 = ["", "", "blu"]; From a801ea9b4aee09e64a8e0347edfc692b3e35dd5d Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Fri, 14 Jan 2022 21:03:29 +0000 Subject: [PATCH 07/11] Center - change font also to small for subtitles --- Models/Instruments/MCDU/MCDU.nas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 05189971..0a9ae3c5 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -199,6 +199,11 @@ var canvas_MCDU_base = { me["Simple_L4S"].setFont("HoneywellMCDUSmall.ttf"); me["Simple_L5S"].setFont("HoneywellMCDUSmall.ttf"); me["Simple_L6S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_C1S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_C2S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_C4S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_C5S"].setFont("HoneywellMCDUSmall.ttf"); + me["Simple_C6S"].setFont("HoneywellMCDUSmall.ttf"); me["Simple_R1S"].setFont("HoneywellMCDUSmall.ttf"); me["Simple_R2S"].setFont("HoneywellMCDUSmall.ttf"); me["Simple_R4S"].setFont("HoneywellMCDUSmall.ttf"); From 8f073024106a1feb0900f8d90218c0528596fbf2 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Sat, 15 Jan 2022 14:03:14 +0000 Subject: [PATCH 08/11] IESI: make certain optimizations (average update loop time is now approximately 0.18ms --- Models/Instruments/IESI/IESI.nas | 135 ++++++++++++------------------- Systems/a320-misc.xml | 56 ++++++++++++- 2 files changed, 106 insertions(+), 85 deletions(-) diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index e3e167b8..45364330 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -49,52 +49,41 @@ var canvas_IESI = { obj.AI_horizon_trans = obj["AI_horizon"].createTransform(); obj.AI_horizon_rot = obj["AI_horizon"].createTransform(); + obj._aiCenter = obj["AI_center"].getCenter(); obj._cachedInhg = nil; - obj._excessMotion = 0; - obj._fast = 0; + obj._cachedMode = nil; + obj._canReset = 0; + obj._excessMotionInInit = 0; + obj._fastInit = 0; obj._IESITime = 0; - obj._showIESI = 0; - obj.ASI = 0; - obj.canReset = 0; - obj.isNegativeAlt = 0; - obj.middleAltOffset = nil; + obj._isNegativeAlt = 0; + obj._middleAltOffset = nil; + obj._powerResult = 0; + obj._roll = 0; obj.update_items = [ props.UpdateManager.FromHashValue("airspeed", nil, func(val) { - # Subtract 30, since the scale starts at 30, but don't allow less than 0, or more than 520 knots - if (val <= 30) { - obj.ASI = 0; - } else if (val >= 520) { - obj.ASI = 490; - } else { - obj.ASI = val - 30; - } - obj["ASI_scale"].setTranslation(0, obj.ASI * 8.295); + obj["ASI_scale"].setTranslation(0, math.clamp(val - 30, 0, 490) * 8.295); }), props.UpdateManager.FromHashList(["altitude","altitude_ind"], nil, func(val) { - if (val.altitude > 50000) { - val.altitude = 50000; - } elsif (val.altitude < -2000) { - val.altitude = -2000; - } - + val.altitude = math.clamp(val.altitude, -2000, 50000); if (val.altitude < 0) { obj["negText"].show(); - obj.isNegativeAlt = 1; + obj._isNegativeAlt = 1; } else { obj["negText"].hide(); - obj.isNegativeAlt = 0; + obj._isNegativeAlt = 0; } obj.altOffset = (val.altitude / 500) - int(val.altitude / 500); obj.middleAltText = roundaboutAlt(val.altitude / 100); if (obj.altOffset > 0.5) { - obj.middleAltOffset = -(obj.altOffset - 1) * 258.5528; + obj._middleAltOffset = -(obj.altOffset - 1) * 258.5528; } else { - obj.middleAltOffset = -obj.altOffset * 258.5528; + obj._middleAltOffset = -obj.altOffset * 258.5528; } - obj["ALT_scale"].setTranslation(0, -obj.middleAltOffset); + obj["ALT_scale"].setTranslation(0, -obj._middleAltOffset); obj["ALT_scale"].update(); obj["ALT_five"].setText(sprintf("%03d", abs(obj.middleAltText+10))); obj["ALT_four"].setText(sprintf("%03d", abs(obj.middleAltText+5))); @@ -114,20 +103,16 @@ var canvas_IESI = { obj.altTens = num(right(sprintf("%02d", val.altitude), 2)); obj["ALT_tens"].setTranslation(0, obj.altTens * 3.16); }), - props.UpdateManager.FromHashValue("mach", nil, func(val) { - if (val >= 0.5) { - obj._machWasAbove50 = 1; - obj["ASI_mach_decimal"].show(); - obj["ASI_mach"].show(); - } elsif (val >= 0.45 and obj._machWasAbove50) { + props.UpdateManager.FromHashValue("showMach", nil, func(val) { + if (val) { obj["ASI_mach_decimal"].show(); obj["ASI_mach"].show(); } else { - obj._machWasAbove50 = 0; obj["ASI_mach_decimal"].hide(); obj["ASI_mach"].hide(); } - + }), + props.UpdateManager.FromHashValue("mach", nil, func(val) { if (val >= 0.999) { obj["ASI_mach"].setText("99"); } else { @@ -138,8 +123,9 @@ var canvas_IESI = { obj.AI_horizon_trans.setTranslation(0, val * 16.74); }), props.UpdateManager.FromHashValue("roll", nil, func(val) { - obj.AI_horizon_rot.setRotation(-val * D2R, obj["AI_center"].getCenter()); - obj["AI_bank"].setRotation(-val * D2R); + obj._roll = -val * D2R; + obj.AI_horizon_rot.setRotation(obj._roll, obj._aiCenter); + obj["AI_bank"].setRotation(obj._roll); }), props.UpdateManager.FromHashValue("skid", nil, func(val) { if (abs(val) >= 84.99) { @@ -149,9 +135,6 @@ var canvas_IESI = { obj["AI_slipskid"].show(); } }), - props.UpdateManager.FromHashList(["altimeter_mode","qnh_hpa","qnh_inhg"], nil, func(val) { - obj.updateQNH(val); - }), ]; return obj; }, @@ -159,22 +142,21 @@ var canvas_IESI = { return ["IESI","IESI_Init","attRst","attRstRect","att90s","ATTflag","ATTflag_rect","ATTflag_text","ALTwarn","SPDwarn","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_index","AI_horizon","AI_sky_bank","AI_bank","AI_bank_center","AI_slipskid","ALT_scale","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_meters","QNH_setting","QNH_std","negText","negText2","AI_bank_scale","metricM","metricBox"]; }, update: func(notification) { - if (notification.qnh_inhg != me._cachedInhg) { - me._cachedInhg = notification.qnh_inhg; - me.updateQNH(notification); - } + me._powerResult = me.updatePower(notification); + if (me._powerResult == 0) { return; } - me.updatePower(notification); - if (me.group.getVisible() == 0) { - return; + if (notification.qnh_inhg != me._cachedInhg or notification.altimeter_mode != me._cachedMode) { + me._cachedInhg = notification.qnh_inhg; + me._cachedMode = notification.altimeter_mode; + me.updateQNH(notification); } if (me._IESITime + 90 >= notification.elapsedTime) { if (notification.groundspeed > 2) { - me._excessMotion = 1; + me._excessMotionInInit = 1; } - if (me._fast) { + if (me._fastInit) { me["IESI"].show(); me["IESI_Init"].hide(); me["AI_bank"].hide(); @@ -203,7 +185,7 @@ var canvas_IESI = { me["metricM"].show(); me["metricBox"].show(); - if (me.isNegativeAlt) { + if (me._isNegativeAlt) { me["negText2"].show(); } else { me["negText2"].hide(); @@ -215,7 +197,7 @@ var canvas_IESI = { me["negText2"].hide(); } - if (!me._excessMotion) { + if (!me._excessMotionInInit) { me["IESI_Init"].hide(); me["IESI"].show(); me["AI_bank"].show(); @@ -260,57 +242,41 @@ var canvas_IESI = { } else { me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa)); } - me["QNH_setting"].show(); me["QNH_std"].hide(); + me["QNH_setting"].show(); } }, - _transientVar: 0, updatePower: func(notification) { - # todo 20W power consumption - if (notification.attReset == 1 and me.canReset) { - me.canReset = 0; - me._excessMotion = 0; - me._fast = 1; + if (notification.attReset == 1 and me._canReset) { + me._canReset = 0; + me._excessMotionInInit = 0; + me._fastInit = 1; iesi_init.setBoolValue(0); - } else if (me._IESITime + 90 < notification.elapsedTime and notification.iesiInit and !me.canReset) { - me.canReset = 1; + } else if (me._IESITime + 90 < notification.elapsedTime and notification.iesiInit and !me._canReset) { + me._canReset = 1; } - if (notification.dcEss >= 25 or (notification.relay7XB and notification.dcHot1703 >= 25)) { - me._showIESI = 1; + if (notification.iesiPowered) { if (notification.acconfig != 1 and notification.iesiInit != 1) { iesi_init.setBoolValue(1); - if (me._fast) { - me._IESITime = notification.elapsedTime - 80; - } else { - me._IESITime = notification.elapsedTime; - } + me._IESITime = notification.elapsedTime - (me._fastInit ? 80 : 0); } else if (notification.acconfig == 1 and notification.iesiInit != 1) { iesi_init.setBoolValue(1); me._IESITime = notification.elapsedTime - 87; } } elsif (notification.iesiInit) { - if (!me._transientVar) { - me._transientVar = 1; - settimer(func() { - if (systems.ELEC.Bus.dcEss.getValue() >= 25 or (systems.ELEC.Bus.dcHot1703.getValue() >= 25 and systems.ELEC.Relay.relay7XB.getValue())) { - me._transientVar = 0; - } else { - me.canReset = 0; - me._excessMotion = 0; - me._fast = 0; - me._showIESI = 0; - me._transientVar = 0; - iesi_init.setBoolValue(0); - } - }, 0.2); # 200ms delay power transients - } + me._canReset = 0; + me._excessMotionInInit = 0; + me._fastInit = 0; + iesi_init.setBoolValue(0); } - if (me._showIESI and notification.iesiBrt > 0.01) { + if (notification.iesiPowered and notification.iesiBrt > 0.01) { me.group.setVisible(1); + return 1; } else { me.group.setVisible(0); + return 0; } }, }; @@ -352,13 +318,14 @@ var input = { "attReset": "/instrumentation/iesi/att-reset", "iesiBrt": "/controls/lighting/DU/iesi", "iesiInit": "/instrumentation/iesi/iesi-init", + "iesiPowered": "/instrumentation/iesi/power/power-on", "mach": "/instrumentation/airspeed-indicator/indicated-mach", "pitch": "/instrumentation/iesi/pitch-deg", "qnh_hpa": "/instrumentation/altimeter[6]/setting-hpa", "qnh_inhg": "/instrumentation/altimeter[6]/setting-inhg", "roll": "/orientation/roll-deg", "skid": "/instrumentation/iesi/slip-skid", - "relay7XB": "/systems/electrical/sources/si-1/inverter-control/relay-7xb", + "showMach": "/instrumentation/iesi/display/show-mach", }; foreach (var name; keys(input)) { diff --git a/Systems/a320-misc.xml b/Systems/a320-misc.xml index 95f983ca..fa8d5edd 100644 --- a/Systems/a320-misc.xml +++ b/Systems/a320-misc.xml @@ -502,7 +502,7 @@ </channel> - <channel name="FMGC"> + <channel name="FMGC" execrate="8"> <fcs_function name="/FMGC/internal/kts-to-mach-factor"> <function> @@ -524,4 +524,58 @@ </channel> + <channel name="IESI" execrate="8"> + + <switch name="/instrumentation/iesi/display/show-mach"> + <default value="0"/> + <test logic="OR" value="1"> + /instrumentation/airspeed-indicator/indicated-mach ge 0.5 + </test> + <test logic="AND" value="1"> + /instrumentation/airspeed-indicator/indicated-mach ge 0.45 + /instrumentation/iesi/display/show-mach eq 1 + </test> + </switch> + + <switch name="/instrumentation/iesi/power/power-command"> + <default value="0"/> + <test logic="OR" value="1"> + /systems/electrical/bus/dc-ess ge 25 + <test logic="AND"> + /systems/electrical/sources/si-1/inverter-control/relay-7xb ne 0 + /systems/electrical/bus/sub-bus/dc-hot-1-703 ge 25 + </test> + </test> + </switch> + + <actuator name="/instrumentation/iesi/power/power-transient-timer"> + <input>/instrumentation/iesi/power/power-command</input> + <rate_limit sense="decr">5</rate_limit> + <rate_limit sene="incr">100</rate_limit> + </actuator> + + <switch name="/instrumentation/iesi/power/power-on"> + <default value="0"/> + <test logic="OR" value="1"> + /instrumentation/iesi/power/power-transient-timer ne 0 + </test> + </switch> + + <fcs_function name="/instrumentation/iesi/power/power-consumption-w"> + <function> + <sum> + <product> + <value>16</value> + <property>/instrumentation/iesi/power/power-on</property> + </product> + <product> + <value>4</value> + <property>/controls/lighting/DU/iesi</property> + </product> + </sum> + </function> + </fcs_function> + + </channel> + </system> From eb12d3ed4d9dbec10e0ead75d413555f68869562 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Sat, 15 Jan 2022 16:59:59 +0000 Subject: [PATCH 09/11] F-PLN: don't create TMPY when a mcdu message is shown --- Nasal/MCDU/F-PLN.nas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nasal/MCDU/F-PLN.nas b/Nasal/MCDU/F-PLN.nas index 54ce3b13..caad448d 100644 --- a/Nasal/MCDU/F-PLN.nas +++ b/Nasal/MCDU/F-PLN.nas @@ -508,7 +508,7 @@ var fplnPage = { # this one is only created once, and then updated - remember th setprop("MCDU[" ~ me.computer ~ "]/page", "LATREV"); } } else { - if (size(me.outputList) >= index) { + if (size(me.outputList) >= index and !mcdu_scratchpad.scratchpads[me.computer].showTypeIMsg and !mcdu_scratchpad.scratchpads[me.computer].showTypeIIMsg) { if (size(mcdu_scratchpad.scratchpads[me.computer].scratchpad) > 0) { var returny = fmgc.flightPlanController.scratchpad(mcdu_scratchpad.scratchpads[me.computer].scratchpad, (index - 1 + me.scroll), me.computer); if (returny == 3) { From da624bfb2e09645f6fbdf9ace05f75965f4a7eac Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Sat, 15 Jan 2022 17:47:00 +0000 Subject: [PATCH 10/11] DATA / STATUS pages - cleanup with new font --- A320-main.xml | 1 - Models/Instruments/MCDU/MCDU.nas | 81 +++++++++++++++++++++++--------- Nasal/MCDU/CLOSESTAIRPORT.nas | 19 ++++---- Nasal/MCDU/MCDU.nas | 14 ++++-- Nasal/MCDU/STATUS.nas | 16 ------- 5 files changed, 80 insertions(+), 51 deletions(-) delete mode 100644 Nasal/MCDU/STATUS.nas diff --git a/A320-main.xml b/A320-main.xml index 531020ec..02e4a583 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -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> diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 0a9ae3c5..7c3e1d78 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -373,18 +373,18 @@ 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"; if (systems.ADIRS.ADIRunits[a].operative) { if (systems.ADIRS.Operating.aligned[a].getValue()) { - irsstatus = (systems.ADIRS.ADIRunits[a].mode == 2) ? "ATT" : "NAV"; + irsstatus = (systems.ADIRS.ADIRunits[a].mode == 2) ? " ATT" : "NAV"; } else { if (b) { - irsstatus = "ALIGN TTN" ~ sprintf("%2d",math.round(systems.ADIRS.ADIRunits[a]._alignTime) / 60); + irsstatus = " ALIGN TTN" ~ sprintf("%2d",math.round(systems.ADIRS.ADIRunits[a]._alignTime) / 60); } else { - irsstatus = "ALIGN"; + irsstatus = " ALIGN"; } } } @@ -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"); @@ -2027,7 +2054,7 @@ var canvas_MCDU_base = { if (fmgc.FMGCInternal.phase == 0 or fmgc.FMGCInternal.phase == 7) { # only on preflight and done phases me["Simple_L5S"].setText("CHG CODE"); me["Simple_L5S"].show(); - me["Simple_L5"].setText("[ ]"); + me["Simple_L5"].setText("[ ]"); me["Simple_L5"].show(); } @@ -2038,8 +2065,9 @@ var canvas_MCDU_base = { me["Simple_L6S"].setText("IDLE/PERF"); me["Simple_R6"].setText("STATUS/XLOAD "); me["Simple_R6S"].setText("SOFTWARE "); - me["Simple_R4S"].setText("PILOT STORED "); + 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"); @@ -2273,7 +2303,7 @@ var canvas_MCDU_base = { if (systems.ADIRS.Operating.aligned[0].getValue()) { # TODO real FMGC1 GPS data me["Simple_R1"].setText(latlog); me["Simple_R1"].setColor(GREEN); - me["Simple_L2S"].setText(sprintf("%16s","3IRS/GPS")); + me["Simple_L2S"].setText(sprintf(" %16s","3IRS/GPS")); } else { me["Simple_R1"].setText("----.--/-----.--"); me["Simple_R1"].setColor(WHITE); @@ -2283,7 +2313,7 @@ var canvas_MCDU_base = { if (systems.ADIRS.Operating.aligned[1].getValue()) { # TODO real FMGC2 GPS data me["Simple_R2"].setText(latlog); me["Simple_R2"].setColor(GREEN); - me["Simple_L3S"].setText(sprintf("%16s","3IRS/GPS")); + me["Simple_L3S"].setText(sprintf(" %16s","3IRS/GPS")); } else { me["Simple_R2"].setText("----.--/-----.--"); me["Simple_R2"].setColor(WHITE); @@ -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,21 +2469,21 @@ 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"); me["Simple_C6S"].setText("GPS ALT"); me["Simple_R2S"].setText("GS"); me["Simple_R3S"].setText("MODE/SAT"); - me["Simple_R3"].setText("NAV/" ~ sprintf("%s",int((rand() * 2) - 1) + 6) ~ " "); + me["Simple_R3"].setText("NAV/" ~ sprintf("%s",int((rand() * 2) - 1) + 6) ~ " "); me["Simple_R5S"].setText("GS"); me["Simple_R6S"].setText("MODE/SAT"); - me["Simple_R6"].setText("NAV/" ~ sprintf("%s",int((rand() * 2) - 1) + 6) ~ " "); + me["Simple_R6"].setText("NAV/" ~ sprintf("%s",int((rand() * 2) - 1) + 6) ~ " "); pageSwitch[i].setBoolValue(1); } me["Simple_L1"].setText(me.getLatLogFormatted2("/position/")); diff --git a/Nasal/MCDU/CLOSESTAIRPORT.nas b/Nasal/MCDU/CLOSESTAIRPORT.nas index 9fedc938..a50781fe 100644 --- a/Nasal/MCDU/CLOSESTAIRPORT.nas +++ b/Nasal/MCDU/CLOSESTAIRPORT.nas @@ -39,7 +39,9 @@ var closestAirportPage = { me.title = "CLOSEST AIRPORTS"; me.C1[1] = " BRG DIST"; me.R1[1] = "UTC "; - me.L5 = ["[ ]", nil, "blu"]; + 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); } diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index d28566ef..e3531552 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -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") { diff --git a/Nasal/MCDU/STATUS.nas b/Nasal/MCDU/STATUS.nas deleted file mode 100644 index 754cac62..00000000 --- a/Nasal/MCDU/STATUS.nas +++ /dev/null @@ -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; - } - } -} From 2144bfef21197cbeb2ea9edc06b60d19652bd14f Mon Sep 17 00:00:00 2001 From: Jonathan Redpath <legoboyvdlp@gmail.com> Date: Sat, 15 Jan 2022 17:59:13 +0000 Subject: [PATCH 11/11] CLOSEST AIRPORT - add extra indicator --- Nasal/MCDU/CLOSESTAIRPORT.nas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Nasal/MCDU/CLOSESTAIRPORT.nas b/Nasal/MCDU/CLOSESTAIRPORT.nas index a50781fe..0732fe06 100644 --- a/Nasal/MCDU/CLOSESTAIRPORT.nas +++ b/Nasal/MCDU/CLOSESTAIRPORT.nas @@ -40,7 +40,7 @@ var closestAirportPage = { me.C1[1] = " BRG DIST"; me.R1[1] = "UTC "; me.L5 = ["[ ]", nil, "blu"]; - me.C5 = [nil, nil, "grn"]; + me.C5 = [nil, me.frozen ? "LIST FROZEN" : nil, "grn"]; me.R5 = [nil, nil, "grn"]; me.L6 = [" FREEZE", nil, "blu"]; me.R6 = ["EFOB/WIND ", nil, "wht"]; @@ -113,7 +113,7 @@ var closestAirportPage = { me.C4 = [sprintf("%03d",me.cdVector[3][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[3][1]), nil, "grn"]; } if (me.manAirport != nil) { - me.C5 = [sprintf("%03d",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]), me.frozen ? "LIST FROZEN" : nil, "grn"]; } canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); }, @@ -131,7 +131,7 @@ var closestAirportPage = { me.manAirport = airportinfo(id); me.L5 = [id, nil, "grn"]; me.R5 = ["----", nil, "grn"]; - mcdu_scratchpad.scratchpads[i].empty(); + mcdu_scratchpad.scratchpads[me.computer].empty(); } canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); }