small corection
This commit is contained in:
parent
b18e19bee5
commit
343397ecf6
3 changed files with 10 additions and 5 deletions
|
@ -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;
|
||||
}*/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Reference in a new issue