mirror of
https://github.com/modelec/TCPSocketServer.git
synced 2026-03-30 04:19:46 +02:00
angle
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user