]> git.defcon.no Git - rctxduino/commitdiff
Merge branch 'jstt_2'
authorHans Åge Martinsen <hamartin@moshwire.com>
Wed, 7 Sep 2011 17:51:53 +0000 (19:51 +0200)
committerHans Åge Martinsen <hamartin@moshwire.com>
Wed, 7 Sep 2011 17:51:53 +0000 (19:51 +0200)
hardware/prototype_1/rf-adapter-stage.brd
hardware/prototype_1/rf-adapter-stage.sch
source/RCTXDuino/RCTXDuino.pde

index a6af9aaae5d8fd28b5fb0231a739637ce08f9abc..c81586e3be84fa150e41e266e3c35405d31a28f4 100644 (file)
Binary files a/hardware/prototype_1/rf-adapter-stage.brd and b/hardware/prototype_1/rf-adapter-stage.brd differ
index fcfd087f7c8bc3ba3f5dea7ff2a8fed154c912eb..07847931835c0ad5823f830fec9fa348801bba65 100644 (file)
Binary files a/hardware/prototype_1/rf-adapter-stage.sch and b/hardware/prototype_1/rf-adapter-stage.sch differ
index 0bc85626db0fc0992c86333e0fbb1029ae1a0151..d560fb4b8e6cedb8e89bcd4b508b118b21612eb2 100644 (file)
@@ -224,15 +224,8 @@ void model_defaults( void )
 }
 
 // ---------- Arduino main loop -----------------------
-void loop () {
-  
-  // Determine if the UI needs to run...
-  boolean disp;
-  if ( millis() - last > UI_INTERVAL ) { 
-    last = millis(); 
-    disp = true; 
-  }
-  else disp = false;
+void loop ()
+{  
 
   process_inputs();
 
@@ -243,10 +236,13 @@ void loop () {
     displaystate = BATTERY;
   }
 
-  if ( disp )
-  {
+  if ( millis() - last > UI_INTERVAL ) 
+  { 
+    last = millis(); 
     ui_handler(); 
   }
+  
+
   if ( displaystate != MENU )
   {
     // Debugging: how long does the main loop take on avg,