diff options
author | sicarius <devnull@localhost> | 2007-02-20 22:01:02 +0100 |
---|---|---|
committer | sicarius <devnull@localhost> | 2007-02-20 22:01:02 +0100 |
commit | 22433e52a7b0f2e5c548edb915ea11a38a8077ad (patch) | |
tree | 1d7add120a7fe0630dc798eaaf4a3277f2bb1e23 /source/Concept/Framework/modules/input | |
parent | ec2a18e931cdaa6c62a8843c29dc93c4a823a2cd (diff) | |
download | rc2007-soccer-22433e52a7b0f2e5c548edb915ea11a38a8077ad.tar rc2007-soccer-22433e52a7b0f2e5c548edb915ea11a38a8077ad.zip |
+++ Codework, Navigator&Positiontracker done (buggy?)
Diffstat (limited to 'source/Concept/Framework/modules/input')
-rwxr-xr-x | source/Concept/Framework/modules/input/mouse_sensor.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source/Concept/Framework/modules/input/mouse_sensor.h b/source/Concept/Framework/modules/input/mouse_sensor.h index 460e387..b3d1b1a 100755 --- a/source/Concept/Framework/modules/input/mouse_sensor.h +++ b/source/Concept/Framework/modules/input/mouse_sensor.h @@ -24,6 +24,8 @@ public: this->configReset = 0;
this->configAwake = 0;
this->newImage = false;
+ this->positionX = 0;
+ this->positionY = 0;
}
Mouse_Sensor(uint32 sensorId)
@@ -47,6 +49,8 @@ public: this->registerDeltaY = 0x02;
this->configReset = 0x80;
this->configAwake = 0x01;
+ this->positionX = -3.88f * TICKS_PER_CM;
+ this->positionY = -3.88f * TICKS_PER_CM;
break;
case IO_SENSOR_MOUSE_RIGHT:
this->hardwarePort = &PORTC;
@@ -61,6 +65,8 @@ public: this->registerDeltaY = 0x02;
this->configReset = 0x80;
this->configAwake = 0x01;
+ this->positionX = -3.88f * TICKS_PER_CM;
+ this->positionY = 3.88f * TICKS_PER_CM;
break;
default:
this->hardwarePort = NULL;
@@ -101,8 +107,10 @@ protected: uint8 registerDeltaY;
uint8 configReset;
uint8 configAwake;
+ //Information
+ float positionX;
+ float positionY;
-public:
void WriteByte(uint8 newByte)
{
*hardwareDDR |= pinSDA;//Set SDA output
@@ -180,6 +188,8 @@ public: return pixel;
}
+
+public:
uint8 GetSqual()
{
return Read(registerSqual);
@@ -194,6 +204,16 @@ public: {
return (int8)(Read(registerDeltaY));
}
+
+ float GetPositionX()
+ {
+ return positionX;
+ }
+
+ float GetPositionY()
+ {
+ return positionY;
+ }
};
#endif |