Skip to content

Commit

Permalink
DED: Fix special number chars were not shown correct on HUD.
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiVChr committed Jan 20, 2022
1 parent cc9c142 commit b7881e1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Nasal/ded.nas
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ var dataEntryDisplay = {
me.line3.setText(me.text[2]);
me.line4.setText(me.text[3]);
me.line5.setText(me.text[4]);

if (me.page == pLIST) {
me.updateListHUD();
} elsif (me.page == pMISC) {
me.updateMiscHUD();
}

me.pageLast = me.page;

Expand Down Expand Up @@ -622,6 +628,14 @@ var dataEntryDisplay = {
me.text[3] = sprintf(" "~utf8.chstr(0xFB57)~"EWS "~utf8.chstr(0xFB58)~"MODE "~utf8.chstr(0xFB59)~"VRP "~utf8.chstr(0xFB50)~"MISC ");
me.text[4] = sprintf(" ");
},

updateListHUD: func() {
me.text[0] = sprintf(" LIST %s ", me.no);
me.text[1] = sprintf(" 1DEST 2BNGO 3VIP RINTG ");
me.text[2] = sprintf(" 4NAV 5MAN 6INS EDLNK ");
me.text[3] = sprintf(" 7EWS 8MODE 9VRP 0MISC ");
me.text[4] = sprintf(" ");
},

updateDest: func() {
var lat = "";
Expand Down Expand Up @@ -763,6 +777,14 @@ var dataEntryDisplay = {
me.text[3] = sprintf(" "~utf8.chstr(0xFB57)~"DRNG "~utf8.chstr(0xFB58)~"BULL "~utf8.chstr(0xFB59)~"WPT "~utf8.chstr(0xFB50)~"HARM ");
me.text[4] = sprintf(" ");
},

updateMiscHUD: func() {
me.text[0] = sprintf(" MISC %s ", me.no);
me.text[1] = sprintf(" 1CORR 2MAGV 3OFP RHMCS ");
me.text[2] = sprintf(" 4INSM 5LASR 6GPS E ");
me.text[3] = sprintf(" 7DRNG 8BULL 9WPT 0HARM ");
me.text[4] = sprintf(" ");
},

updateMagv: func() {
var amount = geo.normdeg180(getprop("orientation/heading-deg")-getprop("orientation/heading-magnetic-deg"));
Expand Down

0 comments on commit b7881e1

Please sign in to comment.