Showing 1 changed files with 7 additions and 4 deletions
+7 -4
Nasal/afcs.nas
... ...
@@ -66,12 +66,15 @@ var APClass = {
66 66
             R: [ func, func, func, func, func, func ],
67 67
         },
68 68
         STEC55X: {
69
+            _aliases: {
70
+                hdg:          afcs.getNode('heading-bug-deg'),
71
+                alt:          afcs.getNode('selected-alt-ft'),
72
+                NAVCourse:    cdi.getNode('course'),
73
+                OBSNAVNeedle: cdi.getNode('course-deflection'),
74
+            },
69 75
             hook : func {
70 76
                 me.trimTarget = 0;
71
-                afcs.getNode('heading-bug-deg').unalias();
72
-                stec55x.hdg.alias(afcs.getNode('heading-bug-deg'));
73
-                afcs.getNode('selected-alt-ft').unalias();
74
-                stec55x.alt.alias(afcs.getNode('selected-alt-ft'));
77
+                foreach (var a; keys(me._aliases)) stec55x[a].alias(me._aliases[a]);
75 78
                 setprop('/it-stec55x/input/ap-master-sw', 1);
76 79
             },
77 80
             updateDisplay: func {