ONLY lidar

This commit is contained in:
ackimixs
2024-05-04 10:55:58 +02:00
parent 5a03391984
commit 99447cd486
2 changed files with 2 additions and 1 deletions

View File

@@ -170,6 +170,7 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket)
this->sendToClient("strat;" + tokens[0] + ";set speed;" + std::to_string(this->speed) + "\n", clientSocket);
}
else if (tokens[0] == "lidar" && tokens[2] == "set pos") {
this->broadcastMessage(tokens[0] + ";client;" + tokens[2] + ";" + tokens[3] + "\n");
std::vector<std::string> args = TCPUtils::split(tokens[3], ",");
this->lidarCalculatePos = {std::stof(args[0]), std::stof(args[1]), std::stof(args[2]) / 100};
this->setPosition(this->lidarCalculatePos);

View File

@@ -154,7 +154,7 @@ private:
// TAKE_3_PLANT_TOP_2,
// DROP_FLOWER_BASE_1,
GO_END
// GO_END
};
// This is the index of the current pattern