From 524005c4a5f3b57dde25949af060c9b95344dafb Mon Sep 17 00:00:00 2001 From: ackimixs Date: Wed, 15 May 2024 19:23:55 +0200 Subject: [PATCH] angle --- TCPServer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 03f674b..0d938fb 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -177,14 +177,14 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) if (!handleEmergecnyFlag) { 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"); } - else 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)) { + // this->broadcastMessage("strat;arduino;speed;" + std::to_string(speed) + "\n"); + // } + } } else if (args[0] == "2") { int speed = static_cast((value * 3.1) / 327.670f);