From 8db1229324c9c717215832d7c81a5021a291378b Mon Sep 17 00:00:00 2001 From: ackimixs Date: Wed, 15 May 2024 22:12:53 +0200 Subject: [PATCH] TODO --- TCPServer.cpp | 3 +++ TCPServer.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/TCPServer.cpp b/TCPServer.cpp index 2f3c6fd..da5d832 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -122,6 +122,9 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) if (TCPUtils::contains(tokens[2], "stop proximity")) { std::vector args = TCPUtils::split(tokens[3], ","); + lidarDecetionDistance = stoi(args[0]); + // TODO distance de detection proportionnelle a la vitesse + if (stoi(args[0]) < 300) { stopEmergency = true; diff --git a/TCPServer.h b/TCPServer.h index 3b4a8e8..c3830b2 100644 --- a/TCPServer.h +++ b/TCPServer.h @@ -83,6 +83,8 @@ private: double lidarDectectionAngle = 0; + int lidarDecetionDistance = 0; + public: explicit TCPServer(int port);