From 22433e52a7b0f2e5c548edb915ea11a38a8077ad Mon Sep 17 00:00:00 2001 From: sicarius Date: Tue, 20 Feb 2007 21:01:02 +0000 Subject: +++ Codework, Navigator&Positiontracker done (buggy?) --- .../Concept/Framework/modules/input/mouse_sensor.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'source/Concept/Framework/modules/input/mouse_sensor.h') 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 -- cgit v1.2.3