From 207589709cff1015d8d295ed93f4f6725c4f0547 Mon Sep 17 00:00:00 2001
From: fherrero <fherrero@iri.upc.edu>
Date: Wed, 4 Jul 2018 16:30:53 +0200
Subject: [PATCH] TMP FIX: added delay to solve data transmission bug

---
 src/lidar_lite.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lidar_lite.cpp b/src/lidar_lite.cpp
index d2898ce..b24a4cb 100644
--- a/src/lidar_lite.cpp
+++ b/src/lidar_lite.cpp
@@ -216,6 +216,7 @@ CLidarLite::read(unsigned char addr, int len)
   unsigned char data[len];
   try {
     this->adapter_->write(DEVICE_ID, &addr, 1);
+    usleep(500); // FIX: This delay should be removed when the data transfer bug is solved.
     this->adapter_->read(DEVICE_ID, data, len);
   } catch (CException& e) {
     throw CLidarLiteException(_HERE_, e.what());
-- 
GitLab