Robot's source code

Dependencies:   mbed

Revision:
43:87bdce65341f
Parent:
33:eab29f01e499
Child:
47:4909e97570f6
--- a/Odometry/Odometry.cpp	Wed Mar 18 13:47:40 2015 +0000
+++ b/Odometry/Odometry.cpp	Thu Mar 19 14:35:25 2015 +0000
@@ -23,9 +23,9 @@
     
     setPos(0,0,0);
     setVit(0,0,0);
-    dt = time(NULL);
+    dt = 0.1;
     
-    updater.attach(this, &Odometry::update, 0.2);
+    updater.attach(this, &Odometry::update, dt);
 }
 
 void Odometry::setPos(float x, float y, float theta)
@@ -83,8 +83,7 @@
     theta += deltaTheta;
     
     //update velocity
-    //dt = time(NULL)-dt;
-    dt = 0.2;
+    //dt = time(NULL)-dt;    
     //dt = timer.read_ms()*1e3;
     //pc.printf("%f secondes",dt);