1
0
Fork 0
mirror of https://github.com/RobotechLille/cdf2018-principal synced 2024-11-24 09:06:03 +01:00

Définition contrôleur moteur

This commit is contained in:
Geoffrey Frogeye 2018-03-26 10:07:21 +02:00
parent af080ac4bf
commit befacfdc78
2 changed files with 27 additions and 7 deletions

21
chef/src/dimensions.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef __DIMENSIONS_H__
#define __DIMENSIONS_H__
#include <math.h>
// 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

View file

@ -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();