changeset 239:29e5eaf00ff5 main

green led toggle on fully-received GPS sentence
author Bob Cook <bob@bobcookdev.com>
date Sat, 27 Dec 2014 08:45:42 -0800
parents 0cd59a309606
children e83616798e5c
files main/robots/odr-gps/main.cpp
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main/robots/odr-gps/main.cpp	Sat Dec 27 08:43:17 2014 -0800
+++ b/main/robots/odr-gps/main.cpp	Sat Dec 27 08:45:42 2014 -0800
@@ -1,6 +1,6 @@
 // ----------------------------------------------------------------------------------------
 //
-//  Copyright (C) 2013 Bob Cook
+//  Copyright (C) 2013-2014 Bob Cook
 //    
 //  Bob Cook Development, Robotics Library
 //  http://www.bobcookdev.com/rl/
@@ -263,14 +263,13 @@
             {
                 //--    NMEA sentence parsed successfully.
 
+                led_green_2_toggle();
                 status_got_gps_sentence();
 
                 uint8_t satellites;
 
                 if ( nmea_position_fix( &satellites ) )
                 {
-                    led_green_2_on();
-                    
                     if ( ! canmsg_send_gps_fix_info( satellites ) )
                     {
                         ++can_comm_errors;
@@ -296,8 +295,6 @@
                 }
                 else
                 {
-                    led_green_2_toggle();
-
                     if ( ! canmsg_send_gps_fix_info( 0 ) )
                     {
                         ++can_comm_errors;