mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
fix: add reconnect attempt logging for Kobuki communication
This commit is contained in:
@@ -43,6 +43,7 @@ int main() {
|
|||||||
std::cout << "Kobuki is not connected anymore. Reconnecting..." << std::endl;
|
std::cout << "Kobuki is not connected anymore. Reconnecting..." << std::endl;
|
||||||
robot.startCommunication("/dev/ttyUSB0", true, nullptr);
|
robot.startCommunication("/dev/ttyUSB0", true, nullptr);
|
||||||
while (!robot.isConnected()) {
|
while (!robot.isConnected()) {
|
||||||
|
std::cout << "Attempting to reconnect..." << std::endl;
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||||
}
|
}
|
||||||
std::cout << "Reconnected to Kobuki." << std::endl;
|
std::cout << "Reconnected to Kobuki." << std::endl;
|
||||||
|
Reference in New Issue
Block a user