mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 21:41:36 +08:00
ll40ls: increase the number of samples used to find a correlation peak for LitarLite
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
This commit is contained in:
@@ -329,18 +329,26 @@ int LidarLiteI2C::measure()
|
||||
}
|
||||
|
||||
/*
|
||||
reset the sensor to power on defaults
|
||||
reset the sensor to power on defaults plus additional configurations
|
||||
*/
|
||||
int LidarLiteI2C::reset_sensor()
|
||||
{
|
||||
int ret = write_reg(LL40LS_MEASURE_REG, LL40LS_MSRREG_RESET);
|
||||
|
||||
int ret;
|
||||
ret = write_reg(LL40LS_MEASURE_REG, LL40LS_MSRREG_RESET);
|
||||
if (ret != OK) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// wait for sensor reset to complete
|
||||
usleep(1000);
|
||||
ret = write_reg(LL40LS_SIG_COUNT_VAL_REG, LL40LS_SIG_COUNT_VAL_MAX);
|
||||
|
||||
if (ret != OK) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// wait for register write to complete
|
||||
usleep(1000);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user