This commit is contained in:
ackimixs
2024-05-15 19:23:55 +02:00
parent f05518116b
commit 524005c4a5

View File

@@ -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<int>((value * 3.1) / 327.670f);