Robot's source code

Dependencies:   mbed

Revision:
85:8e95432d99d3
Parent:
79:d97090bb6470
Child:
93:4d5664e9188a
Child:
94:5c37bcf73d14
--- a/Odometry/Odometry2.cpp	Thu Apr 16 12:23:02 2015 +0000
+++ b/Odometry/Odometry2.cpp	Sat Apr 18 09:39:15 2015 +0000
@@ -23,6 +23,7 @@
     m_pulses_left = qei_left->getPulses();
     m_pulses_right = qei_right->getPulses();
     
+    
     // Vitesse du moteur gauche et droit
     m_vitLeft = 0;
     m_vitRight = 0;
@@ -57,6 +58,9 @@
     int delta_right = m_qei_right->getPulses() - m_pulses_right;
     m_pulses_right = m_qei_right->getPulses();
     
+    m_distLeft = m_pulses_left*m_distPerTick_left;
+    m_distRight = m_pulses_right*m_distPerTick_right;
+    
     m_vitLeft = m_distPerTick_left*delta_left/dt;
     m_vitRight = m_distPerTick_right*delta_right/dt;