Showing 1 changed files with 13 additions and 4 deletions
+13 -4
Nasal/display.nas
... ...
@@ -170,7 +170,8 @@ var displayClass = {
170 170
             me.loadGroup(groups);
171 171
 
172 172
             if (me.role == 'PFD') {
173
-                me.update();
173
+                me.update20Hz();
174
+                me.update1Hz();
174 175
                 me.updateAI();
175 176
                 me.updateVSI();
176 177
                 me.updateIAS();
... ...
@@ -355,15 +356,15 @@ var displayClass = {
355 356
     },
356 357
 #}}}
357 358
 
358
-    update : func {
359
-# updates roll, pitch, VSI, IAS, altitude and HDG {{{
359
+    update20Hz : func {
360
+# 20Hz updates roll, pitch, VSI, IAS, altitude and HDG {{{
360 361
         me._updated_roll = getprop('/orientation/roll-deg');
361 362
         me._updated_pitch = getprop('orientation/pitch-deg');
362 363
         me._updated_vsi = getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm');
363 364
         me._updated_ias = getprop('/velocities/airspeed-kt');
364 365
         me._updated_alt = getprop('/instrumentation/altimeter/indicated-altitude-ft');
365 366
         me._updated_hdg = getprop('/orientation/heading-deg');
366
-        settimer(func me.update(), 0.05);
367
+        settimer(func me.update20Hz(), 0.05);
367 368
      },
368 369
     _updated_roll : 0,
369 370
     _updated_pitch : 0,
... ...
@@ -373,6 +374,14 @@ var displayClass = {
373 374
     _updated_hdg : 0,
374 375
 #}}}
375 376
 
377
+    update1Hz : func {
378
+# 1Hz updates {{{
379
+        me._updated_wow = getprop('/gear/gear/wow');
380
+        settimer(func me.update20Hz(), 1);
381
+    },
382
+    _updated_wow : 1,
383
+#}}}
384
+
376 385
     updateAI: func(){
377 386
 #{{{
378 387
         var pitch = me._updated_pitch;