Index error
This commit is contained in:
parent
366b3db8f9
commit
9d896df965
@ -67,9 +67,9 @@ void LFR_StateMachine::parseString(string s)
|
||||
double wheels[4] = {0.0, 0.0, 0.0, 0.0};
|
||||
int mode = std::stoi(splitStr[0]);
|
||||
if(mode == 0) {
|
||||
for(int i = 1; i < 4; i++)
|
||||
for(int i = 1; i <= 4; i++)
|
||||
{
|
||||
wheels[i] = std::stod(splitStr[i]);
|
||||
wheels[i-1] = std::stod(splitStr[i]);
|
||||
}
|
||||
setState(State::Manual::getInstance());
|
||||
uartCommunicator.sendTelegram(wheels[0], wheels[1], wheels[2], wheels[3]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user