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

#include <AP_RangeFinder_PX4_PWM.h>

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

Public Member Functions

 AP_RangeFinder_PX4_PWM (RangeFinder::RangeFinder_State &_state, AP_Int16 &powersave_range, float &_estimated_terrain_height)
 
 ~AP_RangeFinder_PX4_PWM (void)
 
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 bool detect ()
 

Protected Member Functions

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

bool out_of_range (void) const
 

Private Attributes

int _fd
 
uint64_t _last_timestamp
 
uint64_t _last_pulse_time_ms
 
uint32_t _disable_time_ms
 
uint32_t _good_sample_count
 
float _last_sample_distance_cm
 
AP_Int16 & _powersave_range
 
float & estimated_terrain_height
 

Additional Inherited Members

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

Detailed Description

Definition at line 20 of file AP_RangeFinder_PX4_PWM.h.

Constructor & Destructor Documentation

◆ AP_RangeFinder_PX4_PWM()

AP_RangeFinder_PX4_PWM::AP_RangeFinder_PX4_PWM ( RangeFinder::RangeFinder_State _state,
AP_Int16 &  powersave_range,
float &  _estimated_terrain_height 
)

Definition at line 46 of file AP_RangeFinder_PX4_PWM.cpp.

Here is the call graph for this function:

◆ ~AP_RangeFinder_PX4_PWM()

AP_RangeFinder_PX4_PWM::~AP_RangeFinder_PX4_PWM ( void  )

Definition at line 72 of file AP_RangeFinder_PX4_PWM.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ _get_mav_distance_sensor_type()

MAV_DISTANCE_SENSOR AP_RangeFinder_PX4_PWM::_get_mav_distance_sensor_type ( ) const
inlineoverrideprotectedvirtual

Implements AP_RangeFinder_Backend.

Definition at line 37 of file AP_RangeFinder_PX4_PWM.h.

◆ detect()

bool AP_RangeFinder_PX4_PWM::detect ( )
static

Definition at line 83 of file AP_RangeFinder_PX4_PWM.cpp.

Referenced by RangeFinder::detect_instance().

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

◆ out_of_range()

bool AP_RangeFinder_PX4_PWM::out_of_range ( void  ) const
inlineprivate

Definition at line 53 of file AP_RangeFinder_PX4_PWM.h.

Referenced by update().

Here is the caller graph for this function:

◆ update()

void AP_RangeFinder_PX4_PWM::update ( void  )
virtual

Implements AP_RangeFinder_Backend.

Definition at line 99 of file AP_RangeFinder_PX4_PWM.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _disable_time_ms

uint32_t AP_RangeFinder_PX4_PWM::_disable_time_ms
private

Definition at line 45 of file AP_RangeFinder_PX4_PWM.h.

Referenced by update().

◆ _fd

int AP_RangeFinder_PX4_PWM::_fd
private

◆ _good_sample_count

uint32_t AP_RangeFinder_PX4_PWM::_good_sample_count
private

Definition at line 46 of file AP_RangeFinder_PX4_PWM.h.

Referenced by update().

◆ _last_pulse_time_ms

uint64_t AP_RangeFinder_PX4_PWM::_last_pulse_time_ms
private

Definition at line 44 of file AP_RangeFinder_PX4_PWM.h.

Referenced by update().

◆ _last_sample_distance_cm

float AP_RangeFinder_PX4_PWM::_last_sample_distance_cm
private

Definition at line 47 of file AP_RangeFinder_PX4_PWM.h.

Referenced by update().

◆ _last_timestamp

uint64_t AP_RangeFinder_PX4_PWM::_last_timestamp
private

Definition at line 43 of file AP_RangeFinder_PX4_PWM.h.

Referenced by update().

◆ _powersave_range

AP_Int16& AP_RangeFinder_PX4_PWM::_powersave_range
private

Definition at line 49 of file AP_RangeFinder_PX4_PWM.h.

Referenced by out_of_range().

◆ estimated_terrain_height

float& AP_RangeFinder_PX4_PWM::estimated_terrain_height
private

Definition at line 50 of file AP_RangeFinder_PX4_PWM.h.


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