changeset 223:5f11f6622bc4 main

Write out the GPS messages.
author Bob Cook <bob@bobcookdev.com>
date Thu, 17 Apr 2014 22:01:14 -0700
parents 8170f8bde4d1
children 5e91f5877f1f
files main/robots/cantool/CmdListen.cpp
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/main/robots/cantool/CmdListen.cpp	Thu Apr 17 21:59:49 2014 -0700
+++ b/main/robots/cantool/CmdListen.cpp	Thu Apr 17 22:01:14 2014 -0700
@@ -88,10 +88,11 @@
     msg->msgData( reinterpret_cast< uint8_t* >( &info ), sizeof( info ) );
 
     int    deg = info.degrees;
-    double min = static_cast< double >( info.min_thousandths ) / can_data_gps_min_multiplier;
+    double min = static_cast< double >( info.min_thousandths )
+               / can_data_gps_min_multiplier;
 
     std::cout << "gps latitude:  " << Poco::NumberFormatter::format( deg )
-        << " " << Poco::NumberFormatter::format( min )
+        << " " << Poco::NumberFormatter::format( min, 4 )
         << std::endl;
 }
 
@@ -103,10 +104,11 @@
     msg->msgData( reinterpret_cast< uint8_t* >( &info ), sizeof( info ) );
 
     int    deg = info.degrees;
-    double min = static_cast< double >( info.min_thousandths ) / can_data_gps_min_multiplier;
+    double min = static_cast< double >( info.min_thousandths )
+               / can_data_gps_min_multiplier;
 
     std::cout << "gps longitude: " << Poco::NumberFormatter::format( deg )
-        << " " << Poco::NumberFormatter::format( min )
+        << " " << Poco::NumberFormatter::format( min, 4 )
         << std::endl;
 }
 
@@ -183,10 +185,12 @@
 
             case can_dataid_latitude:
                 MsgGpsLatitude( msg );
+                std::cout << "message: " << CANMessage::asText( msg ) << std::endl;
                 break;
 
             case can_dataid_longitude:
                 MsgGpsLongitude( msg );
+                std::cout << "message: " << CANMessage::asText( msg ) << std::endl;
                 break;
 
             case can_dataid_gps_fix: