Showing 3 changed files with 165 additions and 50 deletions
+84 -6
Models/header-nav-comm.svg
... ...
@@ -24,8 +24,8 @@
24 24
      inkscape:pageopacity="0.0"
25 25
      inkscape:pageshadow="2"
26 26
      inkscape:zoom="1.4142136"
27
-     inkscape:cx="383.08872"
28
-     inkscape:cy="552.38916"
27
+     inkscape:cx="225.75747"
28
+     inkscape:cy="549.56073"
29 29
      inkscape:document-units="px"
30 30
      inkscape:current-layer="PFD-navbox"
31 31
      showgrid="false"
... ...
@@ -33,7 +33,8 @@
33 33
      inkscape:window-height="1016"
34 34
      inkscape:window-x="0"
35 35
      inkscape:window-y="27"
36
-     inkscape:window-maximized="1" />
36
+     inkscape:window-maximized="1"
37
+     showguides="false" />
37 38
   <defs
38 39
      id="defs7962" />
39 40
   <metadata
... ...
@@ -422,8 +423,8 @@
422 423
          xml:space="preserve"><tspan
423 424
            sodipodi:role="line"
424 425
            id="tspan102"
425
-           x="350.70834"
426
-           y="13.998669" /></text>
426
+           x="504.70834"
427
+           y="40.998669" /></text>
427 428
       <text
428 429
          inkscape:label="DIS"
429 430
          id="DIS"
... ...
@@ -479,7 +480,84 @@
479 480
            sodipodi:role="line"
480 481
            id="tspan100"
481 482
            x="267.12048"
482
-           y="42.998669"></tspan></text>
483
+           y="40.998669" /></text>
484
+      <text
485
+         inkscape:label="LATMOD-Armed-text"
486
+         id="LATMOD-Armed-text"
487
+         y="22.123667"
488
+         x="267.12048"
489
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33333397px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
490
+         xml:space="preserve"><tspan
491
+           y="47"
492
+           x="270"
493
+           id="tspan101"
494
+           sodipodi:role="line" /></text>
495
+      <text
496
+         xml:space="preserve"
497
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33333397px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
498
+         x="267.12048"
499
+         y="22.123667"
500
+         id="LATMOD-Active-text"
501
+         inkscape:label="LATMOD-Active-text"><tspan
502
+           sodipodi:role="line"
503
+           id="tspan105"
504
+           x="330"
505
+           y="47" /></text>
506
+      <text
507
+         inkscape:label="AP-Status-text"
508
+         id="AP-Status-text"
509
+         y="22.123667"
510
+         x="267.12048"
511
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33333397px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
512
+         xml:space="preserve"><tspan
513
+           y="47"
514
+           x="390"
515
+           id="tspan109"
516
+           sodipodi:role="line" /></text>
517
+      <text
518
+         xml:space="preserve"
519
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33333397px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
520
+         x="267.12048"
521
+         y="22.123667"
522
+         id="YD-Status-text"
523
+         inkscape:label="YD-Status-text"><tspan
524
+           sodipodi:role="line"
525
+           id="tspan113"
526
+           x="430"
527
+           y="47" /></text>
528
+      <text
529
+         inkscape:label="VERMOD-Active-text"
530
+         id="VERMOD-Active-text"
531
+         y="22.123667"
532
+         x="267.12048"
533
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33333397px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
534
+         xml:space="preserve"><tspan
535
+           y="47"
536
+           x="468"
537
+           id="tspan117"
538
+           sodipodi:role="line" /></text>
539
+      <text
540
+         xml:space="preserve"
541
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33333397px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
542
+         x="267.12048"
543
+         y="22.123667"
544
+         id="VERMOD-Armed-text"
545
+         inkscape:label="VERMOD-Armed-text"><tspan
546
+           sodipodi:role="line"
547
+           id="tspan121"
548
+           x="630"
549
+           y="47" /></text>
550
+      <text
551
+         inkscape:label="VERMOD-Reference-text"
552
+         id="VERMOD-Reference-text"
553
+         y="22.123667"
554
+         x="267.12048"
555
+         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33333397px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
556
+         xml:space="preserve"><tspan
557
+           y="47"
558
+           x="520"
559
+           id="tspan125"
560
+           sodipodi:role="line" /></text>
483 561
     </g>
484 562
     <g
485 563
        id="MFD-navbox"
+77 -39
Nasal/afcs.nas
... ...
@@ -14,7 +14,6 @@ var APClass = {
14 14
                 break;
15 15
             }
16 16
         }
17
-        ap_systems = nil;
18 17
 
19 18
         m.engaged = 0;
20 19
 
