Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Base/Odometrie.h
- Revision:
- 0:1cfd66c3a181
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Base/Odometrie.h Wed May 22 16:54:27 2019 +0000 @@ -0,0 +1,42 @@ +#ifndef ODOMETRIE_H +#define ODOMETRIE_H + +#include "mbed.h" +#include "Encodeur.h" + +class Odometrie { + public: + // Constructeur: + Odometrie(Encodeur* encodeurG, Encodeur* encodeurD, float entraxe); + + void update(); + + // Getters: + float getX(); + float getY(); + float getTheta(); + float getDistance(); + float getRealDistance(); + float getVitesse(); + + // Pointeurs: + float* getX_ptr(); + float* getY_ptr(); + float* getTheta_ptr(); + float* getDistance_ptr(); + float* getVitesse_ptr(); + + private: + // Position et orientation: + float m_L, m_X, m_Y, m_Theta, m_distance, m_vitesse; + + // Encodeurs: + Encodeur* m_encodeurG; + Encodeur* m_encodeurD; + float m_ticks_par_mm, m_entraxe_ticks; + + int m_prev_encodeurG_count, m_prev_encodeurD_count; + +}; + +#endif \ No newline at end of file