mirror of
https://github.com/modelec/TCPSocketServer.git
synced 2026-01-18 16:37:29 +01:00
patch
This commit is contained in:
@@ -1425,20 +1425,17 @@ void TCPServer::dropJardiniereFlowers(const StratPattern sp) {
|
|||||||
void TCPServer::dropBaseFlowers(StratPattern sp) {
|
void TCPServer::dropBaseFlowers(StratPattern sp) {
|
||||||
std::array<int, 2> dropPosition{};
|
std::array<int, 2> dropPosition{};
|
||||||
double angle;
|
double angle;
|
||||||
double Positioningangle;
|
|
||||||
float distance;
|
float distance;
|
||||||
|
|
||||||
if (team == BLUE) {
|
if (team == BLUE) {
|
||||||
if (sp == DROP_FLOWER_BASE_1) {
|
if (sp == DROP_FLOWER_BASE_1) {
|
||||||
dropPosition = {300, 400};
|
dropPosition = {300, 400};
|
||||||
angle = PI / 2;
|
angle = PI / 2;
|
||||||
Positioningangle = 0;
|
|
||||||
distance = 150;
|
distance = 150;
|
||||||
}
|
}
|
||||||
else if (sp == DROP_FLOWER_BASE_2) {
|
else if (sp == DROP_FLOWER_BASE_2) {
|
||||||
dropPosition = {300, 1600};
|
dropPosition = {300, 1600};
|
||||||
angle = -PI / 2;
|
angle = -PI / 2;
|
||||||
Positioningangle = 0;
|
|
||||||
distance = -150;
|
distance = -150;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1449,13 +1446,14 @@ void TCPServer::dropBaseFlowers(StratPattern sp) {
|
|||||||
if (sp == DROP_FLOWER_BASE_1) {
|
if (sp == DROP_FLOWER_BASE_1) {
|
||||||
dropPosition = {2700, 400};
|
dropPosition = {2700, 400};
|
||||||
angle = PI / 2;
|
angle = PI / 2;
|
||||||
Positioningangle = PI;
|
|
||||||
distance = 150;
|
distance = 150;
|
||||||
|
|
||||||
|
this->rotate(0);
|
||||||
|
awaitRobotIdle();
|
||||||
}
|
}
|
||||||
else if (sp == DROP_FLOWER_BASE_2) {
|
else if (sp == DROP_FLOWER_BASE_2) {
|
||||||
dropPosition = {2700, 1600};
|
dropPosition = {2700, 1600};
|
||||||
angle = -PI / 2;
|
angle = -PI / 2;
|
||||||
Positioningangle = PI;
|
|
||||||
distance = -150;
|
distance = -150;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
@@ -1467,9 +1465,6 @@ void TCPServer::dropBaseFlowers(StratPattern sp) {
|
|||||||
|
|
||||||
this->setMaxSpeed();
|
this->setMaxSpeed();
|
||||||
|
|
||||||
this->rotate(Positioningangle);
|
|
||||||
if (awaitRobotIdle() < 0) return;
|
|
||||||
|
|
||||||
this->go(dropPosition);
|
this->go(dropPosition);
|
||||||
if (awaitRobotIdle() < 0) return;
|
if (awaitRobotIdle() < 0) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user