Showing 5 changed files with 170 additions and 165 deletions
+3 -4
Nasal/buttons.nas
... ...
@@ -13,10 +13,9 @@ var buttonsClass = {
13 13
         var tmp = getprop('/instrumentation/nav[' ~ n ~ ']/frequencies/selected-mhz');
14 14
         setprop('/instrumentation/nav[' ~ n ~ ']/frequencies/selected-mhz', getprop('/instrumentation/nav[' ~ n ~ ']/frequencies/standby-mhz'));
15 15
         setprop('/instrumentation/nav[' ~ n ~ ']/frequencies/standby-mhz', tmp);
16
-        if (contains(PFD, 'display'))
17
-            PFD.display.updateNAV({refresh: n+1});
18
-        if (contains(MFD, 'display'))
19
-            MFD.display.updateNAV({refresh: n+1});
16
+        foreach (var c; keys(flightdeck))
17
+            if (contains(flightdeck[c], 'display'))
18
+                flightdeck[c].display.updateNAV({refresh: n+1});
20 19
     },
21 20
 
22 21
     AsSwitchCOM : func (x) {
+42 -40
Nasal/core.nas
... ...
@@ -1,5 +1,7 @@
1
-var PFD = nil;
2
-var MFD = nil;
1
+var flightdeck = {
2
+    'MFD'         : nil,
3
+    'PFD'         : nil,
4
+};
3 5
 
4 6
 data = { # set of data common to all devices
5 7
     roll : 0,
... ...
@@ -35,76 +37,76 @@ var setListeners = func {
35 37
     setlistener('/instrumentation/nav/nav-id',
36 38
             func (n) {
37 39
                 var val = n.getValue();
38
-                if (PFD != nil)
39
-                    PFD.display.updateNAV({'nav-id': 1, val: val});
40
-                if (MFD != nil)
41
-                    MFD.display.updateNAV({'nav-id': 1, val: val});
40
+                foreach (var c; keys(flightdeck))
41
+                    if (flightdeck[c] != nil)
42
+                        flightdeck[c].display.updateNAV({'nav-id': 1, val: val});
42 43
             }, 1, 2);
43 44
     setlistener('/instrumentation/nav[1]/nav-id',
44 45
             func (n) {
45 46
                 var val = n.getValue();
46
-                if (PFD != nil)
47
-                    PFD.display.updateNAV({'nav-id': 2, val: val});
48
-                if (MFD != nil)
49
-                    MFD.display.updateNAV({'nav-id': 2, val: val});
47
+                foreach (var c; keys(flightdeck))
48
+                    if (flightdeck[c] != nil)
49
+                        flightdeck[c].display.updateNAV({'nav-id': 2, val: val});
50 50
             }, 1, 2);
51 51
     setlistener('/instrumentation/zkv1000/radios/nav-tune',
52 52
             func (n) {
53 53
                 var val = n.getValue();
54 54
                 setNavTune();
55
-                if (PFD != nil)
56
-                    PFD.display.updateNAV({tune: val});
57
-                if (MFD != nil)
58
-                    MFD.display.updateNAV({tune: val});
55
+                foreach (var c; keys(flightdeck))
56
+                    if (flightdeck[c] != nil)
57
+                        flightdeck[c].display.updateNAV({tune: val});
59 58
             }, 1, 2);
60 59
     setlistener('/instrumentation/zkv1000/radios/comm-tune',
61 60
             func (n) {
62 61
                 var val = n.getValue();
63 62
                 setCommTune();
64
-                if (PFD != nil)
65
-                    PFD.display.updateCOMM({tune: val});
66
-                if (MFD != nil)
67
-                    MFD.display.updateCOMM({tune: val});
63
+                foreach (var c; keys(flightdeck))
64
+                    if (flightdeck[c] != nil)
65
+                        flightdeck[c].display.updateCOMM({tune: val});
68 66
             }, 1, 2);
69 67
     setlistener('/instrumentation/zkv1000/afcs/heading-bug-deg',
70 68
             func (n) {
71 69
                 var val = n.getValue();
72 70
                 if (val != nil) {
73
-                    if (PFD != nil)
74
-                        PFD.display.updateHDG(val);
75
-                    if (MFD != nil)
76
-                        MFD.display.updateHDG(val);
71
+                    foreach (var c; keys(flightdeck))
72
+                        if (flightdeck[c] != nil and flightdeck[c].role == 'PFD')
73
+                            flightdeck[c].display.updateHDG(val);
77 74
                 }
78 75
             }, 0, 2);
79 76
     setlistener('/instrumentation/zkv1000/PFD/knobs/CRS',
80 77
             func (n) {
81 78
                 var val = n.getValue();
82 79
                 if (val != nil) {
83
-                    if (PFD != nil)
84
-                        PFD.display.updateCRS();
85
-                    if (MFD != nil)
86
-                        MFD.display.updateCRS();
80
+                    foreach (var c; keys(flightdeck))
81
+                        if (flightdeck[c] != nil and flightdeck[c].role == 'PFD')
82
+                            flightdeck[c].display.updateCRS();
87 83
                 }
88 84
             }, 0, 2);
89 85
     setlistener('/instrumentation/zkv1000/afcs/selected-alt-ft',
90 86
             func (n) {
91 87
                 var val = n.getValue();
92
-                if (val != nil  and PFD != nil) {
93
-                    if (! PFD.display.screenElements['SelectedALT'].getVisible()) {
94
-                        PFD.display.screenElements['SelectedALT'].show();
95
-                        PFD.display.screenElements['SelectedALT-text'].show();
96
-                        PFD.display.screenElements['SelectedALT-symbol'].show();
97
-                        PFD.display.screenElements['SelectedALT-bug'].show();
98
-                        PFD.display.screenElements['SelectedALT-bg'].show();
99
-                    }
100
-                    PFD.display.updateSelectedALT();
101
-                }
88
+                if (val != nil)
89
+                    foreach (var c; keys(flightdeck))
90
+                        if (flightdeck[c] != nil and flightdeck[c].role == 'PFD') {
91
+                            if (! flightdeck[c].display.screenElements['SelectedALT'].getVisible()) {
92
+                                flightdeck[c].display.screenElements['SelectedALT'].show();
93
+                                flightdeck[c].display.screenElements['SelectedALT-text'].show();
94
+                                flightdeck[c].display.screenElements['SelectedALT-symbol'].show();
95
+                                flightdeck[c].display.screenElements['SelectedALT-bug'].show();
96
+                                flightdeck[c].display.screenElements['SelectedALT-bg'].show();
97
+                            }
98
+                            flightdeck[c].display.updateSelectedALT();
99
+                        }
102 100
             }, 0, 2);
103 101
     setlistener('/gear/gear/wow',
104
-            func if (PFD != nil) PFD.display.updateXPDR(),
102
+            func foreach (var c; keys(flightdeck))
103
+                if (flightdeck[c] != nil and flightdeck[c].role == 'PFD')
104
+                    flightdeck[c].display.updateXPDR(),
105 105
             0, 0);
106 106
     setlistener('/instrumentation/altimeter/setting-inhg',
107
-            func if (PFD != nil) PFD.display.updateBARO(), 0, 2);
107
+            func foreach (var c; keys(flightdeck))
108
+                if (flightdeck[c] != nil and flightdeck[c].role == 'PFD')
109
+                    flightdeck[c].display.updateBARO(), 0, 2);
108 110
 }
109 111
 
110 112
 var deviceClass = {
... ...
@@ -146,10 +148,10 @@ var deviceClass = {
146 148
 };
147 149
 
148 150
 var powerOn = func {
149
-    foreach (var role; ['PFD', 'MFD'])
151
+    foreach (var role; keys(flightdeck))
150 152
         if (zkv.getNode(role) != nil)
151 153
 #            thread.newthread(func {
152
-                zkv1000[role] = deviceClass.new(role);
154
+                flightdeck[role] = deviceClass.new(role);
153 155
 #            });
154 156
     settimer(setListeners, 5);
155 157
 }
+1 -1
Nasal/display.nas
... ...
@@ -768,7 +768,7 @@ var displayClass = {
768 768
 
769 769
     updateSelectedALT : func {
770 770
 # animation for altitude section, called via updatedALT {{{
771
-        if (! PFD.display.screenElements['SelectedALT'].getVisible())
771
+        if (! me.screenElements['SelectedALT'].getVisible())
772 772
             return;
773 773
         var selected_alt = getprop('/instrumentation/zkv1000/afcs/selected-alt-ft');
774 774
         var delta_alt = data.alt - selected_alt;
+62 -60
mfd.xml
... ...
@@ -193,7 +193,7 @@
193 193
           <property>/instrumentation/zkv1000/MFD/status</property>
194 194
         </condition>
195 195
        <command>nasal</command>
196
-       <script>zkv1000.MFD.buttons.AsSwitchNAV();</script>
196
+       <script>zkv1000.flightdeck['MFD'].buttons.AsSwitchNAV();</script>
197 197
       </binding>
198 198
     </action>
199 199
   </animation>
... ...
@@ -233,8 +233,9 @@
233 233
         </condition>
234 234
         <command>nasal</command>
235 235
         <script>
236
-          zkv1000.PFD.display.updateNAV({set:1});
237
-          zkv1000.MFD.display.updateNAV({set:1});
236
+          foreach (var c; keys(zkv1000.flightdeck))
237
+            if (zkv1000.flightdeck[c] != nil)
238
+              zkv1000.flightdeck[c].display.updateNAV({set:1});
238 239
         </script>
239 240
       </binding>
240 241
     </action>
... ...
@@ -253,8 +254,9 @@
253 254
         </condition>
254 255
         <command>nasal</command>
255 256
         <script>
256
-          zkv1000.PFD.display.updateNAV({set:1});
257
-          zkv1000.MFD.display.updateNAV({set:1});
257
+          foreach (var c; keys(zkv1000.flightdeck))
258
+            if (zkv1000.flightdeck[c] != nil)
259
+              zkv1000.flightdeck[c].display.updateNAV({set:1});
258 260
         </script>
259 261
       </binding>
260 262
     </shift-action>
... ...
@@ -322,7 +324,7 @@
322 324
           <property>/instrumentation/zkv1000/MFD/status</property>
323 325
         </condition>
324 326
         <command>nasal</command>
325
-        <script>zkv1000.MFD.buttons.ALT();</script>
327
+        <script>zkv1000.flightdeck['MFD'].buttons.ALT();</script>
326 328
       </binding>
327 329
     </action>
328 330
   </animation>
... ...
@@ -396,7 +398,7 @@
396 398
           <property>/instrumentation/zkv1000/MFD/status</property>
397 399
         </condition>
398 400
        <command>nasal</command>
399
-       <script>zkv1000.MFD.buttons.AsSwitchCOM(1);</script>
401
+       <script>zkv1000.flightdeck['MFD'].buttons.AsSwitchCOM(1);</script>
400 402
       </binding>
401 403
       <mod-up>
402 404
         <binding>
... ...
@@ -404,7 +406,7 @@
404 406
             <property>/instrumentation/zkv1000/MFD/status</property>
405 407
           </condition>
406 408
           <command>nasal</command>
407
-          <script>zkv1000.MFD.buttons.AsSwitchCOM(0);</script>
409
+          <script>zkv1000.flightdeck['MFD'].buttons.AsSwitchCOM(0);</script>
408 410
         </binding>
409 411
       </mod-up>
410 412
     </action>
... ...
@@ -527,7 +529,7 @@
527 529
           <property>/instrumentation/zkv1000/MFD/status</property>
528 530
         </condition>
529 531
         <command>nasal</command>
530
-        <script>zkv1000.MFD.buttons.PAN({xdir: 1, ydir: 1});</script>
532
+        <script>zkv1000.flightdeck['MFD'].buttons.PAN({xdir: 1, ydir: 1});</script>
531 533
       </binding>
532 534
       <mod-up>
533 535
         <binding>
... ...
@@ -535,7 +537,7 @@
535 537
             <property>/instrumentation/zkv1000/MFD/status</property>
536 538
           </condition>
537 539
           <command>nasal</command>
538
-          <script>zkv1000.MFD.buttons.PAN();</script>
540
+          <script>zkv1000.flightdeck['MFD'].buttons.PAN();</script>
539 541
         </binding>
540 542
       </mod-up>
541 543
     </action>
... ...
@@ -546,7 +548,7 @@
546 548
           <property>/instrumentation/zkv1000/MFD/status</property>
547 549
         </condition>
548 550
        <command>nasal</command>
549
-       <script>zkv1000.MFD.knobs.PAN(1);</script>
551
+       <script>zkv1000.flightdeck['MFD'].knobs.PAN(1);</script>
550 552
       </binding>
551 553
     </action>
552 554
     <action>
... ...
@@ -556,7 +558,7 @@
556 558
           <property>/instrumentation/zkv1000/MFD/status</property>
557 559
         </condition>
558 560
        <command>nasal</command>
559
-       <script>zkv1000.MFD.knobs.PAN(-1);</script>
561
+       <script>zkv1000.flightdeck['MFD'].knobs.PAN(-1);</script>
560 562
       </binding>
561 563
     </action>
562 564
   </animation>
... ...
@@ -571,7 +573,7 @@
571 573
           <property>/instrumentation/zkv1000/MFD/status</property>
572 574
         </condition>
573 575
        <command>nasal</command>
574
-       <script>zkv1000.MFD.buttons.PAN({ydir: 1});</script>
576
+       <script>zkv1000.flightdeck['MFD'].buttons.PAN({ydir: 1});</script>
575 577
       </binding>
576 578
       <mod-up>
577 579
         <binding>
... ...
@@ -579,7 +581,7 @@
579 581
             <property>/instrumentation/zkv1000/MFD/status</property>
580 582
           </condition>
581 583
           <command>nasal</command>
582
-          <script>zkv1000.MFD.buttons.PAN();</script>
584
+          <script>zkv1000.flightdeck['MFD'].buttons.PAN();</script>
583 585
         </binding>
584 586
       </mod-up>
585 587
     </action>
... ...
@@ -594,7 +596,7 @@
594 596
           <property>/instrumentation/zkv1000/MFD/status</property>
595 597
         </condition>
596 598
        <command>nasal</command>
597
-       <script>zkv1000.MFD.buttons.PAN({xdir: -1});</script>
599
+       <script>zkv1000.flightdeck['MFD'].buttons.PAN({xdir: -1});</script>
598 600
       </binding>
599 601
       <mod-up>
600 602
         <binding>
... ...
@@ -602,7 +604,7 @@
602 604
             <property>/instrumentation/zkv1000/MFD/status</property>
603 605
           </condition>
604 606
           <command>nasal</command>
605
-          <script>zkv1000.MFD.buttons.PAN();</script>
607
+          <script>zkv1000.flightdeck['MFD'].buttons.PAN();</script>
606 608
         </binding>
607 609
       </mod-up>
608 610
     </action>
... ...
@@ -617,7 +619,7 @@
617 619
           <property>/instrumentation/zkv1000/MFD/status</property>
618 620
         </condition>
619 621
        <command>nasal</command>
620
-       <script>zkv1000.MFD.buttons.PAN({xdir: 1});</script>
622
+       <script>zkv1000.flightdeck['MFD'].buttons.PAN({xdir: 1});</script>
621 623
       </binding>
622 624
       <mod-up>
623 625
         <binding>
... ...
@@ -625,7 +627,7 @@
625 627
             <property>/instrumentation/zkv1000/MFD/status</property>
626 628
           </condition>
627 629
           <command>nasal</command>
628
-          <script>zkv1000.MFD.buttons.PAN();</script>
630
+          <script>zkv1000.flightdeck['MFD'].buttons.PAN();</script>
629 631
         </binding>
630 632
       </mod-up>
631 633
     </action>
... ...
@@ -640,7 +642,7 @@
640 642
           <property>/instrumentation/zkv1000/MFD/status</property>
641 643
         </condition>
642 644
        <command>nasal</command>
643
-       <script>zkv1000.MFD.buttons.PAN({ydir: -1});</script>
645
+       <script>zkv1000.flightdeck['MFD'].buttons.PAN({ydir: -1});</script>
644 646
       </binding>
645 647
       <mod-up>
646 648
         <binding>
... ...
@@ -648,7 +650,7 @@
648 650
             <property>/instrumentation/zkv1000/MFD/status</property>
649 651
           </condition>
650 652
           <command>nasal</command>
651
-          <script>zkv1000.MFD.buttons.PAN();</script>
653
+          <script>zkv1000.flightdeck['MFD'].buttons.PAN();</script>
652 654
         </binding>
653 655
       </mod-up>
654 656
     </action>
... ...
@@ -664,7 +666,7 @@
664 666
           <property>/instrumentation/zkv1000/MFD/status</property>
665 667
         </condition>
666 668
        <command>nasal</command>
667
-       <script>zkv1000.MFD.buttons.DirectTo(1);</script>
669
+       <script>zkv1000.flightdeck['MFD'].buttons.DirectTo(1);</script>
668 670
       </binding>
669 671
       <mod-up>
670 672
         <binding>
... ...
@@ -672,7 +674,7 @@
672 674
             <property>/instrumentation/zkv1000/MFD/status</property>
673 675
           </condition>
674 676
           <command>nasal</command>
675
-          <script>zkv1000.MFD.buttons.DirectTo(0);</script>
677
+          <script>zkv1000.flightdeck['MFD'].buttons.DirectTo(0);</script>
676 678
         </binding>
677 679
       </mod-up>
678 680
     </action>
... ...
@@ -688,7 +690,7 @@
688 690
           <property>/instrumentation/zkv1000/MFD/status</property>
689 691
         </condition>
690 692
        <command>nasal</command>
691
-       <script>zkv1000.MFD.buttons.MENU(1);</script>
693
+       <script>zkv1000.flightdeck['MFD'].buttons.MENU(1);</script>
692 694
       </binding>
693 695
       <mod-up>
694 696
         <binding>
... ...
@@ -696,7 +698,7 @@
696 698
             <property>/instrumentation/zkv1000/MFD/status</property>
697 699
           </condition>
698 700
           <command>nasal</command>
699
-          <script>zkv1000.MFD.buttons.MENU(0);</script>
701
+          <script>zkv1000.flightdeck['MFD'].buttons.MENU(0);</script>
700 702
         </binding>
701 703
       </mod-up>
702 704
     </action>
... ...
@@ -712,7 +714,7 @@
712 714
           <property>/instrumentation/zkv1000/MFD/status</property>
713 715
         </condition>
714 716
        <command>nasal</command>
715
-       <script>zkv1000.MFD.buttons.FPL(1);</script>
717
+       <script>zkv1000.flightdeck['MFD'].buttons.FPL(1);</script>
716 718
       </binding>
717 719
       <mod-up>
718 720
         <binding>
... ...
@@ -720,7 +722,7 @@
720 722
             <property>/instrumentation/zkv1000/MFD/status</property>
721 723
           </condition>
722 724
           <command>nasal</command>
723
-          <script>zkv1000.MFD.buttons.FPL(0);</script>
725
+          <script>zkv1000.flightdeck['MFD'].buttons.FPL(0);</script>
724 726
         </binding>
725 727
       </mod-up>
726 728
     </action>
... ...
@@ -736,7 +738,7 @@
736 738
           <property>/instrumentation/zkv1000/MFD/status</property>
737 739
         </condition>
738 740
        <command>nasal</command>
739
-       <script>zkv1000.MFD.buttons.PROC(1);</script>
741
+       <script>zkv1000.flightdeck['MFD'].buttons.PROC(1);</script>
740 742
       </binding>
741 743
       <mod-up>
742 744
         <binding>
... ...
@@ -744,7 +746,7 @@
744 746
             <property>/instrumentation/zkv1000/MFD/status</property>
745 747
           </condition>
746 748
           <command>nasal</command>
747
-          <script>zkv1000.MFD.buttons.PROC(0);</script>
749
+          <script>zkv1000.flightdeck['MFD'].buttons.PROC(0);</script>
748 750
         </binding>
749 751
       </mod-up>
750 752
     </action>
... ...
@@ -760,7 +762,7 @@
760 762
           <property>/instrumentation/zkv1000/MFD/status</property>
761 763
         </condition>
762 764
        <command>nasal</command>
763
-       <script>zkv1000.MFD.buttons.CLR(1);</script>
765
+       <script>zkv1000.flightdeck['MFD'].buttons.CLR(1);</script>
764 766
       </binding>
765 767
       <mod-up>
766 768
         <binding>
... ...
@@ -768,7 +770,7 @@
768 770
             <property>/instrumentation/zkv1000/MFD/status</property>
769 771
           </condition>
770 772
           <command>nasal</command>
771
-          <script>zkv1000.MFD.buttons.CLR(0);</script>
773
+          <script>zkv1000.flightdeck['MFD'].buttons.CLR(0);</script>
772 774
         </binding>
773 775
       </mod-up>
774 776
     </action>
... ...
@@ -784,7 +786,7 @@
784 786
           <property>/instrumentation/zkv1000/MFD/status</property>
785 787
         </condition>
786 788
         <command>nasal</command>
787
-        <script>zkv1000.MFD.buttons.ENT(1);</script>
789
+        <script>zkv1000.flightdeck['MFD'].buttons.ENT(1);</script>
788 790
       </binding>
789 791
       <mod-up>
790 792
         <binding>
... ...
@@ -792,7 +794,7 @@
792 794
             <property>/instrumentation/zkv1000/MFD/status</property>
793 795
           </condition>
794 796
           <command>nasal</command>
795
-          <script>zkv1000.MFD.buttons.ENT(0);</script>
797
+          <script>zkv1000.flightdeck['MFD'].buttons.ENT(0);</script>
796 798
         </binding>
797 799
       </mod-up>
798 800
     </action>
... ...
@@ -807,7 +809,7 @@
807 809
           <property>/instrumentation/zkv1000/MFD/status</property>
808 810
         </condition>
809 811
         <command>nasal</command>
810
-        <script>zkv1000.MFD.knobs.FmsOuter(cmdarg().getNode('offset').getValue());</script>
812
+        <script>zkv1000.flightdeck['MFD'].knobs.FmsOuter(cmdarg().getNode('offset').getValue());</script>
811 813
       </binding>
812 814
     </action>
813 815
   </animation>
... ...
@@ -822,7 +824,7 @@
822 824
           <property>/instrumentation/zkv1000/MFD/status</property>
823 825
         </condition>
824 826
          <command>nasal</command>
825
-         <script>zkv1000.MFD.buttons.FMS(1);</script>
827
+         <script>zkv1000.flightdeck['MFD'].buttons.FMS(1);</script>
826 828
       </binding>
827 829
       <mod-up>
828 830
         <binding>
... ...
@@ -830,7 +832,7 @@
830 832
             <property>/instrumentation/zkv1000/MFD/status</property>
831 833
           </condition>
832 834
           <command>nasal</command>
833
-          <script>zkv1000.MFD.buttons.FMS(0);</script>
835
+          <script>zkv1000.flightdeck['MFD'].buttons.FMS(0);</script>
834 836
         </binding>
835 837
       </mod-up>
836 838
     </action>
... ...
@@ -844,7 +846,7 @@
844 846
           <property>/instrumentation/zkv1000/MFD/status</property>
845 847
         </condition>
846 848
         <command>nasal</command>
847
-        <script>zkv1000.MFD.knobs.FmsInner(cmdarg().getNode('offset').getValue());</script>
849
+        <script>zkv1000.flightdeck['MFD'].knobs.FmsInner(cmdarg().getNode('offset').getValue());</script>
848 850
       </binding>
849 851
     </action>
850 852
   </animation>
... ...
@@ -859,7 +861,7 @@
859 861
           <property>/instrumentation/zkv1000/MFD/status</property>
860 862
         </condition>
861 863
         <command>nasal</command>
862
-        <script>zkv1000.MFD.softkeys.SoftKey(0, 1);</script>
864
+        <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(0, 1);</script>
863 865
       </binding>
864 866
       <mod-up>
865 867
         <binding>
... ...
@@ -867,7 +869,7 @@
867 869
             <property>/instrumentation/zkv1000/MFD/status</property>
868 870
           </condition>
869 871
           <command>nasal</command>
870
-          <script>zkv1000.MFD.softkeys.SoftKey(0, 0);</script>
872
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(0, 0);</script>
871 873
         </binding>
872 874
       </mod-up>
873 875
     </action>
... ...
@@ -883,7 +885,7 @@
883 885
           <property>/instrumentation/zkv1000/MFD/status</property>
884 886
         </condition>
885 887
        <command>nasal</command>
886
-       <script>zkv1000.MFD.softkeys.SoftKey(1, 1);</script>
888
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(1, 1);</script>
887 889
       </binding>
888 890
       <mod-up>
889 891
         <binding>
... ...
@@ -891,7 +893,7 @@
891 893
             <property>/instrumentation/zkv1000/MFD/status</property>
892 894
           </condition>
893 895
           <command>nasal</command>
894
-          <script>zkv1000.MFD.softkeys.SoftKey(1, 0);</script>
896
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(1, 0);</script>
895 897
         </binding>
896 898
       </mod-up>
897 899
     </action>
... ...
@@ -907,7 +909,7 @@
907 909
           <property>/instrumentation/zkv1000/MFD/status</property>
908 910
         </condition>
909 911
        <command>nasal</command>
910
-       <script>zkv1000.MFD.softkeys.SoftKey(2, 1);</script>
912
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(2, 1);</script>
911 913
       </binding>
912 914
       <mod-up>
913 915
         <binding>
... ...
@@ -915,7 +917,7 @@
915 917
             <property>/instrumentation/zkv1000/MFD/status</property>
916 918
           </condition>
917 919
           <command>nasal</command>
918
-          <script>zkv1000.MFD.softkeys.SoftKey(2, 0);</script>
920
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(2, 0);</script>
919 921
         </binding>
920 922
       </mod-up>
921 923
     </action>
... ...
@@ -931,7 +933,7 @@
931 933
           <property>/instrumentation/zkv1000/MFD/status</property>
932 934
         </condition>
933 935
        <command>nasal</command>
934
-       <script>zkv1000.MFD.softkeys.SoftKey(3, 1);</script>
936
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(3, 1);</script>
935 937
       </binding>
936 938
       <mod-up>
937 939
         <binding>
... ...
@@ -939,7 +941,7 @@
939 941
             <property>/instrumentation/zkv1000/MFD/status</property>
940 942
           </condition>
941 943
           <command>nasal</command>
942
-          <script>zkv1000.MFD.softkeys.SoftKey(3, 0);</script>
944
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(3, 0);</script>
943 945
         </binding>
944 946
       </mod-up>
945 947
     </action>
... ...
@@ -955,7 +957,7 @@
955 957
           <property>/instrumentation/zkv1000/MFD/status</property>
956 958
         </condition>
957 959
        <command>nasal</command>
958
-       <script>zkv1000.MFD.softkeys.SoftKey(4, 1);</script>
960
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(4, 1);</script>
959 961
       </binding>
960 962
       <mod-up>
961 963
         <binding>
... ...
@@ -963,7 +965,7 @@
963 965
             <property>/instrumentation/zkv1000/MFD/status</property>
964 966
           </condition>
965 967
           <command>nasal</command>
966
-          <script>zkv1000.MFD.softkeys.SoftKey(4, 0);</script>
968
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(4, 0);</script>
967 969
         </binding>
968 970
       </mod-up>
969 971
     </action>
... ...
@@ -979,7 +981,7 @@
979 981
           <property>/instrumentation/zkv1000/MFD/status</property>
980 982
         </condition>
981 983
        <command>nasal</command>
982
-       <script>zkv1000.MFD.softkeys.SoftKey(5, 1);</script>
984
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(5, 1);</script>
983 985
       </binding>
984 986
       <mod-up>
985 987
         <binding>
... ...
@@ -987,7 +989,7 @@
987 989
             <property>/instrumentation/zkv1000/MFD/status</property>
988 990
           </condition>
989 991
           <command>nasal</command>
990
-          <script>zkv1000.MFD.softkeys.SoftKey(5, 0);</script>
992
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(5, 0);</script>
991 993
         </binding>
992 994
       </mod-up>
993 995
     </action>
... ...
@@ -1003,7 +1005,7 @@
1003 1005
           <property>/instrumentation/zkv1000/MFD/status</property>
1004 1006
         </condition>
1005 1007
        <command>nasal</command>
1006
-       <script>zkv1000.MFD.softkeys.SoftKey(6, 1);</script>
1008
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(6, 1);</script>
1007 1009
       </binding>
1008 1010
       <mod-up>
1009 1011
         <binding>
... ...
@@ -1011,7 +1013,7 @@
1011 1013
             <property>/instrumentation/zkv1000/MFD/status</property>
1012 1014
           </condition>
1013 1015
           <command>nasal</command>
1014
-          <script>zkv1000.MFD.softkeys.SoftKey(6, 0);</script>
1016
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(6, 0);</script>
1015 1017
         </binding>
1016 1018
       </mod-up>
1017 1019
     </action>
... ...
@@ -1027,7 +1029,7 @@
1027 1029
           <property>/instrumentation/zkv1000/MFD/status</property>
1028 1030
         </condition>
1029 1031
        <command>nasal</command>
1030
-       <script>zkv1000.MFD.softkeys.SoftKey(7, 1);</script>
1032
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(7, 1);</script>
1031 1033
       </binding>
1032 1034
       <mod-up>
1033 1035
         <binding>
... ...
@@ -1035,7 +1037,7 @@
1035 1037
             <property>/instrumentation/zkv1000/MFD/status</property>
1036 1038
           </condition>
1037 1039
           <command>nasal</command>
1038
-          <script>zkv1000.MFD.softkeys.SoftKey(7, 0);</script>
1040
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(7, 0);</script>
1039 1041
         </binding>
1040 1042
       </mod-up>
1041 1043
     </action>
... ...
@@ -1051,7 +1053,7 @@
1051 1053
           <property>/instrumentation/zkv1000/MFD/status</property>
1052 1054
         </condition>
1053 1055
        <command>nasal</command>
1054
-       <script>zkv1000.MFD.softkeys.SoftKey(8, 1);</script>
1056
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(8, 1);</script>
1055 1057
       </binding>
1056 1058
       <mod-up>
1057 1059
         <binding>
... ...
@@ -1059,7 +1061,7 @@
1059 1061
             <property>/instrumentation/zkv1000/MFD/status</property>
1060 1062
           </condition>
1061 1063
           <command>nasal</command>
1062
-          <script>zkv1000.MFD.softkeys.SoftKey(8, 0);</script>
1064
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(8, 0);</script>
1063 1065
         </binding>
1064 1066
       </mod-up>
1065 1067
     </action>
... ...
@@ -1075,7 +1077,7 @@
1075 1077
           <property>/instrumentation/zkv1000/MFD/status</property>
1076 1078
         </condition>
1077 1079
        <command>nasal</command>
1078
-       <script>zkv1000.MFD.softkeys.SoftKey(9, 1);</script>
1080
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(9, 1);</script>
1079 1081
       </binding>
1080 1082
       <mod-up>
1081 1083
         <binding>
... ...
@@ -1083,7 +1085,7 @@
1083 1085
             <property>/instrumentation/zkv1000/MFD/status</property>
1084 1086
           </condition>
1085 1087
           <command>nasal</command>
1086
-          <script>zkv1000.MFD.softkeys.SoftKey(9, 0);</script>
1088
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(9, 0);</script>
1087 1089
         </binding>
1088 1090
       </mod-up>
1089 1091
     </action>
... ...
@@ -1099,7 +1101,7 @@
1099 1101
           <property>/instrumentation/zkv1000/MFD/status</property>
1100 1102
         </condition>
1101 1103
        <command>nasal</command>
1102
-       <script>zkv1000.MFD.softkeys.SoftKey(10, 1);</script>
1104
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(10, 1);</script>
1103 1105
       </binding>
1104 1106
       <mod-up>
1105 1107
         <binding>
... ...
@@ -1107,7 +1109,7 @@
1107 1109
             <property>/instrumentation/zkv1000/MFD/status</property>
1108 1110
           </condition>
1109 1111
           <command>nasal</command>
1110
-          <script>zkv1000.MFD.softkeys.SoftKey(10, 0);</script>
1112
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(10, 0);</script>
1111 1113
         </binding>
1112 1114
       </mod-up>
1113 1115
     </action>
... ...
@@ -1123,7 +1125,7 @@
1123 1125
           <property>/instrumentation/zkv1000/MFD/status</property>
1124 1126
         </condition>
1125 1127
        <command>nasal</command>
1126
-       <script>zkv1000.MFD.softkeys.SoftKey(11, 1);</script>
1128
+       <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(11, 1);</script>
1127 1129
       </binding>
1128 1130
       <mod-up>
1129 1131
         <binding>
... ...
@@ -1131,7 +1133,7 @@
1131 1133
             <property>/instrumentation/zkv1000/MFD/status</property>
1132 1134
           </condition>
1133 1135
           <command>nasal</command>
1134
-          <script>zkv1000.MFD.softkeys.SoftKey(11, 0);</script>
1136
+          <script>zkv1000.flightdeck['MFD'].softkeys.SoftKey(11, 0);</script>
1135 1137
         </binding>
1136 1138
       </mod-up>
1137 1139
     </action>
+62 -60
pfd.xml
... ...
@@ -204,7 +204,7 @@
204 204
           <property>/instrumentation/zkv1000/PFD/status</property>
205 205
         </condition>
206 206
        <command>nasal</command>
207
-       <script>zkv1000.PFD.buttons.AsSwitchNAV();</script>
207
+       <script>zkv1000.flightdeck['PFD'].buttons.AsSwitchNAV();</script>
208 208
       </binding>
209 209
     </action>
210 210
   </animation>
... ...
@@ -244,8 +244,9 @@
244 244
         </condition>
245 245
         <command>nasal</command>
246 246
         <script>
247
-          zkv1000.PFD.display.updateNAV({set:1});
248
-          zkv1000.MFD.display.updateNAV({set:1});
247
+          foreach (var c; keys(zkv1000.flightdeck))
248
+            if (zkv1000.flightdeck[c] != nil)
249
+              zkv1000.flightdeck[c].display.updateNAV({set:1});
249 250
         </script>
250 251
       </binding>
251 252
     </action>
... ...
@@ -264,8 +265,9 @@
264 265
         </condition>
265 266
         <command>nasal</command>
266 267
         <script>
267
-          zkv1000.PFD.display.updateNAV({set:1});
268
-          zkv1000.MFD.display.updateNAV({set:1});
268
+          foreach (var c; keys(zkv1000.flightdeck))
269
+            if (zkv1000.flightdeck[c] != nil)
270
+              zkv1000.flightdeck[c].display.updateNAV({set:1});
269 271
         </script>
270 272
       </binding>
271 273
     </shift-action>
... ...
@@ -333,7 +335,7 @@
333 335
           <property>/instrumentation/zkv1000/PFD/status</property>
334 336
         </condition>
335 337
         <command>nasal</command>
336
-        <script>zkv1000.PFD.buttons.ALT();</script>
338
+        <script>zkv1000.flightdeck['PFD'].buttons.ALT();</script>
337 339
       </binding>
338 340
     </action>
339 341
   </animation>
... ...
@@ -407,7 +409,7 @@
407 409
           <property>/instrumentation/zkv1000/PFD/status</property>
408 410
         </condition>
409 411
        <command>nasal</command>
410
-       <script>zkv1000.PFD.buttons.AsSwitchCOM(1);</script>
412
+       <script>zkv1000.flightdeck['PFD'].buttons.AsSwitchCOM(1);</script>
411 413
       </binding>
412 414
       <mod-up>
413 415
         <binding>
... ...
@@ -415,7 +417,7 @@
415 417
             <property>/instrumentation/zkv1000/PFD/status</property>
416 418
           </condition>
417 419
           <command>nasal</command>
418
-          <script>zkv1000.PFD.buttons.AsSwitchCOM(0);</script>
420
+          <script>zkv1000.flightdeck['PFD'].buttons.AsSwitchCOM(0);</script>
419 421
         </binding>
420 422
       </mod-up>
421 423
     </action>
... ...
@@ -538,7 +540,7 @@
538 540
           <property>/instrumentation/zkv1000/PFD/status</property>
539 541
         </condition>
540 542
         <command>nasal</command>
541
-        <script>zkv1000.PFD.buttons.PAN({xdir: 1, ydir: 1});</script>
543
+        <script>zkv1000.flightdeck['PFD'].buttons.PAN({xdir: 1, ydir: 1});</script>
542 544
       </binding>
543 545
       <mod-up>
544 546
         <binding>
... ...
@@ -546,7 +548,7 @@
546 548
             <property>/instrumentation/zkv1000/PFD/status</property>
547 549
           </condition>
548 550
           <command>nasal</command>
549
-          <script>zkv1000.PFD.buttons.PAN();</script>
551
+          <script>zkv1000.flightdeck['PFD'].buttons.PAN();</script>
550 552
         </binding>
551 553
       </mod-up>
552 554
     </action>
... ...
@@ -557,7 +559,7 @@
557 559
           <property>/instrumentation/zkv1000/PFD/status</property>
558 560
         </condition>
559 561
        <command>nasal</command>
560
-       <script>zkv1000.PFD.knobs.PAN(1);</script>
562
+       <script>zkv1000.flightdeck['PFD'].knobs.PAN(1);</script>
561 563
       </binding>
562 564
     </action>
563 565
     <action>
... ...
@@ -567,7 +569,7 @@
567 569
           <property>/instrumentation/zkv1000/PFD/status</property>
568 570
         </condition>
569 571
        <command>nasal</command>
570
-       <script>zkv1000.PFD.knobs.PAN(-1);</script>
572
+       <script>zkv1000.flightdeck['PFD'].knobs.PAN(-1);</script>
571 573
       </binding>
572 574
     </action>
573 575
   </animation>
... ...
@@ -582,7 +584,7 @@
582 584
           <property>/instrumentation/zkv1000/PFD/status</property>
583 585
         </condition>
584 586
        <command>nasal</command>
585
-       <script>zkv1000.PFD.buttons.PAN({ydir: 1});</script>
587
+       <script>zkv1000.flightdeck['PFD'].buttons.PAN({ydir: 1});</script>
586 588
       </binding>
587 589
       <mod-up>
588 590
         <binding>
... ...
@@ -590,7 +592,7 @@
590 592
             <property>/instrumentation/zkv1000/PFD/status</property>
591 593
           </condition>
592 594
           <command>nasal</command>
593
-          <script>zkv1000.PFD.buttons.PAN();</script>
595
+          <script>zkv1000.flightdeck['PFD'].buttons.PAN();</script>
594 596
         </binding>
595 597
       </mod-up>
596 598
     </action>
... ...
@@ -605,7 +607,7 @@
605 607
           <property>/instrumentation/zkv1000/PFD/status</property>
606 608
         </condition>
607 609
        <command>nasal</command>
608
-       <script>zkv1000.PFD.buttons.PAN({xdir: -1});</script>
610
+       <script>zkv1000.flightdeck['PFD'].buttons.PAN({xdir: -1});</script>
609 611
       </binding>
610 612
       <mod-up>
611 613
         <binding>
... ...
@@ -613,7 +615,7 @@
613 615
             <property>/instrumentation/zkv1000/PFD/status</property>
614 616
           </condition>
615 617
           <command>nasal</command>
616
-          <script>zkv1000.PFD.buttons.PAN();</script>
618
+          <script>zkv1000.flightdeck['PFD'].buttons.PAN();</script>
617 619
         </binding>
618 620
       </mod-up>
619 621
     </action>
... ...
@@ -628,7 +630,7 @@
628 630
           <property>/instrumentation/zkv1000/PFD/status</property>
629 631
         </condition>
630 632
        <command>nasal</command>
631
-       <script>zkv1000.PFD.buttons.PAN({xdir: 1});</script>
633
+       <script>zkv1000.flightdeck['PFD'].buttons.PAN({xdir: 1});</script>
632 634
       </binding>
633 635
       <mod-up>
634 636
         <binding>
... ...
@@ -636,7 +638,7 @@
636 638
             <property>/instrumentation/zkv1000/PFD/status</property>
637 639
           </condition>
638 640
           <command>nasal</command>
639
-          <script>zkv1000.PFD.buttons.PAN();</script>
641
+          <script>zkv1000.flightdeck['PFD'].buttons.PAN();</script>
640 642
         </binding>
641 643
       </mod-up>
642 644
     </action>
... ...
@@ -651,7 +653,7 @@
651 653
           <property>/instrumentation/zkv1000/PFD/status</property>
652 654
         </condition>
653 655
        <command>nasal</command>
654
-       <script>zkv1000.PFD.buttons.PAN({ydir: -1});</script>
656
+       <script>zkv1000.flightdeck['PFD'].buttons.PAN({ydir: -1});</script>
655 657
       </binding>
656 658
       <mod-up>
657 659
         <binding>
... ...
@@ -659,7 +661,7 @@
659 661
             <property>/instrumentation/zkv1000/PFD/status</property>
660 662
           </condition>
661 663
           <command>nasal</command>
662
-          <script>zkv1000.PFD.buttons.PAN();</script>
664
+          <script>zkv1000.flightdeck['PFD'].buttons.PAN();</script>
663 665
         </binding>
664 666
       </mod-up>
665 667
     </action>
... ...
@@ -675,7 +677,7 @@
675 677
           <property>/instrumentation/zkv1000/PFD/status</property>
676 678
         </condition>
677 679
        <command>nasal</command>
678
-       <script>zkv1000.PFD.buttons.DirectTo(1);</script>
680
+       <script>zkv1000.flightdeck['PFD'].buttons.DirectTo(1);</script>
679 681
       </binding>
680 682
       <mod-up>
681 683
         <binding>
... ...
@@ -683,7 +685,7 @@
683 685
             <property>/instrumentation/zkv1000/PFD/status</property>
684 686
           </condition>
685 687
           <command>nasal</command>
686
-          <script>zkv1000.PFD.buttons.DirectTo(0);</script>
688
+          <script>zkv1000.flightdeck['PFD'].buttons.DirectTo(0);</script>
687 689
         </binding>
688 690
       </mod-up>
689 691
     </action>
... ...
@@ -699,7 +701,7 @@
699 701
           <property>/instrumentation/zkv1000/PFD/status</property>
700 702
         </condition>
701 703
        <command>nasal</command>
702
-       <script>zkv1000.PFD.buttons.MENU(1);</script>
704
+       <script>zkv1000.flightdeck['PFD'].buttons.MENU(1);</script>
703 705
       </binding>
704 706
       <mod-up>
705 707
         <binding>
... ...
@@ -707,7 +709,7 @@
707 709
             <property>/instrumentation/zkv1000/PFD/status</property>
708 710
           </condition>
709 711
           <command>nasal</command>
710
-          <script>zkv1000.PFD.buttons.MENU(0);</script>
712
+          <script>zkv1000.flightdeck['PFD'].buttons.MENU(0);</script>
711 713
         </binding>
712 714
       </mod-up>
713 715
     </action>
... ...
@@ -723,7 +725,7 @@
723 725
           <property>/instrumentation/zkv1000/PFD/status</property>
724 726
         </condition>
725 727
        <command>nasal</command>
726
-       <script>zkv1000.PFD.buttons.FPL(1);</script>
728
+       <script>zkv1000.flightdeck['PFD'].buttons.FPL(1);</script>
727 729
       </binding>
728 730
       <mod-up>
729 731
         <binding>
... ...
@@ -731,7 +733,7 @@
731 733
             <property>/instrumentation/zkv1000/PFD/status</property>
732 734
           </condition>
733 735
           <command>nasal</command>
734
-          <script>zkv1000.PFD.buttons.FPL(0);</script>
736
+          <script>zkv1000.flightdeck['PFD'].buttons.FPL(0);</script>
735 737
         </binding>
736 738
       </mod-up>
737 739
     </action>
... ...
@@ -747,7 +749,7 @@
747 749
           <property>/instrumentation/zkv1000/PFD/status</property>
748 750
         </condition>
749 751
        <command>nasal</command>
750
-       <script>zkv1000.PFD.buttons.PROC(1);</script>
752
+       <script>zkv1000.flightdeck['PFD'].buttons.PROC(1);</script>
751 753
       </binding>
752 754
       <mod-up>
753 755
         <binding>
... ...
@@ -755,7 +757,7 @@
755 757
             <property>/instrumentation/zkv1000/PFD/status</property>
756 758
           </condition>
757 759
           <command>nasal</command>
758
-          <script>zkv1000.PFD.buttons.PROC(0);</script>
760
+          <script>zkv1000.flightdeck['PFD'].buttons.PROC(0);</script>
759 761
         </binding>
760 762
       </mod-up>
761 763
     </action>
... ...
@@ -771,7 +773,7 @@
771 773
           <property>/instrumentation/zkv1000/PFD/status</property>
772 774
         </condition>
773 775
        <command>nasal</command>
774
-       <script>zkv1000.PFD.buttons.CLR(1);</script>
776
+       <script>zkv1000.flightdeck['PFD'].buttons.CLR(1);</script>
775 777
       </binding>
776 778
       <mod-up>
777 779
         <binding>
... ...
@@ -779,7 +781,7 @@
779 781
             <property>/instrumentation/zkv1000/PFD/status</property>
780 782
           </condition>
781 783
           <command>nasal</command>
782
-          <script>zkv1000.PFD.buttons.CLR(0);</script>
784
+          <script>zkv1000.flightdeck['PFD'].buttons.CLR(0);</script>
783 785
         </binding>
784 786
       </mod-up>
785 787
     </action>
... ...
@@ -795,7 +797,7 @@
795 797
           <property>/instrumentation/zkv1000/PFD/status</property>
796 798
         </condition>
797 799
         <command>nasal</command>
798
-        <script>zkv1000.PFD.buttons.ENT(1);</script>
800
+        <script>zkv1000.flightdeck['PFD'].buttons.ENT(1);</script>
799 801
       </binding>
800 802
       <mod-up>
801 803
         <binding>
... ...
@@ -803,7 +805,7 @@
803 805
             <property>/instrumentation/zkv1000/PFD/status</property>
804 806
           </condition>
805 807
           <command>nasal</command>
806
-          <script>zkv1000.PFD.buttons.ENT(0);</script>
808
+          <script>zkv1000.flightdeck['PFD'].buttons.ENT(0);</script>
807 809
         </binding>
808 810
       </mod-up>
809 811
     </action>
... ...
@@ -818,7 +820,7 @@
818 820
           <property>/instrumentation/zkv1000/PFD/status</property>
819 821
         </condition>
820 822
         <command>nasal</command>
821
-        <script>zkv1000.PFD.knobs.FmsOuter(cmdarg().getNode('offset').getValue());</script>
823
+        <script>zkv1000.flightdeck['PFD'].knobs.FmsOuter(cmdarg().getNode('offset').getValue());</script>
822 824
       </binding>
823 825
     </action>
824 826
   </animation>
... ...
@@ -833,7 +835,7 @@
833 835
           <property>/instrumentation/zkv1000/PFD/status</property>
834 836
         </condition>
835 837
          <command>nasal</command>
836
-         <script>zkv1000.PFD.buttons.FMS(1);</script>
838
+         <script>zkv1000.flightdeck['PFD'].buttons.FMS(1);</script>
837 839
       </binding>
838 840
       <mod-up>
839 841
         <binding>
... ...
@@ -841,7 +843,7 @@
841 843
             <property>/instrumentation/zkv1000/PFD/status</property>
842 844
           </condition>
843 845
           <command>nasal</command>
844
-          <script>zkv1000.PFD.buttons.FMS(0);</script>
846
+          <script>zkv1000.flightdeck['PFD'].buttons.FMS(0);</script>
845 847
         </binding>
846 848
       </mod-up>
847 849
     </action>
... ...
@@ -855,7 +857,7 @@
855 857
           <property>/instrumentation/zkv1000/PFD/status</property>
856 858
         </condition>
857 859
         <command>nasal</command>
858
-        <script>zkv1000.PFD.knobs.FmsInner(cmdarg().getNode('offset').getValue());</script>
860
+        <script>zkv1000.flightdeck['PFD'].knobs.FmsInner(cmdarg().getNode('offset').getValue());</script>
859 861
       </binding>
860 862
     </action>
861 863
   </animation>
... ...
@@ -870,7 +872,7 @@
870 872
           <property>/instrumentation/zkv1000/PFD/status</property>
871 873
         </condition>
872 874
         <command>nasal</command>
873
-        <script>zkv1000.PFD.softkeys.SoftKey(0, 1);</script>
875
+        <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(0, 1);</script>
874 876
       </binding>
875 877
       <mod-up>
876 878
         <binding>
... ...
@@ -878,7 +880,7 @@
878 880
             <property>/instrumentation/zkv1000/PFD/status</property>
879 881
           </condition>
880 882
           <command>nasal</command>
881
-          <script>zkv1000.PFD.softkeys.SoftKey(0, 0);</script>
883
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(0, 0);</script>
882 884
         </binding>
883 885
       </mod-up>
884 886
     </action>
... ...
@@ -894,7 +896,7 @@
894 896
           <property>/instrumentation/zkv1000/PFD/status</property>
895 897
         </condition>
896 898
        <command>nasal</command>
897
-       <script>zkv1000.PFD.softkeys.SoftKey(1, 1);</script>
899
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(1, 1);</script>
898 900
       </binding>
899 901
       <mod-up>
900 902
         <binding>
... ...
@@ -902,7 +904,7 @@
902 904
             <property>/instrumentation/zkv1000/PFD/status</property>
903 905
           </condition>
904 906
           <command>nasal</command>
905
-          <script>zkv1000.PFD.softkeys.SoftKey(1, 0);</script>
907
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(1, 0);</script>
906 908
         </binding>
907 909
       </mod-up>
908 910
     </action>
... ...
@@ -918,7 +920,7 @@
918 920
           <property>/instrumentation/zkv1000/PFD/status</property>
919 921
         </condition>
920 922
        <command>nasal</command>
921
-       <script>zkv1000.PFD.softkeys.SoftKey(2, 1);</script>
923
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(2, 1);</script>
922 924
       </binding>
923 925
       <mod-up>
924 926
         <binding>
... ...
@@ -926,7 +928,7 @@
926 928
             <property>/instrumentation/zkv1000/PFD/status</property>
927 929
           </condition>
928 930
           <command>nasal</command>
929
-          <script>zkv1000.PFD.softkeys.SoftKey(2, 0);</script>
931
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(2, 0);</script>
930 932
         </binding>
931 933
       </mod-up>
932 934
     </action>
... ...
@@ -942,7 +944,7 @@
942 944
           <property>/instrumentation/zkv1000/PFD/status</property>
943 945
         </condition>
944 946
        <command>nasal</command>
945
-       <script>zkv1000.PFD.softkeys.SoftKey(3, 1);</script>
947
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(3, 1);</script>
946 948
       </binding>
947 949
       <mod-up>
948 950
         <binding>
... ...
@@ -950,7 +952,7 @@
950 952
             <property>/instrumentation/zkv1000/PFD/status</property>
951 953
           </condition>
952 954
           <command>nasal</command>
953
-          <script>zkv1000.PFD.softkeys.SoftKey(3, 0);</script>
955
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(3, 0);</script>
954 956
         </binding>
955 957
       </mod-up>
956 958
     </action>
... ...
@@ -966,7 +968,7 @@
966 968
           <property>/instrumentation/zkv1000/PFD/status</property>
967 969
         </condition>
968 970
        <command>nasal</command>
969
-       <script>zkv1000.PFD.softkeys.SoftKey(4, 1);</script>
971
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(4, 1);</script>
970 972
       </binding>
971 973
       <mod-up>
972 974
         <binding>
... ...
@@ -974,7 +976,7 @@
974 976
             <property>/instrumentation/zkv1000/PFD/status</property>
975 977
           </condition>
976 978
           <command>nasal</command>
977
-          <script>zkv1000.PFD.softkeys.SoftKey(4, 0);</script>
979
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(4, 0);</script>
978 980
         </binding>
979 981
       </mod-up>
980 982
     </action>
... ...
@@ -990,7 +992,7 @@
990 992
           <property>/instrumentation/zkv1000/PFD/status</property>
991 993
         </condition>
992 994
        <command>nasal</command>
993
-       <script>zkv1000.PFD.softkeys.SoftKey(5, 1);</script>
995
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(5, 1);</script>
994 996
       </binding>
995 997
       <mod-up>
996 998
         <binding>
... ...
@@ -998,7 +1000,7 @@
998 1000
             <property>/instrumentation/zkv1000/PFD/status</property>
999 1001
           </condition>
1000 1002
           <command>nasal</command>
1001
-          <script>zkv1000.PFD.softkeys.SoftKey(5, 0);</script>
1003
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(5, 0);</script>
1002 1004
         </binding>
1003 1005
       </mod-up>
1004 1006
     </action>
... ...
@@ -1014,7 +1016,7 @@
1014 1016
           <property>/instrumentation/zkv1000/PFD/status</property>
1015 1017
         </condition>
1016 1018
        <command>nasal</command>
1017
-       <script>zkv1000.PFD.softkeys.SoftKey(6, 1);</script>
1019
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(6, 1);</script>
1018 1020
       </binding>
1019 1021
       <mod-up>
1020 1022
         <binding>
... ...
@@ -1022,7 +1024,7 @@
1022 1024
             <property>/instrumentation/zkv1000/PFD/status</property>
1023 1025
           </condition>
1024 1026
           <command>nasal</command>
1025
-          <script>zkv1000.PFD.softkeys.SoftKey(6, 0);</script>
1027
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(6, 0);</script>
1026 1028
         </binding>
1027 1029
       </mod-up>
1028 1030
     </action>
... ...
@@ -1038,7 +1040,7 @@
1038 1040
           <property>/instrumentation/zkv1000/PFD/status</property>
1039 1041
         </condition>
1040 1042
        <command>nasal</command>
1041
-       <script>zkv1000.PFD.softkeys.SoftKey(7, 1);</script>
1043
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(7, 1);</script>
1042 1044
       </binding>
1043 1045
       <mod-up>
1044 1046
         <binding>
... ...
@@ -1046,7 +1048,7 @@
1046 1048
             <property>/instrumentation/zkv1000/PFD/status</property>
1047 1049
           </condition>
1048 1050
           <command>nasal</command>
1049
-          <script>zkv1000.PFD.softkeys.SoftKey(7, 0);</script>
1051
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(7, 0);</script>
1050 1052
         </binding>
1051 1053
       </mod-up>
1052 1054
     </action>
... ...
@@ -1062,7 +1064,7 @@
1062 1064
           <property>/instrumentation/zkv1000/PFD/status</property>
1063 1065
         </condition>
1064 1066
        <command>nasal</command>
1065
-       <script>zkv1000.PFD.softkeys.SoftKey(8, 1);</script>
1067
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(8, 1);</script>
1066 1068
       </binding>
1067 1069
       <mod-up>
1068 1070
         <binding>
... ...
@@ -1070,7 +1072,7 @@
1070 1072
             <property>/instrumentation/zkv1000/PFD/status</property>
1071 1073
           </condition>
1072 1074
           <command>nasal</command>
1073
-          <script>zkv1000.PFD.softkeys.SoftKey(8, 0);</script>
1075
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(8, 0);</script>
1074 1076
         </binding>
1075 1077
       </mod-up>
1076 1078
     </action>
... ...
@@ -1086,7 +1088,7 @@
1086 1088
           <property>/instrumentation/zkv1000/PFD/status</property>
1087 1089
         </condition>
1088 1090
        <command>nasal</command>
1089
-       <script>zkv1000.PFD.softkeys.SoftKey(9, 1);</script>
1091
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(9, 1);</script>
1090 1092
       </binding>
1091 1093
       <mod-up>
1092 1094
         <binding>
... ...
@@ -1094,7 +1096,7 @@
1094 1096
             <property>/instrumentation/zkv1000/PFD/status</property>
1095 1097
           </condition>
1096 1098
           <command>nasal</command>
1097
-          <script>zkv1000.PFD.softkeys.SoftKey(9, 0);</script>
1099
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(9, 0);</script>
1098 1100
         </binding>
1099 1101
       </mod-up>
1100 1102
     </action>
... ...
@@ -1110,7 +1112,7 @@
1110 1112
           <property>/instrumentation/zkv1000/PFD/status</property>
1111 1113
         </condition>
1112 1114
        <command>nasal</command>
1113
-       <script>zkv1000.PFD.softkeys.SoftKey(10, 1);</script>
1115
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(10, 1);</script>
1114 1116
       </binding>
1115 1117
       <mod-up>
1116 1118
         <binding>
... ...
@@ -1118,7 +1120,7 @@
1118 1120
             <property>/instrumentation/zkv1000/PFD/status</property>
1119 1121
           </condition>
1120 1122
           <command>nasal</command>
1121
-          <script>zkv1000.PFD.softkeys.SoftKey(10, 0);</script>
1123
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(10, 0);</script>
1122 1124
         </binding>
1123 1125
       </mod-up>
1124 1126
     </action>
... ...
@@ -1134,7 +1136,7 @@
1134 1136
           <property>/instrumentation/zkv1000/PFD/status</property>
1135 1137
         </condition>
1136 1138
        <command>nasal</command>
1137
-       <script>zkv1000.PFD.softkeys.SoftKey(11, 1);</script>
1139
+       <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(11, 1);</script>
1138 1140
       </binding>
1139 1141
       <mod-up>
1140 1142
         <binding>
... ...
@@ -1142,7 +1144,7 @@
1142 1144
             <property>/instrumentation/zkv1000/PFD/status</property>
1143 1145
           </condition>
1144 1146
           <command>nasal</command>
1145
-          <script>zkv1000.PFD.softkeys.SoftKey(11, 0);</script>
1147
+          <script>zkv1000.flightdeck['PFD'].softkeys.SoftKey(11, 0);</script>
1146 1148
         </binding>
1147 1149
       </mod-up>
1148 1150
     </action>