From 797db2a94d25b7b3c53704c06be699214f6d4f78 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Mon, 6 May 2024 10:29:09 +0200 Subject: [PATCH] add lidar game mode --- TCPServer.cpp | 13 +++++++++++++ TCPServer.h | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 609632e..725e604 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -212,6 +212,16 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) finishPoint[2] = PI / 2; break; + case 0: + this->team = LIDAR; + spawnPoint[0] = 500; + spawnPoint[1] = 1000; + spawnPoint[2] = 0; + + finishPoint[0] = 400; + finishPoint[1] = 500; + finishPoint[2] = PI / 2; + break; default: this->team = TEST; spawnPoint[0] = 1200; @@ -260,6 +270,9 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) case TEST: this->gameThread = std::thread([this]() { this->startGameTest(); }); break; + case LIDAR: + this->stratPatterns = { GET_LIDAR_POS }; + this->gameThread = std::thread([this]() { this->startGame(); }); } this->gameThread.detach(); diff --git a/TCPServer.h b/TCPServer.h index 76e6f24..0e4de91 100644 --- a/TCPServer.h +++ b/TCPServer.h @@ -34,7 +34,8 @@ struct ClientTCP enum Team { BLUE, YELLOW, - TEST + TEST, + LIDAR }; enum StratPattern {