This commit is contained in:
ackimixs
2024-05-15 19:27:20 +02:00
parent 5625549a57
commit 141eec269a

View File

@@ -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)) {