From 141eec269a6b023a5c65b68041ca41b133bc0a04 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Wed, 15 May 2024 19:27:20 +0200 Subject: [PATCH] angle --- TCPServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index fb3e9b6..bd9c937 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -178,7 +178,7 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) this->broadcastMessage("strat;arduino;speed;" + std::to_string(speed) + "\n"); } else { - if (speed > 0 && (this->lidarDectectionAngle > PI / 2 || this->lidarDectectionAngle < 3 * PI / 2)) { + if (speed > 0 && !(this->lidarDectectionAngle > PI / 2 || this->lidarDectectionAngle < 3 * PI / 2)) { this->broadcastMessage("strat;arduino;speed;" + std::to_string(speed) + "\n"); } // else if (speed < 0 && !(this->lidarDectectionAngle < PI / 2 && this->lidarDectectionAngle > 3 *PI / 2)) {