mirror of
https://github.com/modelec/TCPSocketServer.git
synced 2026-01-19 00:47:36 +01:00
spawn points
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user