From 7370f9ab1e76111114602b500ba9217bb7503865 Mon Sep 17 00:00:00 2001 From: sicarius Date: Sun, 4 Feb 2007 21:38:03 +0000 Subject: updated todo.txt; added some files as .pdf, too --- Information/Hardware/Hardwareliste.pdf | Bin 0 -> 170335 bytes Information/Hardware/Portbelegung.pdf | Bin 0 -> 227670 bytes Organisation/Todo.txt | 24 +++++++++++++----------- source/Concept/Framework/atmega128io.h | 2 +- source/Concept/Framework/defines.h | 2 +- source/Concept/Framework/engine.h | 2 +- source/Concept/Framework/io_module.h | 2 +- source/Concept/Framework/main.cpp | 4 ++-- source/Concept/Framework/robot.cpp | 31 +++++++++++++++++++------------ source/Concept/Framework/robot.h | 33 +++++++++++++++------------------ source/Concept/Framework/sensor.h | 2 +- source/Concept/Framework/stdafx.h | 8 +++----- 12 files changed, 57 insertions(+), 53 deletions(-) create mode 100644 Information/Hardware/Hardwareliste.pdf create mode 100644 Information/Hardware/Portbelegung.pdf diff --git a/Information/Hardware/Hardwareliste.pdf b/Information/Hardware/Hardwareliste.pdf new file mode 100644 index 0000000..1dba2c7 Binary files /dev/null and b/Information/Hardware/Hardwareliste.pdf differ diff --git a/Information/Hardware/Portbelegung.pdf b/Information/Hardware/Portbelegung.pdf new file mode 100644 index 0000000..224c474 Binary files /dev/null and b/Information/Hardware/Portbelegung.pdf differ diff --git a/Organisation/Todo.txt b/Organisation/Todo.txt index 2474799..564ba94 100644 --- a/Organisation/Todo.txt +++ b/Organisation/Todo.txt @@ -10,19 +10,16 @@ Hardware: Motoren können montiert werden Grundstücke für Befestigung von Tastsensoren(Maschendraht) Maussensoren eingebaut - Entfernungssensoren bis auf einen fertiggestellt, mit Befestigung + Ultraschallsensoren befestigt Todo: - Letzten Maussensor einbauen - Dribbler-befestigung verbessern - Tastsensoren-befestigtung ausarbeiten - Infrarotsensoren Schaltung ausarbeiten - Infrarotsensoren Schaltung löten - Infrarotsensoren befestigen - Verkabelung fertigstellen - Sensorik fertigstellen - Motorik fertigstellen + Dribbler fertigestellen(Räder sind nun vorhanden) + Tastsensoren befestigen + Ballsensoren fertigstellen(nearly done) + Eigene Schaltungen fertigstellen + Verkabelung + Motorik fertigstellen(entstören) Räder endgültig befestigen !!Zusammenbau & Verkabelung!! @@ -32,6 +29,7 @@ Software: Disskusion um Grundkonzept weitere Ausarbeitungen am Design Programmierumgebung eingerichtet + Platinen ausreichend konfigueriert(fuses gesetzt) Todo: @@ -44,9 +42,13 @@ Software: !!! Code Fertigstellung !!! Allgemein: + Getan: + + Teilnahmegebühren(120€) überwiesen + Todo: Anmeldung abschließen - ->10€ Kosten von Teilnehmern an Jakob, Teilnahmegebühr überweisen + ->10€ Kosten von Teilnehmern an Jakob Magdeburg organisieren ->Hin-/Rückfahrt ->Unterkunft diff --git a/source/Concept/Framework/atmega128io.h b/source/Concept/Framework/atmega128io.h index 46d0f69..94912b6 100644 --- a/source/Concept/Framework/atmega128io.h +++ b/source/Concept/Framework/atmega128io.h @@ -6,4 +6,4 @@ namespace hardware }; -#endif \ No newline at end of file +#endif diff --git a/source/Concept/Framework/defines.h b/source/Concept/Framework/defines.h index 698163a..fd07125 100644 --- a/source/Concept/Framework/defines.h +++ b/source/Concept/Framework/defines.h @@ -88,4 +88,4 @@ enum IOModuleNames IO_END = IO_SENSOR_END, }; -#endif \ No newline at end of file +#endif diff --git a/source/Concept/Framework/engine.h b/source/Concept/Framework/engine.h index 406d46e..0b8bfac 100644 --- a/source/Concept/Framework/engine.h +++ b/source/Concept/Framework/engine.h @@ -16,4 +16,4 @@ public: } }; -#endif \ No newline at end of file +#endif diff --git a/source/Concept/Framework/io_module.h b/source/Concept/Framework/io_module.h index 8aa7ef7..271f7a7 100644 --- a/source/Concept/Framework/io_module.h +++ b/source/Concept/Framework/io_module.h @@ -26,4 +26,4 @@ public: }; -#endif \ No newline at end of file +#endif diff --git a/source/Concept/Framework/main.cpp b/source/Concept/Framework/main.cpp index 6305a1e..cf80770 100644 --- a/source/Concept/Framework/main.cpp +++ b/source/Concept/Framework/main.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" int main() { @@ -44,4 +44,4 @@ int main() //Cleanup delete localRobot; localRobot = NULL; -} \ No newline at end of file +} diff --git a/source/Concept/Framework/robot.cpp b/source/Concept/Framework/robot.cpp index 768554e..24038d3 100644 --- a/source/Concept/Framework/robot.cpp +++ b/source/Concept/Framework/robot.cpp @@ -1,24 +1,31 @@ -#include "robot.h" +#include "robot.h" + +//----------------------------------------------------------------------------- +Robot::Robot() +{ + memset(modules, NULL, sizeof(modules)); +} //----------------------------------------------------------------------------- Robot::~Robot() -{ - while(!modules.empty()) - { - moduleMap::iterator iter = modules.begin(); - delete iter->second; - modules.erase(iter); +{ + for(uint8 i = 0; i < IO_END; i++) + { + if(!modules[i]) continue; + + delete modules[i]; + modules[i] = NULL; } } //----------------------------------------------------------------------------- bool Robot::AddModule(IO_Module* newModule) -{ - moduleMap::iterator itr = modules.find(newModule->GetId()); - if(itr != modules.end()) +{ + if(modules[newModule->GetId()]) return false; - modules[newModule->GetId()] = newModule; + modules[newModule->GetId()] = newModule; + return true; } @@ -34,4 +41,4 @@ void Robot::Update() //insert code here } -//--- EOF --- \ No newline at end of file +//--- EOF --- diff --git a/source/Concept/Framework/robot.h b/source/Concept/Framework/robot.h index 543f1ed..db7fe15 100644 --- a/source/Concept/Framework/robot.h +++ b/source/Concept/Framework/robot.h @@ -9,32 +9,29 @@ class Engine; class Robot { -public: +public: + Robot(); ~Robot(); private: - typedef hash_map moduleMap; - moduleMap modules; + IO_Module* modules[IO_END]; public: bool AddModule(IO_Module* newModule); - template T* GetModule(uint32 moduleId) - { - moduleMap::const_iterator itr = modules.find(moduleId); - if(itr == modules.end()) - return NULL; - else - return ((T*)itr->second); + template T* GetModule(uint8 moduleId) + { + return ((T*)modules[moduleId]); } - bool RemoveModule(uint32 moduleId) - { - moduleMap::iterator itr = modules.find(moduleId); - if(itr == modules.end()) - return false; - - modules.erase(itr); + bool RemoveModule(uint8 moduleId) + { + if(!modules[moduleId]) + return false; + + delete modules[moduleId]; + modules[moduleId] = NULL; + return true; } @@ -43,4 +40,4 @@ public: void Update(); }; -#endif \ No newline at end of file +#endif diff --git a/source/Concept/Framework/sensor.h b/source/Concept/Framework/sensor.h index 23e40e9..15dcdc0 100644 --- a/source/Concept/Framework/sensor.h +++ b/source/Concept/Framework/sensor.h @@ -26,4 +26,4 @@ public: } }; -#endif \ No newline at end of file +#endif diff --git a/source/Concept/Framework/stdafx.h b/source/Concept/Framework/stdafx.h index 0a5a81e..d653b9e 100644 --- a/source/Concept/Framework/stdafx.h +++ b/source/Concept/Framework/stdafx.h @@ -1,12 +1,10 @@ -#include #include -#include -#include using namespace std; -#include "defines.h" +#include "defines.h" +#include "tools.h" #include "io_module.h" #include "sensor.h" #include "engine.h" -#include "robot.h" \ No newline at end of file +#include "robot.h" -- cgit v1.2.3