mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 03:14:06 +08:00
driver: ll40ls: Correctly instantiate with the right parameters (#8032)
It was setting the rotation value to the I2C slave address causing it to not be successfully probe. Changing the constructor paramters order instead of just fix line instantiating to keep consistency with the other lidars and sonars.
This commit is contained in:
parent
fa458cdf0e
commit
0d5480e540
@ -49,7 +49,7 @@
|
||||
#include <stdio.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
LidarLiteI2C::LidarLiteI2C(int bus, const char *path, int address, uint8_t rotation) :
|
||||
LidarLiteI2C::LidarLiteI2C(int bus, const char *path, uint8_t rotation, int address) :
|
||||
I2C("LL40LS", path, bus, address, 100000),
|
||||
_rotation(rotation),
|
||||
_work{},
|
||||
|
||||
@ -71,8 +71,9 @@
|
||||
class LidarLiteI2C : public LidarLite, public device::I2C
|
||||
{
|
||||
public:
|
||||
LidarLiteI2C(int bus, const char *path, int address = LL40LS_BASEADDR,
|
||||
uint8_t rotation = distance_sensor_s::ROTATION_DOWNWARD_FACING);
|
||||
LidarLiteI2C(int bus, const char *path,
|
||||
uint8_t rotation = distance_sensor_s::ROTATION_DOWNWARD_FACING,
|
||||
int address = LL40LS_BASEADDR);
|
||||
virtual ~LidarLiteI2C();
|
||||
|
||||
int init() override;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user