From 7e292d62be1a74107f5006da3d00361a5ea2b986 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Wed, 15 May 2024 19:41:09 +0200 Subject: [PATCH] angle --- TCPServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 61e364f..35851df 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -178,10 +178,10 @@ 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)) { + else if (speed < 0 && !(this->lidarDectectionAngle > PI / 2 || this->lidarDectectionAngle < 3 *PI / 2)) { this->broadcastMessage("strat;arduino;speed;" + std::to_string(speed) + "\n"); } }