Browse Source

Index error

master
Tim Zeuner 1 year ago
parent
commit
9d896df965
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      lfr_state_machine.cpp

+ 2
- 2
lfr_state_machine.cpp View File

@@ -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…
Cancel
Save