spawn points

This commit is contained in:
ackimixs
2024-04-03 20:52:10 +02:00
parent e5107e7cfa
commit 44df128ae7

View File

@@ -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;
}