Showing 1 changed files with 5 additions and 3 deletions
+5 -3
zkv1000.nas
... ...
@@ -205,9 +205,11 @@ var zkv1000_init = func {
205 205
     init_props();
206 206
     load_multikey();
207 207
     load_nasal();
208
-    print('zkv1000 loaded');
209
-    if (zkv.getValue('auto-power'))
210
-        data.listeners.autopower = setlistener(zkv.getPath() ~ '/serviceable', zkv1000.powerOn, 0, 0);
208
+    msg('loaded');
209
+    if (zkv.getValue('auto-power')) {
210
+        var prop = zkv.getNode('serviceable',1).getPath();
211
+        data.listeners[prop] = setlistener(prop, zkv1000.powerOn, 0, 0);
212
+    }
211 213
 }
212 214
 
213 215
 var init = setlistener('/sim/signals/fdm-initialized', zkv1000_init, 0, 0);