diff --git a/TCPServer.cpp b/TCPServer.cpp index 802d24d..0cd985a 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -170,6 +170,7 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) this->sendToClient("strat;" + tokens[0] + ";set speed;" + std::to_string(this->speed) + "\n", clientSocket); } else if (tokens[0] == "lidar" && tokens[2] == "set pos") { + this->broadcastMessage(tokens[0] + ";client;" + tokens[2] + ";" + tokens[3] + "\n"); 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); diff --git a/TCPServer.h b/TCPServer.h index 5de977c..ce5a951 100644 --- a/TCPServer.h +++ b/TCPServer.h @@ -154,7 +154,7 @@ private: // TAKE_3_PLANT_TOP_2, // DROP_FLOWER_BASE_1, - GO_END + // GO_END }; // This is the index of the current pattern