From 7d2e813f0cf7f04e3e3f5114e4205a7e2c8790de Mon Sep 17 00:00:00 2001 From: ackimixs Date: Mon, 6 May 2024 21:46:27 +0200 Subject: [PATCH] lidar --- TCPServer.cpp | 2 +- TCPServer.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index b3fa78b..e7ac62f 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -171,7 +171,7 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) std::vector args = TCPUtils::split(tokens[3], ","); this->lidarCalculatePos = {std::stof(args[0]), std::stof(args[1]), std::stof(args[2]) / 100}; this->setPosition(this->lidarCalculatePos); - usleep(100'000); + usleep(50'000); this->setPosition(this->lidarCalculatePos); awaitForLidar = false; } diff --git a/TCPServer.h b/TCPServer.h index 3a1a340..2a342e1 100644 --- a/TCPServer.h +++ b/TCPServer.h @@ -122,7 +122,7 @@ private: TURN_SOLAR_PANNEL_2, TURN_SOLAR_PANNEL_3, CHECKPOINT_TRANSITION_SOLAR_PANEL_FLOWER, - // GET_LIDAR_POS, + GET_LIDAR_POS, /*TAKE_FLOWER_BOTTOM, TAKE_FLOWER_BOTTOM, @@ -133,7 +133,7 @@ private: TAKE_3_PLANT_BOTTOM_2, REMOVE_POT_J2, DROP_FLOWER_J2, - // GET_LIDAR_POS, + GET_LIDAR_POS, /*DROP_PURPLE_FLOWER, DROP_WHITE_FLOWER_J1,*/