diff options
Diffstat (limited to 'source/Concept/Framework/main.c')
-rwxr-xr-x | source/Concept/Framework/main.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source/Concept/Framework/main.c b/source/Concept/Framework/main.c index ffc4cc9..8f9c7a2 100755 --- a/source/Concept/Framework/main.c +++ b/source/Concept/Framework/main.c @@ -122,6 +122,14 @@ int main() newKeyboard = NULL;
}
+ //Init Command Handler
+ for(uint8 i = IO_COMMAND_HANDLER_START; i < IO_COMMAND_HANDLER_END; i++)
+ {
+ Command_Handler* newCommandHandler = new Command_Handler(i);
+ localRobot->AddModule(newCommandHandler);
+ newCommandHandler = NULL;
+ }
+
//Init Position Tracker
for(uint8 i = IO_POSITION_TRACKER_START; i < IO_POSITION_TRACKER_END; i++)
{
@@ -168,7 +176,7 @@ int main() uint16 value = 0;
int8 value2 = 0;
- Keyboard* ourKeyboard = localRobot->GetModule<Keyboard>(IO_KEYBOARD_MAIN);
+ Command_Handler* ourCommandHandler = localRobot->GetModule<Command_Handler>(IO_COMMAND_HANDLER_MAIN);
uint32 i = 1;
Navigator* ourNavigator = localRobot->GetModule<Navigator>(IO_NAVIGATOR_MAIN);
Position_Tracker* ourPosition_Tracker = localRobot->GetModule<Position_Tracker>(IO_POSITION_TRACKER_MAIN);
@@ -194,7 +202,7 @@ int main() //msleep(50);
- if(!(i % 20))
+ if(ourCommandHandler->displayDistanceSensors && !(i % 20))
{
ourDisplay->Clear();
@@ -215,13 +223,8 @@ int main() ourDisplay->Print(value);
ourDisplay->Print(";");
}
-
- if(!(i % 20))
- {
- //ourAktuator->Kick();
- }
- uint8 someInput = ourKeyboard->GetInput();
+ /*uint8 someInput = ourKeyboard->GetInput();
//ourDisplay->Print("Ready to accept...", 1, 2);
switch(someInput)
{
@@ -262,7 +265,7 @@ int main() case 12:
ourLogic->SetKeeper(true); // Reset Position_Tracker
break;
- }
+ }*/
//ourDisplay->Clear();
if(!(i % 20))
|