From ec2a08c656da8ca63f031ee17e2e7ca205a12855 Mon Sep 17 00:00:00 2001 From: "ishak jmilou.ishak" Date: Thu, 9 Jan 2025 13:38:18 +0100 Subject: [PATCH] refactor: comment out connection check in sendKobukiData function --- src/C++/Driver/src/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index d3e7236..7473fae 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -325,13 +325,13 @@ std::string serializeKobukiData(const TKobukiData &data) { // needed it so it can be threaded void sendKobukiData(TKobukiData &data) { while (true) { - if(!robot.isConnected()){ - std::cout << "Kobuki is not connected anymore" << std::endl; - robot.startCommunication("/dev/ttyUSB0", true, nullptr); - while(!robot.isConnected()){ - std::this_thread::sleep_for(std::chrono::seconds(1)); - } - } + // if(!robot.isConnected()){ + // std::cout << "Kobuki is not connected anymore" << std::endl; + // robot.startCommunication("/dev/ttyUSB0", true, nullptr); + // while(!robot.isConnected()){ + // std::this_thread::sleep_for(std::chrono::seconds(1)); + // } + // } client.publishMessage("kobuki/data", serializeKobukiData(data)); std::cout << "Sent data" << std::endl; std::this_thread::sleep_for(std::chrono::milliseconds(1000));