From 44df128ae7259186a6b03eac382000f01c4ea24b Mon Sep 17 00:00:00 2001 From: ackimixs Date: Wed, 3 Apr 2024 20:52:10 +0200 Subject: [PATCH] spawn points --- TCPServer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 8710578..cbffa62 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -82,11 +82,9 @@ TCPServer::TCPServer(int port) ClientTCP arduino; arduino.name = "arduino"; - arduino.isReady = true; ClientTCP servo_pot; servo_pot.name = "servo_pot"; - servo_pot.isReady = true; ClientTCP servo_panneaux_solaire; servo_panneaux_solaire.name = "servo_ps"; @@ -159,6 +157,11 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) } checkIfAllClientsReady(); } + if (tokens[2] == "spawn") { + // TODO change that to handle spawn point + std::string toSend = "ihm;arduino;set;100,100"; + this->broadcastMessage(toSend.c_str(), clientSocket); + } std::cout << "Received: " << message << std::endl; }