... ...
@@ -28,6 +27,24 @@ var APClass = {
28 27
             data.timers.AP_blinking.singleShot = 1;
29 28
         }
30 29
 
30
+        var ap_annun = [
31
+            'LATMOD-Armed-text',  'LATMOD-Active-text',
32
+            'AP-Status-text',     'YD-Status-text',
33
+            'VERMOD-Active-text', 'VERMOD-Reference-text', 'VERMOD-Armed-text'
34
+        ];
35
+        foreach (var elem; ap_annun) {
36
+            var color = (elem == 'LATMOD-Armed-text' or elem == 'VERMOD-Armed-text') ? 'white' : 'green';
37
+            flightdeck.PFD.display.screenElements[elem]
38
+                .setColor(flightdeck.PFD.display.colors[color])
39
+                .setVisible(0);
40
+        }
41
+        foreach (var ap; [ 'AP', 'YD' ])
42
+            flightdeck.PFD.display.screenElements[ap ~ '-Status-text']
43
+                .setText(ap);
44
+
45
+        ap_annun = nil;
46
+        ap_systems = nil;
47
+
31 48
         if (contains(m.systems[m.system], 'hook') and typeof(m.systems[m.system].hook) == 'func')
32 49
                 m.systems[m.system].hook();
33 50
 
... ...
@@ -40,24 +57,6 @@ var APClass = {
40 57
         var _side = _system[side];
41 58
         _side[row]();
42 59
     },
43
-    _locked: 0, # no status modification while blinking, is it really useful ?
44
-    _blinking: func {
45
-        autopilot._locked += 1;
46
-        var _display = flightdeck['PFD'].display;
47
-        var i = math.mod(autopilot._locked, 2);
48
-        var delays = [ 0.7, 0.3 ];
49
-
50
-        _display.screenElements['AP-text'].setVisible(i);
51
-        
52
-        if (autopilot._locked < 11)
53
-            data.timers.AP_blinking.restart(delays[i]);
54
-        else {
55
-            autopilot._locked = 0;
56
-            data.timers.AP_blinking.stop();
57
-            _display.screenElements['AP-text']
58
-                .setVisible(1)
59
-                .setText('');
60
-        }
61 60
     },
