1
0
Fork 0

Merge branch 'dev' into new-flightplan

This commit is contained in:
Jonathan Redpath 2022-02-09 16:38:08 +00:00
commit 8f5649c338
5 changed files with 120 additions and 70 deletions

View file

@ -56,6 +56,8 @@
the aircraft is the most produced airliner ever, with over 9,500 built to date. It was one of the first airliners
to use digital flight controls and fly by wire, and a fully glass cockpit.</long-description>
<expected-aircraft-dir-name>A320-family</expected-aircraft-dir-name>
<hud n="0">
<enable3d n="0">false</enable3d>
<enable3d n="1">false</enable3d>
@ -574,7 +576,7 @@
<z-offset-max-m type="float">300.0</z-offset-max-m>
</current-view>
<minimum-fg-version>2019.2.0</minimum-fg-version>
<minimum-fg-version>2020.3.12</minimum-fg-version>
<navdb>
<min-runway-length-ft>3000</min-runway-length-ft>

View file

@ -442,6 +442,32 @@ var canvas_MCDU_base = {
me["Simple_R5S"].setFont("HoneywellMCDUSmall.ttf");
me["Simple_R5S"].setFontSize(small);
}
if (page == "RECEIVEDMSG" or page == "ATISDETAIL") {
if (page == "RECEIVEDMSG") {
me["Simple_L2S"].setFontSize(normal);
me["Simple_L3S"].setFontSize(normal);
me["Simple_L4S"].setFontSize(normal);
me["Simple_L5S"].setFontSize(normal);
} else {
me["Simple_L2S"].setFontSize(small);
me["Simple_L3S"].setFontSize(small);
me["Simple_L4S"].setFontSize(small);
me["Simple_L5S"].setFontSize(small);
}
me["Simple_L2S"].setFont("HoneywellMCDU.ttf");
me["Simple_L3S"].setFont("HoneywellMCDU.ttf");
me["Simple_L4S"].setFont("HoneywellMCDU.ttf");
me["Simple_L5S"].setFont("HoneywellMCDU.ttf");
} else {
me["Simple_L2S"].setFont("HoneywellMCDUSmall.ttf");
me["Simple_L2S"].setFontSize(small);
me["Simple_L3S"].setFont("HoneywellMCDUSmall.ttf");
me["Simple_L3S"].setFontSize(small);
me["Simple_L4S"].setFont("HoneywellMCDUSmall.ttf");
me["Simple_L4S"].setFontSize(small);
me["Simple_L5S"].setFont("HoneywellMCDUSmall.ttf");
me["Simple_L5S"].setFontSize(small);
}
if (page == "IRSMON") {
me["Simple_R1S"].setFont("HoneywellMCDU.ttf");
me["Simple_R1S"].setFontSize(normal);
@ -941,11 +967,11 @@ var canvas_MCDU_base = {
me["Simple_L1"].setText(" WEATHER TYPE");
me["Simple_L1S"].setText(" " ~ atsu.AOC.selectedType);
me["Simple_R1S"].setText("STA 1 ");
me["Simple_R1S"].setText("STA 1");
me["Simple_R2"].setText("[ ]");
me["Simple_R2S"].setText("STA 2 ");
me["Simple_R2S"].setText("STA 2");
me["Simple_R3"].setText("[ ]");
me["Simple_R3S"].setText("STA 3 ");
me["Simple_R3S"].setText("STA 3");
pageSwitch[i].setBoolValue(1);
}
@ -1029,12 +1055,8 @@ var canvas_MCDU_base = {
if (mcdu.ReceivedMessagesDatabase.getCountPages() > 1) {
me["Simple_PageNum"].show();
me["Simple_PageNum"].setText(myReceivedMessages[i].getPageNumStr());
me["ArrowLeft"].show();
me["ArrowRight"].show();
} else {
me["Simple_PageNum"].hide();
me["ArrowLeft"].hide();
me["ArrowRight"].hide();
}
me.dynamicPageArrowFunc(myReceivedMessages[i]);
@ -1069,7 +1091,7 @@ var canvas_MCDU_base = {
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
me.fontSizeLeft(small, small, small, small, small, normal);
me.fontSizeLeft(normal, normal, normal, normal, normal, normal);
me.fontSizeCenter(normal, normal, normal, normal, normal, normal);
me.fontSizeRight(normal, normal, normal, normal, normal, normal);
@ -4145,7 +4167,7 @@ var canvas_MCDU_base = {
me["Simple_C1S"].setText("FLP RETR");
me["Simple_C2S"].setText("SLT RETR");
me["Simple_C3S"].setText("CLEAN ");
me["Simple_C3S"].setText(" CLEAN");
} else if (page == "PERFCLB") {
if (!pageSwitch[i].getBoolValue()) {
@ -4622,7 +4644,7 @@ var canvas_MCDU_base = {
}
me["Simple_L0S"].setText("DEST");
me["Simple_L1S"].setText("QNH");
me["Simple_L1S"].setText(" QNH");
if (dest_qnh.getValue() != -1) {
if (dest_qnh.getValue() < 100) {
me["Simple_L1"].setText(sprintf("%4.2f", dest_qnh.getValue()));
@ -4630,7 +4652,7 @@ var canvas_MCDU_base = {
me["Simple_L1"].setText(sprintf("%4.0f", dest_qnh.getValue()));
}
} else {
me["Simple_L1"].setText("[ ] ");
me["Simple_L1"].setText("[ ]");
}
me["Simple_L2S"].setText("TEMP");
@ -4643,9 +4665,7 @@ var canvas_MCDU_base = {
me["Simple_L3S"].setText("MAG WIND");
if (fmgc.FMGCInternal.destMagSet and fmgc.FMGCInternal.destWindSet) {
me["Simple_L3"].setText(sprintf("%03.0f°", fmgc.FMGCInternal.destMag) ~ sprintf("/%.0f", fmgc.FMGCInternal.destWind));
me["Simple_L3"].setFontSize(normal);
} else {
me["Simple_L3"].setFontSize(small);
if (myDESWIND[i] != nil and myDESWIND[i].returnGRND() != nil) {
var result = myDESWIND[i].returnGRND();
me["Simple_L3"].setText(sprintf("%03.0f°", result[0]) ~ sprintf("/%.0f", result[1]));
@ -4675,16 +4695,16 @@ var canvas_MCDU_base = {
me["Simple_R1"].setColor(WHITE);
}
me["Simple_R2S"].setText("BARO");
me["Simple_R2S"].setText("BARO ");
if (getprop("/FMGC/internal/baro") != 99999) {
me["Simple_R2"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro")));
me.fontSizeRight(0, normal, 0, 0, 0, 0);
} else {
me["Simple_R2"].setText(" [ ]");
me["Simple_R2"].setText("[ ]");
me.fontSizeRight(0, small, 0, 0, 0, 0);
}
me["Simple_R3S"].setText("RADIO");
me["Simple_R3S"].setText("RADIO ");
if (getprop("/FMGC/internal/radio") != 99999) {
me["Simple_R3"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio")));
me.fontSizeRight(0, 0, normal, 0, 0, 0);
@ -4692,7 +4712,7 @@ var canvas_MCDU_base = {
me["Simple_R3"].setText("NO");
me.fontSizeRight(0, 0, normal, 0, 0, 0);
} else {
me["Simple_R3"].setText(" [ ]");
me["Simple_R3"].setText("[ ]");
me.fontSizeRight(0, 0, small, 0, 0, 0);
}
@ -4743,8 +4763,8 @@ var canvas_MCDU_base = {
me["Simple_C1S"].setText("FLP RETR");
me["Simple_C2S"].setText("SLT RETR");
me["Simple_C3S"].setText("CLEAN ");
me["Simple_C5S"].setText("VLS ");
me["Simple_C3S"].setText(" CLEAN");
me["Simple_C5S"].setText("VLS");
} else if (page == "PERFGA") {
if (!pageSwitch[i].getBoolValue()) {
@ -4820,7 +4840,7 @@ var canvas_MCDU_base = {
me["Simple_C1S"].setText("FLP RETR");
me["Simple_C2S"].setText("SLT RETR");
me["Simple_C3S"].setText("CLEAN ");
me["Simple_C3S"].setText(" CLEAN");
} else if (page == "WINDCLB" or page == "WINDCRZ" or page == "WINDDES" or page == "WINDHIST") {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHideWithCenter();

View file

@ -953,6 +953,7 @@ var rskbutton = func(btn, i) {
} else if (page == "AOCMENU") {
pageNode[i].setValue("FLTLOG");
} else if (page == "WEATHERREQ") {
if (mcdu_scratchpad.scratchpads[i].scratchpad != "CLR") {
var result = atsu.AOC.newStation(mcdu_scratchpad.scratchpads[i].scratchpad, i);
if (result == 1) {
mcdu_message(i, "NOT ALLOWED");
@ -961,6 +962,11 @@ var rskbutton = func(btn, i) {
} else {
mcdu_scratchpad.scratchpads[i].empty();
}
} else {
atsu.AOC.sent = 0;
atsu.AOC.received = 0;
atsu.AOC.station = nil;
}
} else if (page == "WEATHERTYPE") {
atsu.AOC.selectedType = "TERM FCST";
pageNode[i].setValue("WEATHERREQ");

View file

@ -20,7 +20,7 @@ var receivedMessagesPage = {
computer: nil,
size: 0,
getPageNumStr: func() {
return me.curPage ~ "/" ~ ReceivedMessagesDatabase.getCountPages();
return " " ~ sprintf("%02d",me.curPage) ~ "/" ~ sprintf("%02d",ReceivedMessagesDatabase.getCountPages());
},
new: func(computer) {
var ap = {parents:[receivedMessagesPage]};
@ -61,7 +61,7 @@ var receivedMessagesPage = {
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
},
_setupPageWithData: func() {
me.title = "RECEIVED MESSAGES ";
me.title = "ACARS - RCVD MSGS ";
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"]];
@ -74,7 +74,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + -4) {
message = ReceivedMessagesDatabase.database.vector[-5 + (me.curPage * 5)];
me.L1[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L1[0] = " " ~ left(message.body, size(message.body) > 17 ? 17 : size(message.body));
me.L1[2] = "blu";
if (!message.viewed) {
me.L1[1] = " " ~ message.time ~ " NEW";
@ -86,7 +86,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + -3) {
message = ReceivedMessagesDatabase.database.vector[-4 + (me.curPage * 5)];
me.L2[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L2[0] = " " ~ left(message.body, size(message.body) > 17 ? 17 : size(message.body));
me.L2[2] = "blu";
if (!message.viewed) {
me.L2[1] = " " ~ message.time ~ " NEW";
@ -98,7 +98,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + -2) {
message = ReceivedMessagesDatabase.database.vector[-3 + (me.curPage * 5)];
me.L3[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L3[0] = " " ~ left(message.body, size(message.body) > 17 ? 17 : size(message.body));
me.L3[2] = "blu";
if (!message.viewed) {
me.L3[1] = " " ~ message.time ~ " NEW";
@ -110,7 +110,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + -1) {
message = ReceivedMessagesDatabase.database.vector[-2 + (me.curPage * 5)];
me.L4[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L4[0] = " " ~ left(message.body, size(message.body) > 17 ? 17 : size(message.body));
me.L4[2] = "blu";
if (!message.viewed) {
me.L4[1] = " " ~ message.time ~ " NEW";
@ -122,7 +122,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + 0) {
message = ReceivedMessagesDatabase.database.vector[-1 + (me.curPage * 5)];
me.L5[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L5[0] = " " ~ left(message.body, size(message.body) > 17 ? 17 : size(message.body));
me.L5[2] = "blu";
if (!message.viewed) {
me.L5[1] = " " ~ message.time ~ " NEW";
@ -239,37 +239,37 @@ var receivedMessagePage = {
me.L1[1] = message.time;
me.C1[1] = "VIEWED";
me.C1[2] = "grn";
me.R1[1] = me.curPage ~ "/" ~ ReceivedMessagesDatabase.getSize();
me.R1[1] = sprintf("%02d",me.curPage) ~ "/" ~ sprintf("%02d",ReceivedMessagesDatabase.getSize());
me.L1[0] = left(message.body, size(message.body) > 30 ? 30 : size(message.body));
me.L1[0] = left(message.body, size(message.body) > 24 ? 24 : size(message.body));
me.L1[2] = "wht";
me.L2[2] = "wht";
me.L3[2] = "wht";
me.L4[2] = "wht";
me.L5[2] = "wht";
if (size(message.body) > 30) {
me.L2[1] = left(split(me.L1[0], message.body)[1], size(message.body) > 60 ? 30 : size(message.body) - 30);
if (size(message.body) > 24) {
me.L2[1] = left(split(me.L1[0], message.body)[1], size(message.body) > 48 ? 24 : size(message.body) - 24);
}
if (size(message.body) > 60) {
me.L2[0] = left(split(me.L2[1], message.body)[1], size(message.body) > 90 ? 30 : size(message.body) - 60);
if (size(message.body) > 48) {
me.L2[0] = left(split(me.L2[1], message.body)[1], size(message.body) > 72 ? 24 : size(message.body) - 48);
}
if (size(message.body) > 90) {
me.L3[1] = left(split(me.L2[0], message.body)[1], size(message.body) > 120 ? 30 : size(message.body) - 90);
if (size(message.body) > 72) {
me.L3[1] = left(split(me.L2[0], message.body)[1], size(message.body) > 96 ? 24 : size(message.body) - 72);
}
if (size(message.body) > 96) {
me.L3[0] = left(split(me.L3[1], message.body)[1], size(message.body) > 120 ? 24 : size(message.body) - 96);
}
if (size(message.body) > 120) {
me.L3[0] = left(split(me.L3[1], message.body)[1], size(message.body) > 150 ? 30 : size(message.body) - 120);
me.L4[1] = left(split(me.L3[0], message.body)[1], size(message.body) > 144 ? 24 : size(message.body) - 120);
}
if (size(message.body) > 150) {
me.L4[1] = left(split(me.L3[0], message.body)[1], size(message.body) > 180 ? 30 : size(message.body) - 150);
if (size(message.body) > 144) {
me.L4[0] = left(split(me.L4[1], message.body)[1], size(message.body) > 168 ? 24 : size(message.body) - 144);
}
if (size(message.body) > 180) {
me.L4[0] = left(split(me.L4[1], message.body)[1], size(message.body) > 210 ? 30 : size(message.body) - 180);
if (size(message.body) > 168) {
me.L5[1] = left(split(me.L4[0], message.body)[1], size(message.body) > 192 ? 24 : size(message.body) - 168);
}
if (size(message.body) > 210) {
me.L5[1] = left(split(me.L4[0], message.body)[1], size(message.body) > 240 ? 30 : size(message.body) - 210);
}
if (size(message.body) > 240) {
me.L5[0] = left(split(me.L5[1], message.body)[1], size(message.body) > 270 ? 30 : size(message.body) - 240);
if (size(message.body) > 192) {
me.L5[0] = left(split(me.L5[1], message.body)[1], size(message.body) > 216 ? 24 : size(message.body) - 192);
}
}
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);

View file

@ -145,6 +145,7 @@
<callout>
<name>V1</name>
<mode>once</mode>
<type>avionics</type>
<path>Aircraft/A320-family/Sounds/V1.wav</path>
<condition>
<and>
@ -183,6 +184,7 @@
<name>2500</name>
<path>Aircraft/A320-family/Sounds/GPWS/2500.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -226,6 +228,7 @@
<name>2000</name>
<path>Aircraft/A320-family/Sounds/GPWS/2000.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -269,6 +272,7 @@
<name>1000</name>
<path>Aircraft/A320-family/Sounds/GPWS/1000.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -312,6 +316,7 @@
<name>500</name>
<path>Aircraft/A320-family/Sounds/GPWS/500.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -355,6 +360,7 @@
<name>400</name>
<path>Aircraft/A320-family/Sounds/GPWS/400.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -398,6 +404,7 @@
<name>300</name>
<path>Aircraft/A320-family/Sounds/GPWS/300.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -441,6 +448,7 @@
<name>200</name>
<path>Aircraft/A320-family/Sounds/GPWS/200.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -484,6 +492,7 @@
<name>100</name>
<path>Aircraft/A320-family/Sounds/GPWS/100.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -527,6 +536,7 @@
<name>50</name>
<path>Aircraft/A320-family/Sounds/GPWS/50.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -566,6 +576,7 @@
<name>40</name>
<path>Aircraft/A320-family/Sounds/GPWS/40.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -605,6 +616,7 @@
<name>30</name>
<path>Aircraft/A320-family/Sounds/GPWS/30.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -644,6 +656,7 @@
<name>20</name>
<path>Aircraft/A320-family/Sounds/GPWS/20.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -683,6 +696,7 @@
<name>10</name>
<path>Aircraft/A320-family/Sounds/GPWS/10.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -736,6 +750,7 @@
<name>5</name>
<path>Aircraft/A320-family/Sounds/GPWS/5.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -787,6 +802,7 @@
<name>100above</name>
<path>Aircraft/A320-family/Sounds/GPWS/100-above.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -822,6 +838,7 @@
<name>Minimum</name>
<path>Aircraft/A320-family/Sounds/GPWS/minimum.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<and>
<equals>
@ -859,6 +876,7 @@
<name>retard</name>
<path>Aircraft/A320-family/Sounds/GPWS/retard.wav</path>
<mode>looped</mode>
<type>avionics</type>
<condition>
<and>
<greater-than>
@ -939,6 +957,7 @@
<name>retard2</name>
<path>Aircraft/A320-family/Sounds/GPWS/retard.wav</path>
<mode>looped</mode>
<type>avionics</type>
<condition>
<property>/sim/sound/warnings/retard</property> <!-- must be EMER CANCEL -->
</condition>
@ -953,6 +972,7 @@
<apoff>
<name>apoff-looped</name>
<mode>looped</mode>
<type>avionics</type>
<path>Aircraft/A320-family/Sounds/Cockpit/calvary-charge-loop.wav</path>
<condition>
<and>
@ -983,6 +1003,7 @@
<apoff>
<name>apoff-single</name>
<mode>once</mode>
<type>avionics</type>
<path>Aircraft/A320-family/Sounds/Cockpit/calvary-charge-once.wav</path>
<condition>
<and>
@ -1013,6 +1034,7 @@
<autolandwarning>
<name>autolandwarning-single</name>
<mode>once</mode>
<type>avionics</type>
<path>Aircraft/A320-family/Sounds/Cockpit/click.wav</path>
<condition>
<equals>