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

#include <AP_RangeFinder_TeraRangerI2C.h>

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

Public Member Functions

void update (void)
 
- 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 (RangeFinder::RangeFinder_State &_state, AP_HAL::OwnPtr< AP_HAL::I2CDevice > i2c_dev)
 

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 Member Functions

 AP_RangeFinder_TeraRangerI2C (RangeFinder::RangeFinder_State &_state, AP_HAL::OwnPtr< AP_HAL::I2CDevice > i2c_dev)
 
bool measure (void)
 
bool collect (uint16_t &distance_cm)
 
bool init (void)
 
void timer (void)
 

Private Attributes

AP_HAL::OwnPtr< AP_HAL::I2CDevicedev
 
struct {
   uint32_t   sum
 
   uint32_t   count
 
accum
 

Additional Inherited Members

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

Detailed Description

Definition at line 7 of file AP_RangeFinder_TeraRangerI2C.h.

Constructor & Destructor Documentation

◆ AP_RangeFinder_TeraRangerI2C()

AP_RangeFinder_TeraRangerI2C::AP_RangeFinder_TeraRangerI2C ( RangeFinder::RangeFinder_State _state,
AP_HAL::OwnPtr< AP_HAL::I2CDevice i2c_dev 
)
private

Definition at line 36 of file AP_RangeFinder_TeraRangerI2C.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_TeraRangerI2C::_get_mav_distance_sensor_type ( ) const
inlineoverrideprotectedvirtual

Implements AP_RangeFinder_Backend.

Definition at line 19 of file AP_RangeFinder_TeraRangerI2C.h.

Here is the call graph for this function:

◆ collect()

bool AP_RangeFinder_TeraRangerI2C::collect ( uint16_t &  distance_cm)
private

Definition at line 114 of file AP_RangeFinder_TeraRangerI2C.cpp.

Referenced by _get_mav_distance_sensor_type(), init(), and timer().

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

◆ detect()

AP_RangeFinder_Backend * AP_RangeFinder_TeraRangerI2C::detect ( RangeFinder::RangeFinder_State _state,
AP_HAL::OwnPtr< AP_HAL::I2CDevice i2c_dev 
)
static

Definition at line 48 of file AP_RangeFinder_TeraRangerI2C.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_TeraRangerI2C::init ( void  )
private

Definition at line 67 of file AP_RangeFinder_TeraRangerI2C.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:

◆ measure()

bool AP_RangeFinder_TeraRangerI2C::measure ( void  )
private

Definition at line 107 of file AP_RangeFinder_TeraRangerI2C.cpp.

Referenced by _get_mav_distance_sensor_type(), init(), and timer().

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

◆ timer()

void AP_RangeFinder_TeraRangerI2C::timer ( void  )
private

Definition at line 136 of file AP_RangeFinder_TeraRangerI2C.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_TeraRangerI2C::update ( void  )
virtual

Implements AP_RangeFinder_Backend.

Definition at line 154 of file AP_RangeFinder_TeraRangerI2C.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ accum

struct { ... } AP_RangeFinder_TeraRangerI2C::accum

Referenced by timer(), and update().

◆ count

uint32_t AP_RangeFinder_TeraRangerI2C::count

Definition at line 37 of file AP_RangeFinder_TeraRangerI2C.h.

◆ dev

AP_HAL::OwnPtr<AP_HAL::I2CDevice> AP_RangeFinder_TeraRangerI2C::dev
private

Definition at line 33 of file AP_RangeFinder_TeraRangerI2C.h.

Referenced by collect(), init(), and measure().

◆ sum

uint32_t AP_RangeFinder_TeraRangerI2C::sum

Definition at line 36 of file AP_RangeFinder_TeraRangerI2C.h.


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