mirror of
https://github.com/modelec/TCPSocketServer.git
synced 2026-03-18 21:50:33 +01:00
ONLY lidar
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user