remove sleep

This commit is contained in:
ackimixs
2024-04-17 10:50:19 +02:00
parent 91592633c4
commit d307e46e68

View File

@@ -563,11 +563,9 @@ void TCPServer::startGameBlueTeam() {
if (pinceHavePurpleFlower.size() < 3) {
this->broadcastMessage("strat;arduino;go;762,300\n");
usleep(200'000);
awaitRobotIdle();
this->broadcastMessage("strat;arduino;angle;157\n");
usleep(200'000);
awaitRobotIdle();
// TODO set to 150 when the robot is ready
@@ -757,11 +755,9 @@ void TCPServer::startGameBlueTeam() {
if (pinceHavePurpleFlower.size() < 3) {
this->broadcastMessage("strat;arduino;go;762,300\n");
usleep(200'000);
awaitRobotIdle();
this->broadcastMessage("strat;arduino;angle;157\n");
usleep(200'000);
awaitRobotIdle();
// TODO set to 150 when the robot is ready
@@ -784,7 +780,7 @@ void TCPServer::startGameBlueTeam() {
}
}*/
/*toSend = "strat;arduino;go;" + std::to_string(static_cast<int>(this->robotPose.pos.x)) + "," + std::to_string(static_cast<int>(this->robotPose.pos.y + 200)) + "\n";
/*toSend = "strat;arduino;go;" + std::to_string(static_cast<int>(this->robotPose.pos.x)) + "," + std::to_string(static_cast<int>(this->robotPose.pos.y + 200)) + "\n";
this->broadcastMessage(toSend);
awaitRobotIdle();
@@ -940,16 +936,15 @@ void TCPServer::startGameBlueTeam() {
toSend = "strat;arduino;go;" + std::to_string(static_cast<int>(this->robotPose.pos.x + 150)) + "," + std::to_string(static_cast<int>(this->robotPose.pos.y)) + "\n";
this->broadcastMessage(toSend);
awaitRobotIdle();
}
if (pinceHavePurpleFlower.size() < 3) {
this->broadcastMessage("strat;arduino;go;762,300\n");
usleep(200'000);
awaitRobotIdle();
this->broadcastMessage("strat;arduino;angle;157\n");
usleep(200'000);
awaitRobotIdle();
// TODO set to 150 when the robot is ready