From d831397c14f4ccea3880c112596abe2a82bf562a Mon Sep 17 00:00:00 2001 From: ackimixs Date: Tue, 16 Apr 2024 15:49:05 +0200 Subject: [PATCH] angle --- TCPServer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index b64a76f..00f0b10 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -242,7 +242,9 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) } } else if (tokens[0] == "arduino" && tokens[2] == "set state") { - this->isRobotMoving += (TCPUtils::startWith(tokens[3], "1") ? 0 : 1); + if (TCPUtils::startWith(tokens[3], "1")) { + this->isRobotMoving++; + } } std::cout << "Received: " << message << std::endl; }