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; }