summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/main.cpp
diff options
context:
space:
mode:
authorsicarius <devnull@localhost>2007-01-16 17:10:05 +0100
committersicarius <devnull@localhost>2007-01-16 17:10:05 +0100
commit79115386afc1dee957f77e9a82b5b9b2c5f347e6 (patch)
tree6b9f8dd15eb4032d569c026750095ba00a7479e5 /source/Concept/Framework/main.cpp
parent3b12c56f1b11be4aa538638baffa0b298440c57f (diff)
downloadrc2007-soccer-79115386afc1dee957f77e9a82b5b9b2c5f347e6.tar
rc2007-soccer-79115386afc1dee957f77e9a82b5b9b2c5f347e6.zip
Changed some things in Concept directory
Diffstat (limited to 'source/Concept/Framework/main.cpp')
-rw-r--r--source/Concept/Framework/main.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/source/Concept/Framework/main.cpp b/source/Concept/Framework/main.cpp
new file mode 100644
index 0000000..6305a1e
--- /dev/null
+++ b/source/Concept/Framework/main.cpp
@@ -0,0 +1,47 @@
+#include "stdafx.h"
+
+int main()
+{
+ //Init our robot
+ Robot* localRobot = new Robot();
+
+ //Init Engines
+ for(uint8 i = IO_ENGINE_START; i < IO_ENGINE_END; i++)
+ {
+ Engine* newEngine = new Engine(i);
+ localRobot->AddModule(newEngine);
+ newEngine = NULL;
+ }
+
+ //Init Sensors
+ for(uint8 i = IO_SENSOR_START; i < IO_SENSOR_END; i++)
+ {
+ SensorTypes newSensorType;
+
+ switch(i)
+ {
+ //Cases when sensor is digital:
+ // newSensorType = SENSOR_TYPE_DIGITAL;
+ // break;
+
+ //Other cases
+ default:
+ newSensorType = SENSOR_TYPE_ANALOG;
+ break;
+ }
+
+ Sensor* newSensor = new Sensor(i, newSensorType);
+ localRobot->AddModule(newSensor);
+ newSensor = NULL;
+ }
+
+ //Run
+ while(true)
+ {
+ localRobot->Update();
+ }
+
+ //Cleanup
+ delete localRobot;
+ localRobot = NULL;
+} \ No newline at end of file