replaced connect

This commit is contained in:
ishak jmilou.ishak
2025-01-09 13:31:41 +01:00
parent 1c081451aa
commit 89421ccf34

View File

@@ -327,9 +327,8 @@ void sendKobukiData(TKobukiData &data) {
while (true) { while (true) {
if(!robot.isConnected()){ if(!robot.isConnected()){
std::cout << "Kobuki is not connected anymore" << std::endl; std::cout << "Kobuki is not connected anymore" << std::endl;
robot.connect("/dev/ttyUSB0");
while(!robot.isConnected()){
robot.startCommunication("/dev/ttyUSB0", true, nullptr); robot.startCommunication("/dev/ttyUSB0", true, nullptr);
while(!robot.isConnected()){
std::this_thread::sleep_for(std::chrono::seconds(1)); std::this_thread::sleep_for(std::chrono::seconds(1));
} }
} }