1
0
Fork 0
mirror of https://github.com/RobotechLille/cdf2018-principal synced 2024-05-17 04:26:00 +02:00
cdf2018-principal/chef/src/position.h

31 lines
578 B
C
Raw Normal View History

2018-04-04 16:17:13 +02:00
/*
* Fonctions de calcul de la position du robot
*/
#ifndef __POSITION_H_
#define __POSITION_H_
2018-05-06 12:50:03 +02:00
// #define INVERSE_L_CODER
#define INVERSE_R_CODER
2018-04-04 16:17:13 +02:00
2018-05-11 15:58:18 +02:00
#define POSITION_INTERVAL 10
2018-04-29 09:38:49 +02:00
// Structures
2018-04-04 16:17:13 +02:00
struct __attribute__ ((packed)) position {
float x;
float y;
float o;
};
// Fonctions
void configurePosition();
void deconfigurePosition();
2018-05-02 08:26:35 +02:00
void getCoders(long* l, long* r);
2018-05-06 18:35:26 +02:00
unsigned int getPositionNewer(struct position* pos, unsigned int lastCalc);
unsigned int getPosition(struct position* pos);
void setPosition(struct position* pos);
void resetPosition();
2018-04-04 16:17:13 +02:00
#endif