add sleep statement

This commit is contained in:
ackimixs
2024-05-06 10:31:00 +02:00
parent 69bacd53bd
commit 0acd7853d7
2 changed files with 13 additions and 1 deletions

View File

@@ -271,7 +271,7 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket)
this->gameThread = std::thread([this]() { this->startGameTest(); });
break;
case LIDAR:
this->stratPatterns = { GET_LIDAR_POS };
this->stratPatterns = { SLEEP_5S, GET_LIDAR_POS };
this->gameThread = std::thread([this]() { this->startGame(); });
}
@@ -520,6 +520,15 @@ void TCPServer::startGame() {
case DROP_FLOWER_BASE_2:
dropBaseFlowers(DROP_FLOWER_BASE_2);
break;
case SLEEP_1S:
usleep(1'000'000);
break;
case SLEEP_5S:
usleep(5'000'000);
break;
case SLEEP_10S:
usleep(10'000'000);
break;
}
whereAmI++;
}