diff options
author | sicarius <devnull@localhost> | 2007-02-18 01:14:00 +0100 |
---|---|---|
committer | sicarius <devnull@localhost> | 2007-02-18 01:14:00 +0100 |
commit | 3c3c628b617dc53f0b7b59285c7d67888074c33d (patch) | |
tree | 1d1848b37d14036542e7b704440f4eb4f4d8ef7b /source/Concept/Framework/modules/input/ir_sensor.h | |
parent | 803027cbb45ebe01e4f8b427a7cc95728d6e5f47 (diff) | |
download | rc2007-soccer-3c3c628b617dc53f0b7b59285c7d67888074c33d.tar rc2007-soccer-3c3c628b617dc53f0b7b59285c7d67888074c33d.zip |
+++ Additional Codework
Diffstat (limited to 'source/Concept/Framework/modules/input/ir_sensor.h')
-rwxr-xr-x | source/Concept/Framework/modules/input/ir_sensor.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/source/Concept/Framework/modules/input/ir_sensor.h b/source/Concept/Framework/modules/input/ir_sensor.h new file mode 100755 index 0000000..30e6ea4 --- /dev/null +++ b/source/Concept/Framework/modules/input/ir_sensor.h @@ -0,0 +1,62 @@ +#ifndef _IR_SENSOR_H
+#define _IR_SENSOR_H
+
+#include "../../defines.h"
+#include "../../robot.h"
+#include "sensor.h"
+
+class IR_Sensor : public Sensor
+{
+public:
+ IR_Sensor()
+ {
+ this->parent = NULL;
+ this->moduleId = 0;
+ }
+
+ IR_Sensor(uint32 sensorId)
+ {
+ this->parent = NULL;
+ this->moduleId = sensorId;
+
+ switch(sensorId)
+ {
+ case IO_SENSOR_IR_0_DEG:
+ this->channel = 0;
+ break;
+ case IO_SENSOR_IR_30_DEG:
+ this->channel = 1;
+ break;
+ case IO_SENSOR_IR_60_DEG:
+ this->channel = 2;
+ break;
+ case IO_SENSOR_IR_100_DEG:
+ this->channel = 3;
+ break;
+ case IO_SENSOR_IR_180_DEG:
+ this->channel = 4;
+ break;
+ case IO_SENSOR_IR_260_DEG:
+ this->channel = 5;
+ break;
+ case IO_SENSOR_IR_300_DEG:
+ this->channel = 6;
+ break;
+ case IO_SENSOR_IR_330_DEG:
+ this->channel = 7;
+ break;
+ default:
+ this->channel = 8;
+ break;
+ }
+ }
+
+protected:
+ //Hardware
+ uint8 channel;
+
+public:
+ uint16 GetIRIntensity();
+};
+
+#endif |