From 2bd4c0a5474ed2ba1178a574e3c25f8c579fd3f5 Mon Sep 17 00:00:00 2001 From: bap-0-1 Date: Tue, 28 May 2024 17:59:44 +0200 Subject: [PATCH] update --- TCPServer.cpp | 8 ++++++++ TCPServer.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/TCPServer.cpp b/TCPServer.cpp index 55a35b1..bae8ad3 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -280,6 +280,14 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) else if (tokens[3] == "1") { this->togglePince(2); } + else if (tokens[3] == "11") { + this->alertLidar = true; + this->broadcastMessage("strat;gc;start proximity;1\n"); + } + else if (tokens[3] == "12") { + this->alertLidar = false; + this->broadcastMessage("strat;gc;stop proximity;1\n"); + } else if (tokens[3] == "13") { this->togglePanel(0); } diff --git a/TCPServer.h b/TCPServer.h index 00ed3c8..001d888 100644 --- a/TCPServer.h +++ b/TCPServer.h @@ -93,6 +93,8 @@ private: int lidarDecetionDistance = 0; + bool alertLidar = true; + public: explicit TCPServer(int port);