diff --git a/TCPServer.cpp b/TCPServer.cpp index 814ebde..1a78acb 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -236,7 +236,7 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) } else if (tokens[0] == "arduino" && tokens[2] == "set state") { std::cout << message << std::endl; - this->canMove = (tokens[3] == "0"); + this->canMove = TCPUtils::startWith(tokens[3], "0"); std::cout << this->canMove << std::endl; } // std::cout << "Received: " << message << std::endl;