This commit is contained in:
ackimixs
2024-04-15 19:34:37 +02:00
parent 4adf61dfaf
commit 7a39c415df

View File

@@ -348,7 +348,8 @@ void TCPServer::startGame() {
this->broadcastMessage("strat;servo_moteur;fermer pince;1\n");
this->broadcastMessage("strat;servo_moteur;fermer pince;2\n");
this->broadcastMessage("strat;servo_moteur;ouvrir pince;0\n");
this->broadcastMessage("strat;arduino;speed;200\n");
// TODO set to 200 when the robot is ready
this->broadcastMessage("strat;arduino;speed;150\n");
this->broadcastMessage("strat;aruco;get aruco;1\n");
@@ -506,7 +507,8 @@ void TCPServer::goToAruco(const ArucoTag &arucoTag, const int pince) {
usleep(200'000);
// ReSharper disable once CppDFAUnreachableCode
this->broadcastMessage("strat;arduino;speed;150\n");
// TODO set to 150 when the robot is ready
this->broadcastMessage("strat;arduino;speed;130\n");
usleep(1'000);
xPrime += x30Percent;
@@ -527,7 +529,8 @@ void TCPServer::goToAruco(const ArucoTag &arucoTag, const int pince) {
toSend = "strat;servo_moteur;fermer pince;" + std::to_string(pince) + "\n";
this->broadcastMessage(toSend);
this->broadcastMessage("strat;servo_moteur;lever bras;1\n");
this->broadcastMessage("strat;arduino;speed;200\n");
// TODO set to 200 when the robot is ready
this->broadcastMessage("strat;arduino;speed;150\n");
pinceState[pince] = arucoTag.name() == "Purple_flower" ? PURPLE_FLOWER : WHITE_FLOWER;
}