mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 04:14: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;
|
||||
robot.startCommunication("/dev/ttyUSB0", true, nullptr);
|
||||
while (!robot.isConnected()) {
|
||||
std::cout << "Attempting to reconnect..." << std::endl;
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
std::cout << "Reconnected to Kobuki." << std::endl;
|
||||
|
Reference in New Issue
Block a user