summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeonghoon Park <jh1979.park@samsung.com>2019-06-13 11:40:54 +0900
committerJeonghoon Park <jh1979.park@samsung.com>2019-06-13 11:40:54 +0900
commitaf54e233489cdb8e652ec2f057241b4c23315fb3 (patch)
tree641cc67897f8254e58d4c489e42aea371f5e8cf7
parent32abe60d9693950f0d935ef01137713c2dd92e85 (diff)
downloadsmart-ruler-af54e233489cdb8e652ec2f057241b4c23315fb3.tar.gz
smart-ruler-af54e233489cdb8e652ec2f057241b4c23315fb3.tar.bz2
smart-ruler-af54e233489cdb8e652ec2f057241b4c23315fb3.zip
reorder lidar sensor read logic
Change-Id: I3034758fc76723d09a19d4d51708be4eba32b671
-rw-r--r--src/resource/resource_lidar_v3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resource/resource_lidar_v3.c b/src/resource/resource_lidar_v3.c
index 234f8d5..fa6ab19 100644
--- a/src/resource/resource_lidar_v3.c
+++ b/src/resource/resource_lidar_v3.c
@@ -163,10 +163,10 @@ int resource_read_lidar_v3(unsigned int *out_value)
ret = __lidar_v3_i2c_open(I2C_BUS_DEF);
retv_if(ret, -1);
- ret = __wait_busy_flag();
+ ret = peripheral_i2c_write_register_byte(g_sensor_h, LLV3_ACQ_CMD, CMD_WITH_BIAS_CORRECTION);
retv_if(ret, -1);
- ret = peripheral_i2c_write_register_byte(g_sensor_h, LLV3_ACQ_CMD, CMD_WITH_BIAS_CORRECTION);
+ ret = __wait_busy_flag();
retv_if(ret, -1);
ret = peripheral_i2c_read_register_byte(g_sensor_h, LLv3_DISTANCE_HIGH, &val_h);