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