mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2024-09-28 08:13:06 +02:00
32 lines
586 B
C
32 lines
586 B
C
/*
|
|
* Fonctions de calcul de la position du robot
|
|
*/
|
|
|
|
#ifndef __POSITION_H_
|
|
#define __POSITION_H_
|
|
|
|
#include "CF.h"
|
|
#include <pthread.h>
|
|
|
|
// #define INVERSE_L_CODER
|
|
#define INVERSE_R_CODER
|
|
|
|
// Structures
|
|
struct __attribute__ ((packed)) position {
|
|
float x;
|
|
float y;
|
|
float o;
|
|
};
|
|
|
|
// Fonctions
|
|
void configurePosition();
|
|
void deconfigurePosition();
|
|
void getCoders(long* l, long* r);
|
|
unsigned int getPositionNewer(struct position* pos, unsigned int lastCalc);
|
|
unsigned int getPosition(struct position* pos);
|
|
void setPosition(struct position* pos);
|
|
void resetPosition();
|
|
|
|
#endif
|
|
|