Skip to content

Commit

Permalink
ll40ls: Revert version check for old sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
dvornikov-aa committed Nov 14, 2019
1 parent ec1cfbb commit f3b7f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/distance_sensor/ll40ls/LidarLiteI2C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f3b7f31

Please sign in to comment.