Showing 2 changed files with 29 additions and 29 deletions
-29
Nasal/core.nas
... ...
@@ -1,32 +1,3 @@
1
-data = { # set of data common to all devices
2
-    roll : 0,
3
-    pitch : 0,
4
-    vsi : 0,
5
-    ias : 0,
6
-    alt : 0,
7
-    hdg : 0,
8
-    wow : 1,
9
-    timers : {
10
-        '20Hz': maketimer (
11
-            0.05,
12
-            func {
13
-                data.roll = getprop('/orientation/roll-deg');
14
-                data.pitch = getprop('orientation/pitch-deg');
15
-                data.vsi = getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm');
16
-                data.ias = getprop('/velocities/airspeed-kt');
17
-                data.alt = getprop('/instrumentation/altimeter/indicated-altitude-ft');
18
-                data.hdg = getprop('/orientation/heading-deg');
19
-            }
20
-        ),
21
-        '1Hz': maketimer (
22
-            1,
23
-            func {
24
-                data.wow = getprop('/gear/gear/wow');
25
-            }
26
-        ),
27
-    },
28
-};
29
-
30 1
 var setListeners = func {
31 2
     setlistener('/instrumentation/nav/nav-id',
32 3
             func (n) {
+29
zkv1000.nas
... ...
@@ -20,6 +20,35 @@ files_to_load = [
20 20
 
21 21
 var flightdeck = {};
22 22
 
23
+var data = { # set of data common to all devices
24
+    roll : 0,
25
+    pitch : 0,
26
+    vsi : 0,
27
+    ias : 0,
28
+    alt : 0,
29
+    hdg : 0,
30
+    wow : 1,
31
+    timers : {
32
+        '20Hz': maketimer (
33
+            0.05,
34
+            func {
35
+                data.roll = getprop('/orientation/roll-deg');
36
+                data.pitch = getprop('orientation/pitch-deg');
37
+                data.vsi = getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm');
38
+                data.ias = getprop('/velocities/airspeed-kt');
39
+                data.alt = getprop('/instrumentation/altimeter/indicated-altitude-ft');
40
+                data.hdg = getprop('/orientation/heading-deg');
41
+            }
42
+        ),
43
+        '1Hz': maketimer (
44
+            1,
45
+            func {
46
+                data.wow = getprop('/gear/gear/wow');
47
+            }
48
+        ),
49
+    },
50
+};
51
+
23 52
 var zkv = cdi = radios = alerts = infos = cursors = afcs = eis = nil;
24 53
 
25 54
 var init_props = func {