47 #include <mathlib/mathlib.h> 48 #include <px4_platform_common/defines.h> 49 #include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp> 84 LidarLiteI2C(
const int bus,
const uint8_t rotation = distance_sensor_s::ROTATION_DOWNWARD_FACING,
101 void start()
override;
106 void stop()
override;
117 int probe()
override;
119 int read_reg(
const uint8_t reg, uint8_t &val);
121 int write_reg(
const uint8_t reg,
const uint8_t &val);
138 int lidar_transfer(
const uint8_t *
send,
const unsigned send_len, uint8_t *recv,
const unsigned recv_len);
static constexpr uint8_t LL40LS_MSRREG_RESET
static constexpr uint8_t LL40LS_SW_VERSION
static constexpr uint8_t LL40LS_BASEADDR_OLD
LidarLiteI2C(const int bus, const uint8_t rotation=distance_sensor_s::ROTATION_DOWNWARD_FACING, const int address=LL40LS_BASEADDR)
int write_reg(const uint8_t reg, const uint8_t &val)
int lidar_transfer(const uint8_t *send, const unsigned send_len, uint8_t *recv, const unsigned recv_len)
LidarLite specific transfer function.
High-resolution timer with callouts and timekeeping.
static constexpr uint8_t LL40LS_MEASURE_REG
static constexpr int LL40LS_SIGNAL_STRENGTH_MAX_V3HP
void Run() override
Perform a poll cycle; collect from the previous measurement and start a new one.
static constexpr uint8_t LL40LS_UNIT_ID_HIGH
static constexpr uint8_t LL40LS_SIG_COUNT_VAL_MAX
int reset_sensor() override
Reset the sensor to power on defaults plus additional configurations.
uint64_t _acquire_time_usec
static constexpr uint8_t LL40LS_AUTO_INCREMENT
static constexpr uint8_t LL40LS_SIG_COUNT_VAL_DEFAULT
int probe_address(const uint8_t address)
Test whether the device supported by the driver is present at a specific address. ...
static constexpr int LL40LS_PEAK_STRENGTH_LOW
static constexpr uint8_t LL40LS_UNIT_ID_LOW
static constexpr int LL40LS_SIGNAL_STRENGTH_LOW
void print_registers() override
Print sensor registers to console for debugging.
static constexpr uint8_t LL40LS_SIGNAL_STRENGTH_REG
int read_reg(const uint8_t reg, uint8_t &val)
static constexpr uint8_t LL40LS_BASEADDR
static constexpr int LL40LS_PEAK_STRENGTH_HIGH
void stop() override
Stop the automatic measurement state machine.
static constexpr int LL40LS_SIGNAL_STRENGTH_MIN_V3HP
static constexpr uint8_t LL40LS_SIG_COUNT_VAL_REG
static constexpr uint8_t LL40LS_HW_VERSION
static constexpr uint8_t LL40LS_PEAK_STRENGTH_REG
static constexpr uint8_t LL40LS_DISTHIGH_REG
static constexpr uint8_t LL40LS_MSRREG_ACQUIRE
void start() override
Initialise the automatic measurement state machine and start it.
Base class for devices connected via I2C.