From 37fa0130a5607b19035ea438909158bb3b95feaf Mon Sep 17 00:00:00 2001 From: ackimixs Date: Tue, 16 Apr 2024 12:22:49 +0200 Subject: [PATCH] remove end angle --- TCPServer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 38da880..bf13259 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -242,7 +242,7 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) } } else if (tokens[0] == "arduino" && tokens[2] == "set state") { - this->isRobotMoving += (TCPUtils::startWith(tokens[3], "0") ? 1 : 0); + this->isRobotMoving += (TCPUtils::startWith(tokens[3], "1") ? 0 : 1); } std::cout << "Received: " << message << std::endl; } @@ -461,8 +461,8 @@ void TCPServer::startGame() { } usleep(500'000); - toSend = "start;arduino;angle;" + std::to_string(this->endRobotPose.theta * 100) + "\n"; - this->broadcastMessage(toSend); + // toSend = "start;arduino;angle;" + std::to_string(this->endRobotPose.theta * 100) + "\n"; + // this->broadcastMessage(toSend); this->broadcastMessage("strat;servo_moteur;clear;1"); }