35 lines
606 B
C
35 lines
606 B
C
![]() |
#ifndef _POSITION_H_
|
|||
|
#define _POSITION_H_
|
|||
|
|
|||
|
#include "../hal/maussensor.h"
|
|||
|
#include <math.h>
|
|||
|
|
|||
|
// Anzahl der Ticks, die f<>r eine ganze Umdrehung notwendig sind
|
|||
|
#define MAUS_FULL_TURN 160000
|
|||
|
|
|||
|
class Position {
|
|||
|
private:
|
|||
|
// Maussensorenklassen
|
|||
|
Maussensor maussensor0;
|
|||
|
Maussensor maussensor1;
|
|||
|
|
|||
|
// X und Y-Koordinate
|
|||
|
float x;
|
|||
|
float y;
|
|||
|
// Und die Ausrichtung als Winkel
|
|||
|
int ausrichtung;
|
|||
|
public:
|
|||
|
Position();
|
|||
|
~Position();
|
|||
|
|
|||
|
// Aktualisiert die Position
|
|||
|
void Aktualisieren();
|
|||
|
|
|||
|
// Gebe die internen Werte zur<75>ck
|
|||
|
int GetX();
|
|||
|
int GetY();
|
|||
|
int GetAusrichtung();
|
|||
|
};
|
|||
|
|
|||
|
#endif
|