From a920aefa54cab4e0cb7368126a08f56fd47bf495 Mon Sep 17 00:00:00 2001 From: Tim Zeuner Date: Tue, 7 Feb 2023 21:20:10 +0100 Subject: [PATCH] Debug Messages --- Communication/uart_communication.cpp | 2 +- lfr_state_machine.cpp | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Communication/uart_communication.cpp b/Communication/uart_communication.cpp index d406d66..c7c948a 100644 --- a/Communication/uart_communication.cpp +++ b/Communication/uart_communication.cpp @@ -14,7 +14,7 @@ void LFR_UART::openFile(const char *fileName) { } 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); } diff --git a/lfr_state_machine.cpp b/lfr_state_machine.cpp index e5d868b..673f63b 100644 --- a/lfr_state_machine.cpp +++ b/lfr_state_machine.cpp @@ -57,9 +57,13 @@ void LFR_StateMachine::parseString(string s) std::vector splitStr = split(s, ";"); if(!checkStringValidity(splitStr)) { - std::cout<<"Invalid String" << std::endl; + std::cout<<"Error: Invalid String: " << s << std::endl; return; } + else + { + std::cout<< s << std::endl; + } double wheels[4] = {0.0, 0.0, 0.0, 0.0}; int mode = std::stoi(splitStr[0]); if(mode == 0) { @@ -121,11 +125,6 @@ void LFR_StateMachine::setState(LFR_IState& newState) currentState = &newState; currentState->enter(this); } - else - { - std::cout << "no switch" << std::endl; - } - } void LFR_StateMachine::enterAutonomous()