mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
added parameters
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user