diff options
author | masterm <devnull@localhost> | 2007-02-23 00:49:04 +0100 |
---|---|---|
committer | masterm <devnull@localhost> | 2007-02-23 00:49:04 +0100 |
commit | 343397ecf6e8ba9ca94fc61e27c241139eff120b (patch) | |
tree | b5f938cf93c9f1000e88d011fa79326d85e5c860 /source | |
parent | b18e19bee517d70d36c00f5561a075d46b0c20bd (diff) | |
download | rc2007-soccer-343397ecf6e8ba9ca94fc61e27c241139eff120b.tar rc2007-soccer-343397ecf6e8ba9ca94fc61e27c241139eff120b.zip |
small corection
Diffstat (limited to 'source')
-rwxr-xr-x | source/Concept/Framework/main.c | 2 | ||||
-rw-r--r-- | source/Concept/Framework/modules/interpreter/command_handler.c | 4 | ||||
-rw-r--r-- | source/Concept/Framework/modules/interpreter/command_handler.h | 9 |
3 files changed, 10 insertions, 5 deletions
diff --git a/source/Concept/Framework/main.c b/source/Concept/Framework/main.c index 8f9c7a2..ba0e280 100755 --- a/source/Concept/Framework/main.c +++ b/source/Concept/Framework/main.c @@ -262,7 +262,7 @@ int main() case 10:
ourPosition_Tracker->SetPosition(0,0,0); // Reset Position_Tracker
break;
- case 12:
+ case 11:
ourLogic->SetKeeper(true); // Reset Position_Tracker
break;
}*/
diff --git a/source/Concept/Framework/modules/interpreter/command_handler.c b/source/Concept/Framework/modules/interpreter/command_handler.c index dcd97b2..7d8937b 100644 --- a/source/Concept/Framework/modules/interpreter/command_handler.c +++ b/source/Concept/Framework/modules/interpreter/command_handler.c @@ -26,7 +26,7 @@ void Command_Handler::Update() {
if(this->currentCommandLength < COMMAND_BUFFER_SIZE)
{
- this->buffer[this->currentCommandLength] = '0' + curInput;
+ this->buffer[this->currentCommandLength] = curInput;
this->currentCommandLength++;
}
}
@@ -38,7 +38,7 @@ void Command_Handler::Update() //-----------------------------------------------------------------------------
void Command_Handler::ExecuteCommand()
{
- if(this->buffer[0] == '5')
+ if(this->buffer[0] == 5)
{
this->displayDistanceSensors = true;
}
diff --git a/source/Concept/Framework/modules/interpreter/command_handler.h b/source/Concept/Framework/modules/interpreter/command_handler.h index 102797a..c3bc5bb 100644 --- a/source/Concept/Framework/modules/interpreter/command_handler.h +++ b/source/Concept/Framework/modules/interpreter/command_handler.h @@ -12,6 +12,11 @@ public: this->moduleId = 0;
this->currentCommandLength = 0;
this->displayDistanceSensors = false;
+
+ for(uint8 i = 0; i < COMMAND_BUFFER_SIZE; i++)
+ {
+ buffer[i] = 0;
+ }
}
Command_Handler(uint32 commandHandlerId)
@@ -23,13 +28,13 @@ public: for(uint8 i = 0; i < COMMAND_BUFFER_SIZE; i++)
{
- buffer[i] = NULL;
+ buffer[i] = 0;
}
}
protected:
uint8 currentCommandLength;
- char* buffer[COMMAND_BUFFER_SIZE];
+ uint8 buffer[COMMAND_BUFFER_SIZE];
void ExecuteCommand();
|