mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2024-11-21 15:46:06 +01:00
Définition contrôleur moteur
This commit is contained in:
parent
af080ac4bf
commit
befacfdc78
21
chef/src/dimensions.h
Normal file
21
chef/src/dimensions.h
Normal 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
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue