Lidar VL53L1X modes support

Copter 4.0 supports the VL53L1X Lidar and that works well as far as i tested it.
This chip has 3 modes: long, medium, short.
Long works well indoor, the other ones are supposed to work better in stronger ambient light.
Copter 4.0 seems to use “Long” mode as default. How can i select the other modes ???

@fs007, you’ve probably figured it out but there’s currently no way to set the mode. It’s hard-coded in the driver to always use “Long”. I can’t immediately think of how we could allow the user to select besides adding a new parameter which I’m personally reluctant to do because of our already enormous parameter list… anyway, perhaps the best thing to do at this point is raise an enhancement request in the issues list.

Thanks for testing!

that’s a funny statement since the driver is … SOFTware !

And no, there would be no need for a new parameter:

The driver could use short mode, if the user enters a value less than, let’s say, 150 cm for RNGFND_MAX_CM and long mode if the value is above this.

Or one could define different RNGFND_TYP for long/short mode. Or,or,or, …

@fs007, those are both good ideas. using the _MAX_CM did occur to me as well although I worried that we would need to be very careful about picking the distance that triggers the selection of the mode and also think about what will happen if the user changes the max distance which is very likely during setup of the vehicle.

… the next step is to raise an enhancement request I think…