diff --git a/chef/src/dimensions.h b/chef/src/dimensions.h new file mode 100644 index 0000000..f5d4139 --- /dev/null +++ b/chef/src/dimensions.h @@ -0,0 +1,21 @@ +#ifndef __DIMENSIONS_H__ +#define __DIMENSIONS_H__ + +#include + +// TODO None of that is verified + +// [mm] +#define WHEEL_DIAMETER 80.0 +// [mm] +#define WHEEL_PERIMETER WHEEL_DIAMETER * M_PI +// [cycles/revolution] +#define CODER_RESOLUTION 100 +// [increments/revolution] +#define CODER_DATA_RESOLUTION CODER_RESOLUTION * 4 +// [mm] +#define CODER_DELTA_DISTANCE WHEEL_PERIMETER / CODER_DATA_RESOLUTION +// [mm] +#define DISTANCE_BETWEEN_WHEELS 250.0 + +#endif diff --git a/chef/src/movement.h b/chef/src/movement.h index caca772..e54ac11 100644 --- a/chef/src/movement.h +++ b/chef/src/movement.h @@ -1,9 +1,8 @@ -#ifndef __MOVEMENT_H_ -#define __MOVEMENT_H_ -#include "CA.h" -void brake(); -void aller(struct position* pos); - -#endif +int bouger(float vitL, float vitR); +// Vitesse en mm/s +// Vitesse < 0 ⇒ sens inverse +// Si vitesse < seuil ⇒ brake +int brake(); +int freewheel();