34 lines
606 B
C++
Executable file
34 lines
606 B
C++
Executable file
#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ück
|
|
int GetX();
|
|
int GetY();
|
|
int GetAusrichtung();
|
|
};
|
|
|
|
#endif
|