diff --git a/Models/Instruments/ND/canvas/framework/navdisplay.nas b/Models/Instruments/ND/canvas/framework/navdisplay.nas
index 6e3243b1..eb865dd1 100644
--- a/Models/Instruments/ND/canvas/framework/navdisplay.nas
+++ b/Models/Instruments/ND/canvas/framework/navdisplay.nas
@@ -212,7 +212,8 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
# because things are much better configurable that way
# now look up all required SVG elements and initialize member fields using the same name to have a convenient handle
foreach(var element; ["dmeL","dmeR","vorL","vorR","vorLId","vorRId",
- "status.wxr","status.wpt","status.sta","status.arpt","terrHI","terrLO","TerrLabel","terrAhead","terrAltGroup"])
+ "status.wxr","status.wpt","status.sta","status.arpt","terrHI","terrLO","TerrLabel","terrAhead","terrAltGroup",
+ "vorLIdtuneMode","vorRIdtuneMode"])
me.symbols[element] = me.nd.getElementById(element);
foreach(var element; ["dmeLDist","dmeRDist"])
@@ -572,7 +573,31 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
var dme1_path = "/instrumentation/dme[2]";
var dme2_path = "/instrumentation/dme[3]";
+
+ if(me.get_switch("toggle_lh_vor_adf") == 1) {
+ if (fmgc.FMGCInternal.VOR1.freqSet) {
+ me.symbols.vorLIdtuneMode.show();
+ } else {
+ me.symbols.vorLIdtuneMode.hide();
+ }
+ } else if(me.get_switch("toggle_lh_vor_adf") == -1) {
+ if (fmgc.FMGCInternal.ADF1.freqSet) {
+ me.symbols.vorLIdtuneMode.show();
+ } else {
+ me.symbols.vorLIdtuneMode.hide();
+ }
+ } else {
+ me.symbols.vorLIdtuneMode.hide();
+ }
+
if(me.get_switch("toggle_rh_vor_adf") == 1) {
+
+ if (fmgc.FMGCInternal.VOR2.freqSet) {
+ me.symbols.vorRIdtuneMode.show();
+ } else {
+ me.symbols.vorRIdtuneMode.hide();
+ }
+
me.symbols.vorR.setText("VOR R");
me.symbols.vorR.setColor(0.195,0.96,0.097);
me.symbols.dmeR.setText("DME");
@@ -587,6 +612,13 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
else me.symbols.dmeRDist.setText(" ---");
me.symbols.dmeRDist.setColor(0.195,0.96,0.097);
} elsif(me.get_switch("toggle_rh_vor_adf") == -1) {
+
+ if (fmgc.FMGCInternal.ADF2.freqSet) {
+ me.symbols.vorRIdtuneMode.show();
+ } else {
+ me.symbols.vorRIdtuneMode.hide();
+ }
+
me.symbols.vorR.setText("ADF R");
me.symbols.vorR.setColor(0,0.6,0.85);
me.symbols.dmeR.setText("");
@@ -598,6 +630,7 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
me.symbols.dmeRDist.setText("");
me.symbols.dmeRDist.setColor(0,0.6,0.85);
} else {
+ me.symbols.vorRIdtuneMode.hide();
me.symbols.vorR.setText("");
me.symbols.dmeR.setText("");
me.symbols.vorRId.setText("");
diff --git a/Models/Instruments/ND/canvas/res/airbusND.svg b/Models/Instruments/ND/canvas/res/airbusND.svg
index 363030ba..281ec49e 100644
--- a/Models/Instruments/ND/canvas/res/airbusND.svg
+++ b/Models/Instruments/ND/canvas/res/airbusND.svg
@@ -1,19 +1,19 @@
\ No newline at end of file
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:53.3333px;line-height:0%;font-family:'Liberation Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#0dc04b;fill-opacity:1;stroke:none"
+ x="510.7153"
+ y="537.58936"
+ id="nd_msg_change"
+ inkscape:label="#text3401">RANGE CHANGE
+
diff --git a/Models/Instruments/ND/canvas/style.nas b/Models/Instruments/ND/canvas/style.nas
index 01085a97..1c614939 100644
--- a/Models/Instruments/ND/canvas/style.nas
+++ b/Models/Instruments/ND/canvas/style.nas
@@ -798,7 +798,7 @@ canvas.NDStyles["Airbus"] = {
if(nd.get_switch("toggle_display_mode") == "APP")
nd.symbols.ilsLbl.setText("ILS");
else
- nd.symbols.ilsLbl.setText("VOR 1");
+ nd.symbols.ilsLbl.setText("VOR1");
},
is_false: func(nd) nd.symbols.ilsLbl.hide(),
},
@@ -1660,13 +1660,13 @@ canvas.NDStyles["Airbus"] = {
is_true: func(nd) {
nd.symbols.dmeL.show();
if(nd.get_switch("toggle_lh_vor_adf") < 0){
- nd.symbols.vorL.setText("ADF 1");
+ nd.symbols.vorL.setText("ADF1");
nd.symbols.vorL.setColor(0.195,0.96,0.097);
nd.symbols.vorLId.setColor(0.195,0.96,0.097);
#nd.symbols.dmeLDist.setColor(0.195,0.96,0.097);
nd.symbols.dmeL.setText("");
} else {
- nd.symbols.vorL.setText("VOR 1");
+ nd.symbols.vorL.setText("VOR1");
nd.symbols.vorL.setColor(1,1,1);
nd.symbols.vorLId.setColor(1,1,1);
#nd.symbols.dmeLDist.setColor(1,1,1);
@@ -1687,12 +1687,12 @@ canvas.NDStyles["Airbus"] = {
is_true: func(nd) {
nd.symbols.dmeR.show();
if(nd.get_switch("toggle_rh_vor_adf") < 0){
- nd.symbols.vorR.setText("ADF 2");
+ nd.symbols.vorR.setText("ADF2");
nd.symbols.vorR.setColor(0.195,0.96,0.097);
nd.symbols.vorRId.setColor(0.195,0.96,0.097);
nd.symbols.dmeR.setText("");
} else {
- nd.symbols.vorR.setText("VOR 2");
+ nd.symbols.vorR.setText("VOR2");
nd.symbols.vorR.setColor(1,1,1);
nd.symbols.vorRId.setColor(1,1,1);
#nd.symbols.dmeRDist.setColor(1,1,1);
@@ -1718,10 +1718,11 @@ canvas.NDStyles["Airbus"] = {
var adf = "instrumentation/adf/";
var navident = getprop(adf~ "ident");
var frq = getprop(adf~ "frequencies/selected-khz");
- if(navident != "")
+ if(navident != "") {
nd.symbols.vorLId.setText(navident);
- else
+ } else {
nd.symbols.vorLId.setText(sprintf("%3d", frq));
+ }
nd.symbols.dmeLDist.setText("");
} else {
var nav = nd.get_nav_path("vor", 0);
@@ -1730,10 +1731,11 @@ canvas.NDStyles["Airbus"] = {
var dme = nd.get_nav_path("dme", 0);
var dst = getprop(dme~ "indicated-distance-nm");
#print(dme~ "indicated-distance-nm");
- if(getprop(nav~ "in-range"))
+ if(getprop(nav~ "in-range")) {
nd.symbols.vorLId.setText(navID);
- else
+ } else {
nd.symbols.vorLId.setText(frq);
+ }
if(getprop(dme~ "in-range"))
nd.symbols.dmeLDist.setText(sprintf("%3.1f",
dst));
@@ -1775,10 +1777,11 @@ canvas.NDStyles["Airbus"] = {
var adf = "instrumentation/adf[1]/";
var navident = getprop(adf~ "ident");
var frq = getprop(adf~ "frequencies/selected-khz");
- if(navident != "")
+ if(navident != "") {
nd.symbols.vorRId.setText(navident);
- else
+ } else {
nd.symbols.vorRId.setText(sprintf("%3d", frq));
+ }
nd.symbols.dmeRDist.setText("");
} else {
var nav = nd.get_nav_path("vor", 1);
@@ -1787,10 +1790,11 @@ canvas.NDStyles["Airbus"] = {
var dme = nd.get_nav_path("dme", 1);
var dst = getprop(dme~ "indicated-distance-nm");
#print(dme~ "indicated-distance-nm");
- if(getprop(nav~ "in-range"))
+ if(getprop(nav~ "in-range")) {
nd.symbols.vorRId.setText(navID);
- else
+ } else {
nd.symbols.vorRId.setText(frq);
+ }
if(getprop(dme~ "in-range"))
nd.symbols.dmeRDist.setText(sprintf("%3.1f",
dst));
diff --git a/Nasal/MCDU/DATA.nas b/Nasal/MCDU/DATA.nas
index c44a615a..479559dc 100644
--- a/Nasal/MCDU/DATA.nas
+++ b/Nasal/MCDU/DATA.nas
@@ -11,13 +11,13 @@ var dataInput = func(key, i) {
setprop("MCDU[" ~ i ~ "]/page", "GPSMON");
} elsif (key == "L5") {
if (canvas_mcdu.myClosestAirport[i] != nil) {
- canvas_mcdu.myClosestAirport[i].del();
+ canvas_mcdu.myClosestAirport[i].del();
}
canvas_mcdu.myClosestAirport[i] = nil;
canvas_mcdu.myClosestAirport[i] = closestAirportPage.new(i);
setprop("MCDU[" ~ i ~ "]/page", "CLOSESTAIRPORT");
} elsif (key == "R5") {
- setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
+ mcdu_message(i, "PRINTER NOT AVAILABLE");
}
}
diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas
index a8a69542..c1e8fd8d 100644
--- a/Nasal/MCDU/MCDU.nas
+++ b/Nasal/MCDU/MCDU.nas
@@ -256,10 +256,6 @@ var lskbutton = func(btn, i) {
radnavInput("L1",i);
} else if (page == "DATA") {
dataInput("L1",i);
- } else if (page == "PRINTFUNC") {
- printInput("L1",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("L1",i);
} else if (page == "LATREV") {
if (canvas_mcdu.myLatRev[i].type == 0) {
if (canvas_mcdu.myDeparture[i] != nil) {
@@ -412,10 +408,6 @@ var lskbutton = func(btn, i) {
perfDESInput("L2",i);
} else if (page == "DATA") {
dataInput("L2",i);
- } else if (page == "PRINTFUNC") {
- printInput("L2",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("L2",i);
} else if (page == "F-PLNA" or page == "F-PLNB") {
canvas_mcdu.myFpln[i].pushButtonLeft(2);
} else if (page == "DEPARTURE") {
@@ -541,10 +533,6 @@ var lskbutton = func(btn, i) {
radnavInput("L3",i);
} else if (page == "DATA") {
dataInput("L3",i);
- } else if (page == "PRINTFUNC") {
- printInput("L3",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("L3",i);
} else if (page == "F-PLNA" or page == "F-PLNB") {
canvas_mcdu.myFpln[i].pushButtonLeft(3);
} else if (page == "DEPARTURE") {
@@ -668,8 +656,6 @@ var lskbutton = func(btn, i) {
perfAPPRInput("L4",i);
} else if (page == "RADNAV") {
radnavInput("L4",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("L4",i);
} else if (page == "F-PLNA" or page == "F-PLNB") {
canvas_mcdu.myFpln[i].pushButtonLeft(4);
} else if (page == "DEPARTURE") {
@@ -788,10 +774,6 @@ var lskbutton = func(btn, i) {
perfGAInput("L5",i);
} else if (page == "RADNAV") {
radnavInput("L5",i);
- } else if (page == "PRINTFUNC") {
- printInput("L5",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("L5",i);
} else if (page == "DATA") {
dataInput("L5",i);
} else if (page == "DATA2") {
@@ -859,8 +841,6 @@ var lskbutton = func(btn, i) {
perfAPPRInput("L6",i);
} else if (page == "PERFGA") {
perfGAInput("L6",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("L6",i);
} else if (page == "F-PLNA" or page == "F-PLNB") {
canvas_mcdu.myFpln[i].pushButtonLeft(6);
} else if (page == "LATREV" or page == "VERTREV" or page == "DUPLICATENAMES") {
@@ -938,10 +918,6 @@ var rskbutton = func(btn, i) {
canvas_mcdu.myDESWIND[i].pushButtonRight(1);
} else if (page == "RADNAV") {
radnavInput("R1",i);
- } else if (page == "PRINTFUNC") {
- printInput("R1",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("R1",i);
} else if (page == "LATREV") {
if (canvas_mcdu.myLatRev[i].type == 1) {
if (canvas_mcdu.myArrival[i] != nil) {
@@ -1023,10 +999,6 @@ var rskbutton = func(btn, i) {
perfAPPRInput("R2",i);
} else if (page == "RADNAV") {
radnavInput("R2",i);
- } else if (page == "PRINTFUNC") {
- printInput("R2",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("R2",i);
} else if (page == "DEPARTURE") {
canvas_mcdu.myDeparture[i].depPushbuttonRight(2);
} else if (page == "ARRIVAL") {
@@ -1070,10 +1042,6 @@ var rskbutton = func(btn, i) {
perfTOInput("R3",i);
} else if (page == "PERFAPPR") {
perfAPPRInput("R3",i);
- } else if (page == "PRINTFUNC") {
- printInput("R3",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("R3",i);
} else if (page == "DEPARTURE") {
canvas_mcdu.myDeparture[i].depPushbuttonRight(3);
} else if (page == "ARRIVAL") {
@@ -1163,8 +1131,6 @@ var rskbutton = func(btn, i) {
perfAPPRInput("R4",i);
} else if (page == "RADNAV") {
radnavInput("R4",i);
- } else if (page == "PRINTFUNC2") {
- printInput2("R4",i);
} else if (page == "DEPARTURE") {
canvas_mcdu.myDeparture[i].depPushbuttonRight(4);
} else if (page == "ARRIVAL") {
@@ -1301,7 +1267,7 @@ var rskbutton = func(btn, i) {
perfDESInput("R6",i);
} else if (page == "PERFAPPR") {
perfAPPRInput("R6",i);
- } else if ((page == "DATA") or (page == "PRINTFUNC") or (page == "PRINTFUNC2")) {
+ } else if (page == "DATA") {
mcdu_message(i, "AOC DISABLED");
} else if (page == "INITA") {
initInputA("R6",i);
@@ -1362,10 +1328,6 @@ var arrowbutton = func(btn, i) {
}
} else if (page == "INITB" or page == "FUELPRED") {
pageNode[i].setValue("INITA");
- } else if (page == "PRINTFUNC") {
- pageNode[i].setValue("PRINTFUNC2");
- } else if (page == "PRINTFUNC2") {
- pageNode[i].setValue("PRINTFUNC");
} else if (page == "DEPARTURE") {
canvas_mcdu.myDeparture[i].scrollLeft();
} else if (page == "ARRIVAL") {
@@ -1406,10 +1368,6 @@ var arrowbutton = func(btn, i) {
}
} else if (page == "INITB" or page == "FUELPRED") {
pageNode[i].setValue("INITA");
- } else if (page == "PRINTFUNC") {
- pageNode[i].setValue("PRINTFUNC2");
- } else if (page == "PRINTFUNC2") {
- pageNode[i].setValue("PRINTFUNC");
} else if (page == "DEPARTURE") {
canvas_mcdu.myDeparture[i].scrollRight();
} else if (page == "ARRIVAL") {
diff --git a/Nasal/MCDU/RADNAV.nas b/Nasal/MCDU/RADNAV.nas
index d7056561..528a384a 100644
--- a/Nasal/MCDU/RADNAV.nas
+++ b/Nasal/MCDU/RADNAV.nas
@@ -30,7 +30,7 @@ var parseFrequencyVOR = func(scratchpad, i, num) {
var searchResultVOR = nil;
var parseIdentVOR = func(scratchpad, i, num) {
# TODO - duplicate names
- if (size(scratchpad) == 3) {
+ if (size(scratchpad) == 2 or size(scratchpad) == 3) {
searchResultVOR = findNavaidsByID(scratchpad);
if (size(searchResultVOR) != 0) {
pts.Instrumentation.Nav.Frequencies.selectedMhz[num].setValue(searchResultVOR[0].frequency / 100);