changeset 258:066659214b23 main

Blink the second green LED on message reception from the CHRobotics IMU unit.
author Bob Cook <bob@bobcookdev.com>
date Mon, 07 Sep 2015 20:30:39 -0700
parents 9e43076f1433
children 7124845bf907
files main/robots/odr-imu/main.cpp
diffstat 1 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/main/robots/odr-imu/main.cpp	Mon Sep 07 20:28:32 2015 -0700
+++ b/main/robots/odr-imu/main.cpp	Mon Sep 07 20:30:39 2015 -0700
@@ -249,6 +249,8 @@
 
         if ( imu_process_pending() )
         {
+            led_green_2_toggle();
+
             if ( imu_did_receive_imu_angles() )
             {
                 if ( ! canmsg_send_imu_roll( imu_angle_roll() ) )
@@ -275,15 +277,6 @@
             }
         }
         
-        if ( status_is_imu_active() )
-        {
-            led_green_2_on();
-        }
-        else
-        {
-            led_green_2_off();
-        }
-
         //--    Check for an emergency situation?
 
         if ( g_triggers & trigger_check_emergency )