
Robot's source code
Dependencies: mbed
Diff: Asserv_Plan_B/planB.cpp
- Revision:
- 100:a827a645d6c2
- Parent:
- 94:5c37bcf73d14
- Parent:
- 93:4d5664e9188a
- Child:
- 101:78dc61bd330d
--- a/Asserv_Plan_B/planB.cpp Thu Apr 30 16:14:39 2015 +0000 +++ b/Asserv_Plan_B/planB.cpp Thu Apr 30 16:16:29 2015 +0000 @@ -60,10 +60,9 @@ float thetaGoal = atan2(m_goalY-m_odometry.getY(),m_goalX-m_odometry.getX()); float erreur_theta = thetaGoal-m_odometry.getTheta(); - if(erreur_theta <= PI) erreur_theta += 2.0*PI; - if(erreur_theta >= PI) erreur_theta -= 2.0*PI; - - logger.printf("%.2f\r\n",erreur_theta*180/PI); + + if(erreur_theta <= PI) erreur_theta += 2.0f*PI; + if(erreur_theta >= PI) erreur_theta -= 2.0f*PI; /*if(erreur_theta < 0) etat_angle = 1; else if(erreur_theta > 0) etat_angle = 2;