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));