summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/distance_sensor.h
diff options
context:
space:
mode:
authorsicarius <devnull@localhost>2007-02-18 18:59:00 +0100
committersicarius <devnull@localhost>2007-02-18 18:59:00 +0100
commitd1b1dea1fa769f4eed4262ae1ae2f1d15749e965 (patch)
treee74b46ab8a19b878a1bdfc90656ee93387be9f6e /source/Concept/Framework/distance_sensor.h
parentda9860f9a414d8ab403496ac74a51afc5ad3e48b (diff)
downloadrc2007-soccer-d1b1dea1fa769f4eed4262ae1ae2f1d15749e965.tar
rc2007-soccer-d1b1dea1fa769f4eed4262ae1ae2f1d15749e965.zip
+++ Additional Codework
Diffstat (limited to 'source/Concept/Framework/distance_sensor.h')
-rw-r--r--source/Concept/Framework/distance_sensor.h71
1 files changed, 0 insertions, 71 deletions
diff --git a/source/Concept/Framework/distance_sensor.h b/source/Concept/Framework/distance_sensor.h
deleted file mode 100644
index 832e556..0000000
--- a/source/Concept/Framework/distance_sensor.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef _DISTANCE_SENSOR_H
-#define _DISTANCE_SENSOR_H
-
-#include "stdafx.h"
-#include "sensor.h"
-
-class Distance_Sensor : public Sensor
-{
-public:
- Distance_Sensor()
- {
- this->parent = NULL;
- this->moduleId = 0;
- this->hardwarePort = NULL;
- this->hardwareDDR = NULL;
- this->hardwarePin = NULL;
- this->pin = 0;
- }
-
- Distance_Sensor(uint32 sensorId)
- {
- this->parent = NULL;
- this->moduleId = sensorId;
-
- switch(sensorId)
- {
- case IO_SENSOR_DISTANCE_0_DEG:
- this->hardwarePort = &PORTC;
- this->hardwareDDR = &DDRC;
- this->hardwarePin = &PINC;
- this->pin = (1 << 0);
- break;
- case IO_SENSOR_DISTANCE_90_DEG:
- this->hardwarePort = &PORTC;
- this->hardwareDDR = &DDRC;
- this->hardwarePin = &PINC;
- this->pin = (1 << 1);
- break;
- case IO_SENSOR_DISTANCE_180_DEG:
- this->hardwarePort = &PORTC;
- this->hardwareDDR = &DDRC;
- this->hardwarePin = &PINC;
- this->pin = (1 << 2);
- break;
- case IO_SENSOR_DISTANCE_270_DEG:
- this->hardwarePort = &PORTC;
- this->hardwareDDR = &DDRC;
- this->hardwarePin = &PINC;
- this->pin = (1 << 3);
- break;
- default:
- this->hardwarePort = NULL;
- this->hardwareDDR = NULL;
- this->hardwarePin = NULL;
- this->pin = 0;
- break;
- }
- }
-
-protected:
- //Hardware
- volatile uint8* hardwarePort;
- volatile uint8* hardwareDDR;
- volatile uint8* hardwarePin;
- uint8 pin;
-
-public:
- float GetDistance();
-};
-
-#endif