hello-dmx: make UPDATE_HZ rate configureable
authorTero Marttila <terom@paivola.fi>
Tue, 02 Dec 2014 00:21:46 +0200
changeset 100 d4ff49d86531
parent 99 b1f2b34d4f8c
child 101 18c461237630
hello-dmx: make UPDATE_HZ rate configureable
src/hello-dmx.c
--- a/src/hello-dmx.c	Sat Nov 08 17:51:16 2014 +0200
+++ b/src/hello-dmx.c	Tue Dec 02 00:21:46 2014 +0200
@@ -330,6 +330,9 @@
     return ERROR;
 }
 
+// Update rate when idle
+#define UPDATE_HZ 4
+
 void main ()
 {
     led_init();
@@ -339,7 +342,7 @@
 
     // mainloop
     char c = '>';
-    unsigned interval = 8000; // 2Hz
+    unsigned interval = (16000 / UPDATE_HZ);
 
     // start
     sei();