26 #define LL40LS_MEASURE_REG 0x00 27 #define LL40LS_DISTHIGH_REG 0x0F 28 #define LL40LS_COUNT 0x11 29 #define LL40LS_HW_VERSION 0x41 30 #define LL40LS_INTERVAL 0x45 31 #define LL40LS_SW_VERSION 0x4f 34 #define LL40LS_MSRREG_RESET 0x00 35 #define LL40LS_AUTO_INCREMENT 0x80 36 #define LL40LS_COUNT_CONTINUOUS 0xff 37 #define LL40LS_MSRREG_ACQUIRE 0x04 40 #define LL40LS_ADDR 0x62 99 uint16_t _distance_cm =
be16toh(val);
172 uint8_t num_settings;
186 for (uint8_t i = 0; i < num_settings; i++) {
int printf(const char *fmt,...)
virtual Device::PeriodicHandle register_periodic_callback(uint32_t period_usec, Device::PeriodicCb) override=0
uint8_t check_reg_counter
uint32_t get_bus_id(void) const
static AP_RangeFinder_Backend * detect(uint8_t bus, RangeFinder::RangeFinder_State &_state, RangeFinder::RangeFinder_Type rftype)
virtual void set_retries(uint8_t retries)
virtual Semaphore * get_semaphore() override=0
#define LL40LS_MEASURE_REG
AP_HAL::OwnPtr< AP_HAL::Device > get_device(const char *name)
#define LL40LS_SW_VERSION
#define HAL_SEMAPHORE_BLOCK_FOREVER
virtual bool take(uint32_t timeout_ms) WARN_IF_UNUSED=0
static const struct settings_table settings_v1[]
#define LL40LS_MSRREG_ACQUIRE
virtual void set_split_transfers(bool set)
bool setup_checked_registers(uint8_t num_regs, uint8_t frequency=10)
#define LL40LS_COUNT_CONTINUOUS
static const struct settings_table settings_v2[]
static uint16_t be16toh(be16_t value)
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
RangeFinder::RangeFinder_Type rftype
#define LL40LS_DISTHIGH_REG
#define LL40LS_MSRREG_RESET
#define LL40LS_AUTO_INCREMENT
AP_HAL::OwnPtr< AP_HAL::I2CDevice > _dev
AP_RangeFinder_PulsedLightLRF(uint8_t bus, RangeFinder::RangeFinder_State &_state, RangeFinder::RangeFinder_Type rftype)
#define LL40LS_HW_VERSION
bool check_next_register(void)
bool read_registers(uint8_t first_reg, uint8_t *recv, uint32_t recv_len)
#define FUNCTOR_BIND_MEMBER(func, rettype,...)
void set_status(RangeFinder::RangeFinder_Status status)
RangeFinder::RangeFinder_State & state
enum AP_RangeFinder_PulsedLightLRF::@176 phase
bool write_register(uint8_t reg, uint8_t val, bool checked=false)
uint16_t last_distance_cm
uint16_t __ap_bitwise be16_t