Showing 1 changed files with 42 additions and 30 deletions
+42 -30
Nasal/display.nas
... ...
@@ -34,59 +34,71 @@ var displayClass = {
34 34
         else {
35 35
             me.progress.hide();
36 36
             me.screen.show();
37
-            me.loadGroup({
37
+            var groups = {
38 38
                 show : [
39 39
                     'SoftKeysTexts', 
40 40
                     'COMM', 
41 41
                     'NAV', 
42
+                ],
43
+                hide : [ ],
44
+                text: [
45
+                    'nav1-standby-freq', 'nav1-selected-freq', 'nav1-id',
46
+                    'nav2-standby-freq', 'nav2-selected-freq', 'nav2-id',
47
+                    'nav-freq-switch',
48
+                ],
49
+                clip: [ ],
50
+            };
51
+            if (me.role == 'PFD') {
52
+                append(groups.show,
42 53
                     'XPDR-TIME', 
43 54
                     'FlightInstruments',
44 55
                     'Horizon',
45 56
                     'bankPointer',
46 57
                     'VSI',
47 58
                     'Rose',
48
-                ],
49
-                hide : [
59
+                );
60
+                append(groups.hide,
50 61
                     'CDI',
51 62
                     'NAV1-pointer',
52 63
                     'NAV2-pointer',
53 64
                     'GPS-pointer',
54 65
                     'Bearing1',
55 66
                     'Bearing2',
56
-                ],
57
-                text: [
58
-                    'VSIText',
59
-                    'Speed110',
60
-                    'Alt11100',
61
-                    'HDG-text',
62
-                    'nav1-standby-freq', 'nav1-selected-freq', 'nav1-id',
63
-                    'nav2-standby-freq', 'nav2-selected-freq', 'nav2-id',
64
-                    'nav-freq-switch',
65
-                ],
66
-                clip: [
67
+                );
68
+                append(groups.clip,
67 69
                     'SpeedLint1',
68 70
                     'SpeedTape',
69 71
                     'LintAlt',
70 72
                     'AltLint00011'
71
-                ],
72
-            });
73
-
74
-            var AltBigAltSmall = [ 'AltBigC', 'AltSmallC' ];
75
-            for (var place = 1; place <= 6; place +=1) {
76
-                append(AltBigAltSmall,
77
-                    'AltBigU' ~ place,
78
-                    'AltSmallU' ~ place,
79
-                    'AltBigD' ~ place,
80
-                    'AltSmallD' ~ place
81 73
                 );
74
+                append(groups.text,
75
+                    'VSIText',
76
+                    'Speed110',
77
+                    'Alt11100',
78
+                    'HDG-text',
79
+                    'AltBigC', 'AltSmallC'
80
+                );
81
+                for (var place = 1; place <= 6; place +=1) {
82
+                    append(groups.text,
83
+                        'AltBigU' ~ place,
84
+                        'AltSmallU' ~ place,
85
+                        'AltBigD' ~ place,
86
+                        'AltSmallD' ~ place
87
+                    );
88
+                }
82 89
             }
83
-            me.loadGroup({text: AltBigAltSmall});
90
+            else
91
+                append(groups.show, 'Header');
92
+
93
+            me.loadGroup(groups);
84 94
 
85
-            me.updateAI(getprop('/orientation/roll-deg'),getprop('orientation/pitch-deg'));
86
-            me.updateVSI(getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm'));
87
-            me.updateIAS(getprop('/velocities/airspeed-kt'));
88
-            me.updateALT(getprop('instrumentation/altimeter/indicated-altitude-ft'));
89
-            me.updateHSI(getprop('orientation/heading-deg'));
95
+            if (me.role == 'PFD') {
96
+                me.updateAI(getprop('/orientation/roll-deg'),getprop('orientation/pitch-deg'));
97
+                me.updateVSI(getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm'));
98
+                me.updateIAS(getprop('/velocities/airspeed-kt'));
99
+                me.updateALT(getprop('instrumentation/altimeter/indicated-altitude-ft'));
100
+                me.updateHSI(getprop('orientation/heading-deg'));
101
+            }
90 102
             me.updateNAV({refresh:1, auto:1});
91 103
             me.progress.removeAllChildren();
92 104
             me.progress = nil;