From a4f7e7aa4b69c78a8376e43cae721545c622ae0d Mon Sep 17 00:00:00 2001 From: Mustafa Safri Date: Thu, 7 May 2015 09:35:56 -0400 Subject: [PATCH] Removed one second delay in login --- src/LMS1xx.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/LMS1xx.cpp b/src/LMS1xx.cpp index 7be2886..d03436d 100644 --- a/src/LMS1xx.cpp +++ b/src/LMS1xx.cpp @@ -31,7 +31,6 @@ #include #include -#include "ros/ros.h" #include "LMS1xx/LMS1xx.h" #include "console_bridge/console.h" @@ -123,11 +122,11 @@ void LMS1xx::login() { fd_set readset; struct timeval timeout; - timeout.tv_sec = 1; - timeout.tv_usec = 0; + do { //loop until data is available to read - ros::Duration(1.0).sleep(); + timeout.tv_sec = 1; + timeout.tv_usec = 0; write(sockDesc, buf, strlen(buf));