APM:Libraries
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AP_RangeFinder_PulsedLightLRF Class Reference

#include <AP_RangeFinder_PulsedLightLRF.h>

Inheritance diagram for AP_RangeFinder_PulsedLightLRF:
[legend]
Collaboration diagram for AP_RangeFinder_PulsedLightLRF:
[legend]

Public Member Functions

void update (void) override
 
- Public Member Functions inherited from AP_RangeFinder_Backend
 AP_RangeFinder_Backend (RangeFinder::RangeFinder_State &_state)
 
virtual ~AP_RangeFinder_Backend (void)
 
virtual void handle_msg (mavlink_message_t *msg)
 
void update_pre_arm_check ()
 
enum Rotation orientation () const
 
uint16_t distance_cm () const
 
uint16_t voltage_mv () const
 
int16_t max_distance_cm () const
 
int16_t min_distance_cm () const
 
int16_t ground_clearance_cm () const
 
MAV_DISTANCE_SENSOR get_mav_distance_sensor_type () const
 
RangeFinder::RangeFinder_Status status () const
 
RangeFinder::RangeFinder_Type type () const
 
bool has_data () const
 
uint8_t range_valid_count () const
 
const Vector3fget_pos_offset () const
 

Static Public Member Functions

static AP_RangeFinder_Backenddetect (uint8_t bus, RangeFinder::RangeFinder_State &_state, RangeFinder::RangeFinder_Type rftype)
 

Protected Member Functions

virtual MAV_DISTANCE_SENSOR _get_mav_distance_sensor_type () const override
 
- Protected Member Functions inherited from AP_RangeFinder_Backend
void update_status ()
 
void set_status (RangeFinder::RangeFinder_Status status)
 

Private Types

enum  { PHASE_MEASURE, PHASE_COLLECT }
 

Private Member Functions

 AP_RangeFinder_PulsedLightLRF (uint8_t bus, RangeFinder::RangeFinder_State &_state, RangeFinder::RangeFinder_Type rftype)
 
bool init (void)
 
void timer (void)
 
bool lidar_transfer (const uint8_t *send, unsigned send_len, uint8_t *recv, unsigned recv_len)
 

Private Attributes

AP_HAL::OwnPtr< AP_HAL::I2CDevice_dev
 
uint8_t sw_version
 
uint8_t hw_version
 
uint8_t check_reg_counter
 
bool v2_hardware
 
uint16_t last_distance_cm
 
RangeFinder::RangeFinder_Type rftype
 
enum AP_RangeFinder_PulsedLightLRF:: { ... }  phase
 

Additional Inherited Members

- Protected Attributes inherited from AP_RangeFinder_Backend
RangeFinder::RangeFinder_Statestate
 
AP_HAL::Semaphore_sem
 

Detailed Description

Definition at line 17 of file AP_RangeFinder_PulsedLightLRF.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
PHASE_MEASURE 
PHASE_COLLECT 

Definition at line 55 of file AP_RangeFinder_PulsedLightLRF.h.

Constructor & Destructor Documentation

◆ AP_RangeFinder_PulsedLightLRF()

AP_RangeFinder_PulsedLightLRF::AP_RangeFinder_PulsedLightLRF ( uint8_t  bus,
RangeFinder::RangeFinder_State _state,
RangeFinder::RangeFinder_Type  rftype 
)
private

Definition at line 47 of file AP_RangeFinder_PulsedLightLRF.cpp.

Referenced by _get_mav_distance_sensor_type(), and detect().

Here is the caller graph for this function:

Member Function Documentation

◆ _get_mav_distance_sensor_type()

virtual MAV_DISTANCE_SENSOR AP_RangeFinder_PulsedLightLRF::_get_mav_distance_sensor_type ( ) const
inlineoverrideprotectedvirtual

Implements AP_RangeFinder_Backend.

Definition at line 31 of file AP_RangeFinder_PulsedLightLRF.h.

Here is the call graph for this function:

◆ detect()

AP_RangeFinder_Backend * AP_RangeFinder_PulsedLightLRF::detect ( uint8_t  bus,
RangeFinder::RangeFinder_State _state,
RangeFinder::RangeFinder_Type  rftype 
)
static

Definition at line 60 of file AP_RangeFinder_PulsedLightLRF.cpp.

Referenced by RangeFinder::detect_instance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

bool AP_RangeFinder_PulsedLightLRF::init ( void  )
private

Definition at line 146 of file AP_RangeFinder_PulsedLightLRF.cpp.

Referenced by _get_mav_distance_sensor_type(), and detect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lidar_transfer()

bool AP_RangeFinder_PulsedLightLRF::lidar_transfer ( const uint8_t *  send,
unsigned  send_len,
uint8_t *  recv,
unsigned  recv_len 
)
private

Referenced by _get_mav_distance_sensor_type().

Here is the caller graph for this function:

◆ timer()

void AP_RangeFinder_PulsedLightLRF::timer ( void  )
private

Definition at line 77 of file AP_RangeFinder_PulsedLightLRF.cpp.

Referenced by _get_mav_distance_sensor_type(), and init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void AP_RangeFinder_PulsedLightLRF::update ( void  )
inlineoverridevirtual

Implements AP_RangeFinder_Backend.

Definition at line 27 of file AP_RangeFinder_PulsedLightLRF.h.

Member Data Documentation

◆ _dev

AP_HAL::OwnPtr<AP_HAL::I2CDevice> AP_RangeFinder_PulsedLightLRF::_dev
private

Definition at line 46 of file AP_RangeFinder_PulsedLightLRF.h.

Referenced by init(), and timer().

◆ check_reg_counter

uint8_t AP_RangeFinder_PulsedLightLRF::check_reg_counter
private

Definition at line 50 of file AP_RangeFinder_PulsedLightLRF.h.

Referenced by timer().

◆ hw_version

uint8_t AP_RangeFinder_PulsedLightLRF::hw_version
private

Definition at line 49 of file AP_RangeFinder_PulsedLightLRF.h.

Referenced by init().

◆ last_distance_cm

uint16_t AP_RangeFinder_PulsedLightLRF::last_distance_cm
private

Definition at line 52 of file AP_RangeFinder_PulsedLightLRF.h.

Referenced by timer().

◆ phase

enum { ... } AP_RangeFinder_PulsedLightLRF::phase

Referenced by init(), and timer().

◆ rftype

RangeFinder::RangeFinder_Type AP_RangeFinder_PulsedLightLRF::rftype
private

Definition at line 53 of file AP_RangeFinder_PulsedLightLRF.h.

Referenced by init().

◆ sw_version

uint8_t AP_RangeFinder_PulsedLightLRF::sw_version
private

Definition at line 48 of file AP_RangeFinder_PulsedLightLRF.h.

Referenced by init().

◆ v2_hardware

bool AP_RangeFinder_PulsedLightLRF::v2_hardware
private

Definition at line 51 of file AP_RangeFinder_PulsedLightLRF.h.

Referenced by init(), and timer().


The documentation for this class was generated from the following files: