From f34b21556d2e1ebe150110a1fe572281ab13d3ca Mon Sep 17 00:00:00 2001 From: ackimixs Date: Fri, 10 May 2024 13:56:07 +0200 Subject: [PATCH] patch --- TCPServer.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 95b2124..599b1bc 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -1425,20 +1425,17 @@ void TCPServer::dropJardiniereFlowers(const StratPattern sp) { void TCPServer::dropBaseFlowers(StratPattern sp) { std::array dropPosition{}; double angle; - double Positioningangle; float distance; if (team == BLUE) { if (sp == DROP_FLOWER_BASE_1) { dropPosition = {300, 400}; angle = PI / 2; - Positioningangle = 0; distance = 150; } else if (sp == DROP_FLOWER_BASE_2) { dropPosition = {300, 1600}; angle = -PI / 2; - Positioningangle = 0; distance = -150; } else { @@ -1449,13 +1446,14 @@ void TCPServer::dropBaseFlowers(StratPattern sp) { if (sp == DROP_FLOWER_BASE_1) { dropPosition = {2700, 400}; angle = PI / 2; - Positioningangle = PI; distance = 150; + + this->rotate(0); + awaitRobotIdle(); } else if (sp == DROP_FLOWER_BASE_2) { dropPosition = {2700, 1600}; angle = -PI / 2; - Positioningangle = PI; distance = -150; } else { return; @@ -1467,9 +1465,6 @@ void TCPServer::dropBaseFlowers(StratPattern sp) { this->setMaxSpeed(); - this->rotate(Positioningangle); - if (awaitRobotIdle() < 0) return; - this->go(dropPosition); if (awaitRobotIdle() < 0) return;