Debug Messages

This commit is contained in:
Tim Zeuner 2023-02-07 21:20:10 +01:00
parent 60e19a8968
commit a920aefa54
2 changed files with 6 additions and 7 deletions

View File

@ -14,7 +14,7 @@ void LFR_UART::openFile(const char *fileName) {
} }
int LFR_UART::writeDataToFile(uint8_t *buff, uint32_t bufferLength) { int LFR_UART::writeDataToFile(uint8_t *buff, uint32_t bufferLength) {
std::cout << "Sending uart telegram" << std::endl; //std::cout << "Sending uart telegram" << std::endl;
return write(this->fileDescriptor, buff, bufferLength); return write(this->fileDescriptor, buff, bufferLength);
} }

View File

@ -57,9 +57,13 @@ void LFR_StateMachine::parseString(string s)
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) {
@ -121,11 +125,6 @@ void LFR_StateMachine::setState(LFR_IState& newState)
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()