Showing 3 changed files with 59 additions and 12 deletions
+8
Nasal/core.nas
... ...
@@ -58,6 +58,14 @@ var setListeners = func {
58 58
                 device[0].display.updateCOMM({tune: val});
59 59
                 device[1].display.updateCOMM({tune: val});
60 60
             }, 1, 2);
61
+    setlistener('/instrumentation/zkv1000/afcs/heading-bug-deg',
62
+            func (n) {
63
+                var val = n.getValue();
64
+                if (val != nil) {
65
+                    device[0].display.updateHDG(val);
66
+                    device[1].display.updateHDG(val);
67
+                }
68
+            }, 0, 2);
61 69
 }
62 70
 
63 71
 var deviceClass = {
+37
Nasal/display.nas
... ...
@@ -80,6 +80,8 @@ var displayClass = {
80 80
                     'bankPointer',
81 81
                     'VSI',
82 82
                     'Rose',
83
+                    'Heading-bug',
84
+                    'PFD-Widgets',
83 85
                 );
84 86
                 append(groups.hide,
85 87
                     'CDI',
... ...
@@ -88,6 +90,26 @@ var displayClass = {
88 90
                     'GPS-pointer',
89 91
                     'Bearing1',
90 92
                     'Bearing2',
93
+                    'SelectedHDG-bg',
94
+                    'SelectedHDG-bgtext',
95
+                    'SelectedHDG-text',
96
+                    'SelectedCRS-bg',
97
+                    'SelectedCRS-bgtext',
98
+                    'SelectedCRS-text',
99
+                    'SelectedALT',
100
+                    'TAS',
101
+                    'GSPD',
102
+                    'OAT',
103
+                    'BARO',
104
+                    'WindData',
105
+                    'Reversionnary',
106
+                    'Annunciation',
107
+                    'Comparator',
108
+                    'BRG1',
109
+                    'BRG2',
110
+                    'DME1',
111
+                    'PFD-Map',
112
+                    'PFD-Multilines'
91 113
                 );
92 114
                 append(groups.clip,
93 115
                     'SpeedLint1',
... ...
@@ -428,6 +450,21 @@ var displayClass = {
428 450
         settimer(func me.updateHSI(getprop('orientation/heading-deg')), 0.1);
429 451
     },
430 452
 
453
+    updateHDG : func (hdg) {
454
+        if (me.role == 'MFD')
455
+            return;
456
+        me.screenElements['Heading-bug']
457
+            .setRotation(hdg * D2R);
458
+        me.screenElements['SelectedHDG-bg']
459
+            .show();
460
+        me.screenElements['SelectedHDG-bgtext']
461
+            .show();
462
+        me.screenElements['SelectedHDG-text']
463
+            .setText(sprintf('%03d°%s', hdg, ''))
464
+            .show();
465
+        me.addTimer(3, ['SelectedHDG-text', 'SelectedHDG-bgtext', 'SelectedHDG-bg']);
466
+    },
467
+
431 468
     _updateRadio: func {
432 469
         # arg[0]._r = <comm|nav>
433 470
         if (contains(arg[0], "active")) {
+14 -12
Systems/screen.svg
... ...
@@ -6036,11 +6036,11 @@
6036 6036
           <path
6037 6037
              style="display:inline;fill:#00ffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
6038 6038
              d="m 448,443.03709 h 6.5 l 5,7.83791 5,-7.83791 H 471 V 455.375 h -23 v -12.33791"
6039
-             id="HSI-bug"
6039
+             id="Heading-bug"
6040 6040
              inkscape:connector-curvature="0"
6041 6041
              inkscape:transform-center-x="-0.00099545376"
6042 6042
              inkscape:transform-center-y="-137.29256"
6043
-             inkscape:label="HSI-bug" />
6043
+             inkscape:label="Heading-bug" />
6044 6044
         </g>
6045 6045
       </g>
6046 6046
       <g
... ...
@@ -6873,12 +6873,12 @@
6873 6873
        id="Reversionnary"
6874 6874
        inkscape:label="Reversionnary">
6875 6875
       <rect
6876
-         inkscape:label="Reversionary-bg"
6876
+         inkscape:label="Reversionnary-bg"
6877 6877
          y="176.4684"
6878 6878
          x="876.50903"
6879 6879
          height="103.98194"
6880 6880
          width="147.98192"
6881
-         id="Reversionary-bg"
6881
+         id="Reversionnary-bg"
6882 6882
          style="display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
6883 6883
     </g>
6884 6884
     <g
... ...
@@ -6894,15 +6894,15 @@
6894 6894
          style="opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
6895 6895
     </g>
6896 6896
     <g
6897
-       id="Baro"
6898
-       inkscape:label="Baro">
6897
+       id="BARO"
6898
+       inkscape:label="BARO">
6899 6899
       <rect
6900
-         inkscape:label="Baro-bg"
6900
+         inkscape:label="BARO-bg"
6901 6901
          y="455.5"
6902 6902
          x="703.55597"
6903 6903
          height="25.944014"
6904 6904
          width="104.944"
6905
-         id="Baro-bg"
6905
+         id="BARO-bg"
6906 6906
          style="opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
6907 6907
     </g>
6908 6908
     <rect
... ...
@@ -7047,7 +7047,8 @@
7047 7047
          id="SelectedCRS-bg"
7048 7048
          style="display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
7049 7049
       <text
7050
-         id="text5029"
7050
+         id="SelectedCRS-bgtext"
7051
+         inkscape:label="SelectedCRS-bgtext"
7051 7052
          y="444.86816"
7052 7053
          x="564.85876"
7053 7054
          style="font-style:normal;font-weight:normal;font-size:12px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
... ...
@@ -7082,7 +7083,8 @@
7082 7083
          id="SelectedHDG-bg"
7083 7084
          style="opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
7084 7085
       <text
7085
-         id="text5046"
7086
+         id="SelectedHDG-bgtext"
7087
+         inkscape:label="SelectedHDG-bgtext"
7086 7088
          y="444.86816"
7087 7089
          x="277"
7088 7090
          style="font-style:normal;font-weight:normal;font-size:12px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
... ...
@@ -7106,8 +7108,8 @@
7106 7108
            sodipodi:role="line">000°</tspan></text>
7107 7109
     </g>
7108 7110
     <g
7109
-       id="SelectedAlt"
7110
-       inkscape:label="SelectedAlt">
7111
+       id="SelectedALT"
7112
+       inkscape:label="SelectedALT">
7111 7113
       <path
7112 7114
          inkscape:label="SelectedAlt-bug"
7113 7115
          sodipodi:nodetypes="cccccccc"