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);