aaa

Dependencies:   mbed BNO055_fusion Adafruit_GFX ros_lib_kinetic

Revision:
7:b240464868e8
Parent:
6:20a32baeff79
Child:
8:80708bacb5b5
--- a/myCan.cpp	Tue Dec 18 21:51:13 2018 +0000
+++ b/myCan.cpp	Tue Dec 18 22:06:34 2018 +0000
@@ -38,7 +38,6 @@
     static uint32_t ts[2] = {0.0, 0.0};
     static can_odom_xy_t xy;
     static can_odom_angle_t angle;
-    static float radian;
     
     switch(data[0]){
     case ODOM_SET_INITIAL_XY:
@@ -53,7 +52,6 @@
         for(int i = 0; i < 8; i++){
             angle.array[i] = data[i];  
         }
-        radian = DecodeFloat(angle.data.angle);
         ts[1] = timer_.read_ms();
     
         break;   
@@ -64,7 +62,7 @@
     }
     
     reset_pose();
-    Vec3f initialpose(DecodeFixedNumber(xy.data.x), DecodeFixedNumber(xy.data.y), radian);
+    Vec3f initialpose(DecodeFixedNumber(xy.data.x), DecodeFixedNumber(xy.data.y), DecodeFloat(angle.data.angle));
     set_initial_pose(initialpose);
     set_court_color((angle.data.court_color == 0) ? COURT_RED : COURT_BLUE);
     led_toggle_.call();