From 56f085b73db3882fd0d026d314844e422f979706 Mon Sep 17 00:00:00 2001 From: "ishak jmilou.ishak" Date: Tue, 7 Jan 2025 14:33:12 +0100 Subject: [PATCH] added parameters --- src/C++/Driver/src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index dd57c19..df4cac1 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -53,11 +53,12 @@ int main() { } void reconnectKobuki() { + unsigned char *null_ptr(0); while (true) { - if (robot.startCommunication("/dev/ttyUSB0") != -1) { + if (robot.startCommunication("/dev/ttyUSB0", true, null_ptr) != -1) { std::cout << "Kobuki opnieuw verbonden!" << std::endl; break; // Verlaat de loop als de verbinding succesvol is - } else { + } else { std::cerr << "Kobuki niet verbonden. Probeer opnieuw over 3 seconden..." << std::endl; std::this_thread::sleep_for(std::chrono::seconds(3)); }