mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
fix: update connection check method in sendKobukiData function
This commit is contained in:
@@ -325,9 +325,9 @@ std::string serializeKobukiData(const TKobukiData &data) {
|
||||
// needed it so it can be threaded
|
||||
void sendKobukiData(TKobukiData &data) {
|
||||
while (true) {
|
||||
if(!robot.connected()){
|
||||
if(!robot.isConnected()){
|
||||
std::cout << "Kobuki is not connected anymore" << std::endl;
|
||||
while(!robot.connected()){
|
||||
while(!robot.isConnected()){
|
||||
robot.startCommunication("/dev/ttyUSB0", true, nullptr);
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
|
Reference in New Issue
Block a user