From f3b7f31f2deffdd4f6a8cc1e23d99f63687666f4 Mon Sep 17 00:00:00 2001 From: dvornikov-aa Date: Thu, 14 Nov 2019 12:42:03 +0300 Subject: [PATCH] ll40ls: Revert version check for old sensors --- src/drivers/distance_sensor/ll40ls/LidarLiteI2C.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.cpp b/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.cpp index 8f5752604f38..3f62973fa6ab 100644 --- a/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.cpp +++ b/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.cpp @@ -206,8 +206,8 @@ int LidarLiteI2C::probe() check for hw and sw versions. It would be better if we had a proper WHOAMI register */ - if (read_reg(LL40LS_HW_VERSION, _hw_version) == OK && - read_reg(LL40LS_SW_VERSION, _sw_version) == OK) { + if (read_reg(LL40LS_HW_VERSION, _hw_version) == OK && _hw_version > 0 && + read_reg(LL40LS_SW_VERSION, _sw_version) == OK && _sw_version > 0) { set_maximum_distance(LL40LS_MAX_DISTANCE_V1); goto ok; }