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.
Fork of Timer by
Diff: Odometry/Odometry.h
- Revision:
- 78:c28bdbf29b6e
- Parent:
- 77:f19cc7f81f2a
--- a/Odometry/Odometry.h Thu May 05 08:46:08 2016 +0000
+++ b/Odometry/Odometry.h Thu May 05 13:17:00 2016 +0000
@@ -20,6 +20,12 @@
/* Si le robot parcourt un trop grand angle, il diminuer l'entraxe, sinon l'augmenter */
#define ENTRAXE 243.8
+#define STEP_T 0
+#define STEP_D 1
+
+#define MAIN_FCT_XY 0
+#define MAIN_FCT_XYT 1
+
/*
* Author : Benjamin Bertelone, reworked by Simon Emarre
*/
@@ -119,6 +125,11 @@
/** Permet de mettre à jour les valeurs de l'odometrie
*/
void update_odo(void);
+
+ void stop();
+ void pause();
+ void resume();
+ char getCurrentStep(){return currentStep;}
private:
RoboClaw &roboclaw;
@@ -128,11 +139,18 @@
double x, y, theta;
double m_vitLeft, m_vitRight;
double m_distLeft, m_distRight;
-
+
+ double saved_x_goal, saved_y_goal, saved_theta_goal;
+ char currentStep;
+ char currentMainFunction;
+ bool paused;
+
double m_distPerTick_left, m_distPerTick_right, m_v;
double erreur_ang;
bool arrived;
+
+ Timer timer;
};
#endif
