From 35388419bbae9fbb7685806b4a865aaa4d427960 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Fri, 3 May 2024 13:29:57 +0200 Subject: [PATCH] distance to plant --- TCPServer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index c40690e..430d4f8 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -734,7 +734,7 @@ void TCPServer::awaitRobotIdle() { usleep(50'000); this->sendToClient("strat;arduino;get state;1\n", this->arduinoSocket); timeout++; - if (timeout > 100) { + if (timeout > 80) { this->broadcastMessage("strat;arduino;clear;1"); break; } @@ -922,17 +922,17 @@ void TCPServer::findAndGoFlower(const StratPattern sp) { this->arucoTags.clear(); std::optional tag = std::nullopt; - for (int i = 0; i < 4; i++) { + for (int i = 0; i < 5; i++) { this->broadcastMessage("strat;aruco;get aruco;1\n"); usleep(110'000); } - tag = getMostCenteredArucoTag(300, 1000, -200, 200); + tag = getMostCenteredArucoTag(300, 700, -200, 200); int timeout = 0; while (!tag.has_value()) { this->broadcastMessage("strat;aruco;get aruco;1\n"); usleep(110'000); - tag = getMostCenteredArucoTag(300, 1000, -200, 200); + tag = getMostCenteredArucoTag(300, 700, -200, 200); timeout++; if (timeout > 3) {