62 61
     systems : {
63 62
         # L: AP FD  NAV ALT VS FLC
... ...
@@ -69,31 +68,66 @@ var APClass = {
69 68
             R: [ func, func, func, func, func, func ],
70 69
         },
71 70
         STEC55X: {
72
-            hook : func,
71
+            hook : func {
72
+                me.trimTarget = 0;
73
+            },
73 74
             updateDisplay: func {
74
-                if (autopilot._locked)
75
-                    return;
76
-                var ap_annun = '';
77
-                if (flightdeck['PFD'].display.screenElements['AP-text'].getText() != ''
78
-                and stec55x.pitch.getValue() == -1 and stec55x.roll.getValue()  == -1) {
79
-                    autopilot._blinking();
80
-                    return;
75
+                var se = flightdeck.PFD.display.screenElements;
76
+                se['AP-Status-text'].setVisible(stec55x.rollMode  != -1 or stec55x.pitchMode != -1);
77
+                se['YD-Status-text'].setVisible(stec55x.yaw.getValue() != -1);
78
+                if (stec55x.rollMode  != -1) {
79
+                    se['LATMOD-Active-text'].setVisible(1).setText('ROL');
80
+                    var armed = '';
81
+                    foreach (var m; [ 'NAV', 'CNAV', 'REV', 'CREV' ])
82
+                        if (stec55x[m]) armed = m;
83
+                    if (stec55x.roll.getValue() == 4) armed = 'GPS';
84
+                    if (stec55x.APR_annun.getValue()) armed = 'APR';
85
+                    if (stec55x.HDG_annun.getValue()) armed = 'HDG';
86
+                    se['LATMOD-Armed-text']
87
+                        .setVisible(size(armed))
88
+                        .setText(armed);
89
+                }
90
+                else {
91
+                    se['LATMOD-Active-text'].setVisible(0);
92
+                    se['LATMOD-Armed-text'].setVisible(0);
81 93
                 }
82
-                elsif (stec55x.roll.getValue() != -1 or stec55x.pitch.getValue() != -1)
83
-                    ap_annun = 'AP';
84
-
85
-                foreach (var mode; ['HDG', 'NAV', 'APR'])
86
-                    if (stec55x[mode ~ '_annun'].getValue())
87
-                        ap_annun ~= ' ' ~ mode;
88
-
89
-                if (stec55x.ALT_annun.getValue())
90
-                    ap_annun ~= sprintf('ALT %5d ft', math.round(me.data.alt), 10); # even if pressure is hold, we show alt in feet
91 94
 
92
-                if (stec55x.VS_annun.getValue())
93
-                    ap_annun ~= sprintf('VS %s %4d fpm',
95
+                if (stec55x.pitchMode != 1) {
96
+                    var armed     = '';
97
+                    var active    = '';
98
+                    var reference = '';
99
+                    if (stec55x.ALT_annun.getBoolValue()) {
100
+                        if (abs(data.alt - afcs.getValue('selected-alt-ft')) < 150) {
101
+                            active    = 'ALT';
102
+                            reference = sprintf('%5d ft', afcs.getValue('selected-alt-ft'));
103
+                            armed     = 'ALTS'
104
+                        }
105
+                        else {
106
+                            active    = 'ALT';
107
+                            reference = sprintf('%5d ft', math.round(data.alt, 10));
108
+                            armed     = 'ALT';
109
+                        }
110
+                    }
111
+                    elsif (stec55x.VS_annun.getBoolValue()) {
112
+                        active    = 'VS';
113
+                        reference = sprintf('%s%4d fpm',
94 114
                                         utf8.chstr(stec55x.vs.getValue() > 0 ? 9650 : 9660),
95 115
                                         math.abs(math.round(stec55x.vs.getValue(), 10)));
96
-
116
+                    }
117
+                    elsif (stec55x.GSArmed.getBoolValue()) {
118
+                        armed  = 'VPATH';
119
+                        active = 'GS';
120
+                    }
121
+# TODO: ask Octal450 which prop or variable can be used here
122
+#                    elsif (stec55x.???) {
123
+#                        armed  = 'PIT';
124
+#                        active = 'ALT';
125
+#                        reference = sprintf("%d°", autopilot.systems.STEC55X.trim);
126
+#                    }
127
+                    se['VERMOD-Active-text'].setVisible(size(active)).setText(active);
128
+                    se['VERMOD-Armed-text'].setVisible(size(armed)).setText(armed);
129
+                    se['VERMOD-Reference-text'].setVisible(size(reference)).setText(reference);
130
+                }
97 131
             },
98 132
             L: [
99 133
                 func {
... ...
@@ -128,10 +162,14 @@ var APClass = {
128 162
                 },
129 163
                 func,
130 164
                 func { # UP (trim)
165
+                    if (autopilot.systems.STEC55X.trimTarget > -15)
166
+                        autopilot.systems.STEC55X.trimTarget -= 1;
131 167
                     fgcommand('property-assign', {property: '/it-stec55x/input/man-trim', value: -1});
132 168
                     fgcommand('property-assign', {property: '/it-stec55x/input/man-trim', value:  0});
133 169
                 },
134 170
                 func { # DN (trim)
171
+                    if (autopilot.systems.STEC55X.trimTarget < 20)
172
+                        autopilot.systems.STEC55X.trimTarget += 1;
135 173
                     fgcommand('property-assign', {property: '/it-stec55x/input/man-trim', value: 1});
136 174
                     fgcommand('property-assign', {property: '/it-stec55x/input/man-trim', value: 0});
137 175
                 },
+4 -5
Nasal/display.nas
... ...
@@ -137,7 +137,10 @@ var displayClass = {
137 137
                     'WindData-OPTN1-HDG-text', 'WindData-OPTN1-SPD-text',
138 138
                     'WindData-OPTN2-crosswind-text', 'WindData-OPTN2-headwind-text',
139 139
                     'XPDR-MODE-text', 'XPDR-DIGIT-3-text', 'XPDR-DIGIT-2-text', 'XPDR-DIGIT-1-text', 'XPDR-DIGIT-0-text',
140
-                    'AP-text', 'ETE', 'ETE-text', 'DIS', 'DIS-text', 'LEG-text',
140
+                    'ETE', 'ETE-text', 'DIS', 'DIS-text', 'LEG-text',
141
+                    'LATMOD-Armed-text', 'LATMOD-Active-text',
142
+                    'AP-Status-text', 'YD-Status-text',
143
+                    'VERMOD-Active-text', 'VERMOD-Armed-text', 'VERMOD-Reference-text',
141 144
                     'AltBigC', 'AltSmallC'
142 145
 # }}}
143 146
                 );
... ...
@@ -403,10 +406,6 @@ var displayClass = {
403 406
         'LEG-text' : {
404 407
             alignment : 'center-center',
405 408
         },
406
-        'AP-text' : {
407
-            alignment : 'left-center',
408
-            color : [0, 1, 1],
409
-        },
410 409
 #        'TAS-text' : {
411 410
 #            alignment : 'right-bottom',
412 411
 #        },