condition

This commit is contained in:
ackimixs
2024-05-15 20:46:30 +02:00
parent c5b01c4efb
commit 23b1fb3aae

View File

@@ -189,10 +189,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");
}
}