Servers by jDrones

RNGFND1_OFFSET not working for PWM and I2C LidarLite

I have a PulsedLight LidarLite V2 connected via PWM and I2C. In both cases, the parameter RNGFND1_OFFSET appears to be ignored with AC 4.0.0 and AC 4.0.1 RC2. It works well with AC 3.6.x NuttX versions.
I had opened an issue already for my PWM connection here but it seems also a problem with I2C as well.

@mtbsteve,

Thanks for the report. I’ve confirmed this is a real regression from Copter-3.6.x so hopefully we will get this resolved and rolled out in a point release in the near future. I’ve added it to the Copter-4.0 issues list so it won’t be forgotten. I’ve also posted this comment on the issue you’ve raised, thanks!

At first look it’s not a difficult issue to resolve although we should also make this parameter apply to all the various rangefinder drivers - at the moment it’s strangely only used by the analog and PWM drivers.

1 Like

Thanks for your great support!

@mtbsteve,

One question that’s come up on the PR is what is the purpose of the offset? Is it to handle the position that the lidar is mounted in or is it to correct the basic distance that it is reporting?

Its the latter. The Lidarlite sensors I have connected through PWM show an offset of 30-40cm when the copter is on the ground. That has been an issue in particular with the PX4flow sensor, I could not pass the prearm check until I corrected the measured distance with the RNGFND_OFFSET parameter.

1 Like
Servers by jDrones