Showing 4 changed files with 6 additions and 31 deletions
+5 -11
Nasal/core.nas
... ...
@@ -57,6 +57,7 @@ var deviceClass = {
57 57
         });
58 58
         zkv.getNode(m.role ~ 'init').setIntValue(0);
59 59
         m.setstatus(d + 1);
60
+        msg(m.role ~ ' switched on!');
60 61
         return m;
61 62
     },
62 63
 
... ...
@@ -120,15 +121,8 @@ var deviceClass = {
120 121
     },
121 122
 };
122 123
 
123
-var powerOn = func (d) {
124
-    device[d] = deviceClass.new(d);
125
-#    device[d].display.show(device[d].role);
126
-    msg(device[d].role ~ ' switched on!');
127
-
128
-#    if (device[abs(d - 1)] == nil) {
129
-#setlistener('/gear/gear/wow', inAirCheckings, 0, 0);
130
-#        fgcommand('reinit', props.Node.new({subsytem : 'xml-autopilot'}));
131
-#        settimer(main_loop, 0);
132
-#    }
133
-#    init_main_loop();
124
+var powerOn = func {
125
+    device[0] = deviceClass.new(0);
126
+    device[1] = deviceClass.new(1);
127
+    setListeners();
134 128
 }
+1 -1
Systems/multikey.xml
... ...
@@ -10,7 +10,7 @@
10 10
         <desc>Power ON device</desc>
11 11
         <binding>
12 12
           <command>nasal</command>
13
-          <script>zkv1000.powerOn(0); settimer(func { zkv1000.powerOn(1) }, 1);</script>
13
+          <script>zkv1000.powerOn();</script>
14 14
         </binding>
15 15
       </key>
16 16
       <key n="108">
-10
mfd.xml
... ...
@@ -860,16 +860,6 @@
860 860
     <object-name>SoftKey.000</object-name>
861 861
     <action>
862 862
       <button>0</button>
863
-      <binding>
864
-        <condition>
865
-          <not>
866
-            <property>/instrumentation/zkv1000/device[1]/status</property>
867
-          </not>
868
-          <property>/instrumentation/zkv1000/device[1]/status</property>
869
-        </condition>
870
-        <command>nasal</command>
871
-        <script>zkv1000.powerOn(1);</script>
872
-      </binding>
873 863
       <binding>
874 864
         <condition>
875 865
           <property>/instrumentation/zkv1000/device[1]/status</property>
-9
pfd.xml
... ...
@@ -871,15 +871,6 @@
871 871
     <object-name>SoftKey.000</object-name>
872 872
     <action>
873 873
       <button>0</button>
874
-      <binding>
875
-        <condition>
876
-          <not>
877
-            <property>/instrumentation/zkv1000/device[0]/status</property>
878
-          </not>
879
-        </condition>
880
-        <command>nasal</command>
881
-        <script>zkv1000.powerOn(0);</script>
882
-      </binding>
883 874
       <binding>
884 875
         <condition>
885 876
           <property>/instrumentation/zkv1000/device[0]/status</property>