This commit is contained in:
ackimixs
2024-05-15 22:12:53 +02:00
parent 519ce44336
commit 8db1229324
2 changed files with 5 additions and 0 deletions

View File

@@ -122,6 +122,9 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket)
if (TCPUtils::contains(tokens[2], "stop proximity")) {
std::vector<std::string> args = TCPUtils::split(tokens[3], ",");
lidarDecetionDistance = stoi(args[0]);
// TODO distance de detection proportionnelle a la vitesse
if (stoi(args[0]) < 300) {
stopEmergency = true;

View File

@@ -83,6 +83,8 @@ private:
double lidarDectectionAngle = 0;
int lidarDecetionDistance = 0;
public:
explicit TCPServer(int port);