summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);