From 085600723257e33302506792f0c5347d959a5275 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Sat, 4 May 2024 11:32:15 +0200 Subject: [PATCH] await for lidar --- TCPServer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 2cd3647..ef951a0 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -188,9 +188,9 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) switch (spawnPointNb) { case 3: this->team = BLUE; - spawnPoint[0] = 250; + /*spawnPoint[0] = 250; spawnPoint[1] = 1800; - spawnPoint[2] = 0; + spawnPoint[2] = 0;*/ /*spawnPoint[0] = 500; spawnPoint[1] = 1000; @@ -756,7 +756,9 @@ void TCPServer::askArduinoPos() { } while (!this->_shouldStop) { - this->sendToClient("strat;arduino;get pos;1\n", this->arduinoSocket); + if (!awaitForLidar) { + this->sendToClient("strat;arduino;get pos;1\n", this->arduinoSocket); + }; usleep(200'000); } }