|
|
|
|
|
|
|
|
std::vector<std::string> splitStr = split(s, ";"); |
|
|
std::vector<std::string> splitStr = split(s, ";"); |
|
|
if(!checkStringValidity(splitStr)) |
|
|
if(!checkStringValidity(splitStr)) |
|
|
{ |
|
|
{ |
|
|
std::cout<<"Invalid String" << std::endl; |
|
|
|
|
|
|
|
|
std::cout<<"Error: Invalid String: " << s << std::endl; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
std::cout<< s << std::endl; |
|
|
|
|
|
} |
|
|
double wheels[4] = {0.0, 0.0, 0.0, 0.0}; |
|
|
double wheels[4] = {0.0, 0.0, 0.0, 0.0}; |
|
|
int mode = std::stoi(splitStr[0]); |
|
|
int mode = std::stoi(splitStr[0]); |
|
|
if(mode == 0) { |
|
|
if(mode == 0) { |
|
|
|
|
|
|
|
|
currentState = &newState; |
|
|
currentState = &newState; |
|
|
currentState->enter(this); |
|
|
currentState->enter(this); |
|
|
} |
|
|
} |
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
std::cout << "no switch" << std::endl; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void LFR_StateMachine::enterAutonomous() |
|
|
void LFR_StateMachine::enterAutonomous() |