From fa17893b1b6b2246f1a0f2cb6615ab46eaa5b7e7 Mon Sep 17 00:00:00 2001 From: "ishak jmilou.ishak" Date: Thu, 9 Jan 2025 13:21:14 +0100 Subject: [PATCH] fix: update connection check method in sendKobukiData function --- src/C++/Driver/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index 13b00f1..99dffa0 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -325,9 +325,9 @@ std::string serializeKobukiData(const TKobukiData &data) { // needed it so it can be threaded void sendKobukiData(TKobukiData &data) { while (true) { - if(!robot.connected()){ + if(!robot.isConnected()){ std::cout << "Kobuki is not connected anymore" << std::endl; - while(!robot.connected()){ + while(!robot.isConnected()){ robot.startCommunication("/dev/ttyUSB0", true, nullptr); std::this_thread::sleep_for(std::chrono::seconds(1)); }