From 7066f26608af3d3651ffa3aa7fe377a6f60ff0ec Mon Sep 17 00:00:00 2001 From: ackimixs Date: Mon, 29 Apr 2024 11:15:23 +0200 Subject: [PATCH] ; --- TCPServer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 3158acf..0b58773 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -69,7 +69,7 @@ TCPServer::TCPServer(int port) : team(TEST) std::cout << "Server started on port " << port << std::endl; - clients.reserve(7); + clients.reserve(6); clients.emplace_back("tirette"); clients.emplace_back("aruco"); @@ -1142,16 +1142,16 @@ void TCPServer::setPosition(const Position pos, const int clientSocket) { template void TCPServer::setPosition(X x, Y y, Z theta, const std::string &toSend) { - this->broadcastMessage("strat" + toSend + "set pos" + std::to_string(static_cast(x)) + "," + std::to_string(static_cast(y)) + "," + std::to_string(static_cast(theta * 100)) + "\n"); + this->broadcastMessage("strat;" + toSend + ";set pos;" + std::to_string(static_cast(x)) + "," + std::to_string(static_cast(y)) + "," + std::to_string(static_cast(theta * 100)) + "\n"); } template void TCPServer::setPosition(std::array data, const std::string &toSend) { - this->broadcastMessage("strat" + toSend + "set pos" + std::to_string(static_cast(data[0])) + "," + std::to_string(static_cast(data[1])) + "," + std::to_string(static_cast(data[2] * 100)) + "\n"); + this->broadcastMessage("strat;" + toSend + ";set pos;" + std::to_string(static_cast(data[0])) + "," + std::to_string(static_cast(data[1])) + "," + std::to_string(static_cast(data[2] * 100)) + "\n"); } void TCPServer::setPosition(const Position pos, const std::string &toSend) { - this->broadcastMessage("strat" + toSend + "set pos" + std::to_string(static_cast(pos.pos.x)) + "," + std::to_string(static_cast(pos.pos.y)) + "," + std::to_string(static_cast(pos.theta * 100)) + "\n"); + this->broadcastMessage("strat;" + toSend + ";set pos;" + std::to_string(static_cast(pos.pos.x)) + "," + std::to_string(static_cast(pos.pos.y)) + "," + std::to_string(static_cast(pos.theta * 100)) + "\n"); } void TCPServer::baisserBras() {