This commit is contained in:
ackimixs
2024-05-03 15:00:53 +02:00
parent 6009a89462
commit 93a3cff323
2 changed files with 15 additions and 0 deletions

View File

@@ -880,8 +880,11 @@ void TCPServer::goEnd() {
this->middlePince(i);
usleep(50'000);
}
this->sendPoint(10);
this->broadcastMessage("strat;all;end;1");
this->sendPoint(10);
this->sendPoint(5);
}
void TCPServer::findAndGoFlower(const StratPattern sp) {
@@ -1012,6 +1015,8 @@ void TCPServer::dropPurpleFlowers() {
pinceState[toDrop] = NONE;
this->closePince(toDrop);
usleep(200'000);
this->sendPoint(3);
}
}
@@ -1113,6 +1118,8 @@ void TCPServer::dropWhiteFlowers(StratPattern sp) {
pinceState[i] = NONE;
this->closePince(i);
usleep(100'000);
this->sendPoint(4);
}
}
@@ -1214,6 +1221,8 @@ void TCPServer::goAndTurnSolarPanel(StratPattern sp) {
}
}
this->sendPoint(5);
this->setSpeed(previousSpeed);
}
@@ -1383,3 +1392,7 @@ void TCPServer::uncheckPanneau(int servo_moteur) {
void TCPServer::askLidarPosition() {
this->broadcastMessage("start;lidar;get pos;1\n");
}
void TCPServer::sendPoint(int point) {
this->broadcastMessage("strat;ihm;add point;" + std::to_string(point) + "\n");
}