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

#include <AP_RangeFinder_Wasp.h>

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

Public Member Functions

 AP_RangeFinder_Wasp (RangeFinder::RangeFinder_State &_state, AP_SerialManager &serial_manager, uint8_t serial_instance)
 
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 bool detect (AP_SerialManager &serial_manager, uint8_t serial_instance)
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

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  wasp_configuration_stage {
  WASP_CFG_RATE, WASP_CFG_ENCODING, WASP_CFG_PROTOCOL, WASP_CFG_FRQ,
  WASP_CFG_GO, WASP_CFG_AUT, WASP_CFG_THR, WASP_CFG_MAVG,
  WASP_CFG_MEDF, WASP_CFG_AVG, WASP_CFG_AUV, WASP_CFG_DONE
}
 

Private Member Functions

bool get_reading (uint16_t &reading_cm)
 
void parse_response (void)
 

Private Attributes

wasp_configuration_stage configuration_state
 
AP_HAL::UARTDriveruart
 
uint32_t last_reading_ms
 
char linebuf [10]
 
uint8_t linebuf_len
 
AP_Int16 mavg
 
AP_Int16 medf
 
AP_Int16 frq
 
AP_Int16 avg
 
AP_Int16 thr
 
AP_Int8 baud
 

Additional Inherited Members

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

Detailed Description

Definition at line 9 of file AP_RangeFinder_Wasp.h.

Member Enumeration Documentation

◆ wasp_configuration_stage

Enumerator
WASP_CFG_RATE 
WASP_CFG_ENCODING 
WASP_CFG_PROTOCOL 
WASP_CFG_FRQ 
WASP_CFG_GO 
WASP_CFG_AUT 
WASP_CFG_THR 
WASP_CFG_MAVG 
WASP_CFG_MEDF 
WASP_CFG_AVG 
WASP_CFG_AUV 
WASP_CFG_DONE 

Definition at line 30 of file AP_RangeFinder_Wasp.h.

Constructor & Destructor Documentation

◆ AP_RangeFinder_Wasp()

AP_RangeFinder_Wasp::AP_RangeFinder_Wasp ( RangeFinder::RangeFinder_State _state,
AP_SerialManager serial_manager,
uint8_t  serial_instance 
)

Definition at line 63 of file AP_RangeFinder_Wasp.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ _get_mav_distance_sensor_type()

virtual MAV_DISTANCE_SENSOR AP_RangeFinder_Wasp::_get_mav_distance_sensor_type ( ) const
inlineoverrideprotectedvirtual

Implements AP_RangeFinder_Backend.

Definition at line 24 of file AP_RangeFinder_Wasp.h.

◆ detect()

bool AP_RangeFinder_Wasp::detect ( AP_SerialManager serial_manager,
uint8_t  serial_instance 
)
static

Definition at line 81 of file AP_RangeFinder_Wasp.cpp.

Referenced by RangeFinder::detect_instance().

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

◆ get_reading()

bool AP_RangeFinder_Wasp::get_reading ( uint16_t &  reading_cm)
private

Definition at line 86 of file AP_RangeFinder_Wasp.cpp.

Referenced by update().

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

◆ parse_response()

void AP_RangeFinder_Wasp::parse_response ( void  )
private

Definition at line 197 of file AP_RangeFinder_Wasp.cpp.

Referenced by get_reading().

Here is the caller graph for this function:

◆ update()

void AP_RangeFinder_Wasp::update ( void  )
overridevirtual

Implements AP_RangeFinder_Backend.

Definition at line 136 of file AP_RangeFinder_Wasp.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ avg

AP_Int16 AP_RangeFinder_Wasp::avg
private

Definition at line 58 of file AP_RangeFinder_Wasp.h.

Referenced by update().

◆ baud

AP_Int8 AP_RangeFinder_Wasp::baud
private

Definition at line 60 of file AP_RangeFinder_Wasp.h.

Referenced by update().

◆ configuration_state

wasp_configuration_stage AP_RangeFinder_Wasp::configuration_state
private

Definition at line 45 of file AP_RangeFinder_Wasp.h.

Referenced by AP_RangeFinder_Wasp(), get_reading(), parse_response(), and update().

◆ frq

AP_Int16 AP_RangeFinder_Wasp::frq
private

Definition at line 57 of file AP_RangeFinder_Wasp.h.

Referenced by update().

◆ last_reading_ms

uint32_t AP_RangeFinder_Wasp::last_reading_ms
private

Definition at line 52 of file AP_RangeFinder_Wasp.h.

Referenced by get_reading(), and update().

◆ linebuf

char AP_RangeFinder_Wasp::linebuf[10]
private

Definition at line 53 of file AP_RangeFinder_Wasp.h.

Referenced by get_reading(), and parse_response().

◆ linebuf_len

uint8_t AP_RangeFinder_Wasp::linebuf_len
private

Definition at line 54 of file AP_RangeFinder_Wasp.h.

Referenced by get_reading().

◆ mavg

AP_Int16 AP_RangeFinder_Wasp::mavg
private

Definition at line 55 of file AP_RangeFinder_Wasp.h.

Referenced by update().

◆ medf

AP_Int16 AP_RangeFinder_Wasp::medf
private

Definition at line 56 of file AP_RangeFinder_Wasp.h.

Referenced by update().

◆ thr

AP_Int16 AP_RangeFinder_Wasp::thr
private

Definition at line 59 of file AP_RangeFinder_Wasp.h.

Referenced by update().

◆ uart

AP_HAL::UARTDriver* AP_RangeFinder_Wasp::uart
private

Definition at line 51 of file AP_RangeFinder_Wasp.h.

Referenced by AP_RangeFinder_Wasp(), get_reading(), and update().

◆ var_info

const AP_Param::GroupInfo AP_RangeFinder_Wasp::var_info
static

Definition at line 20 of file AP_RangeFinder_Wasp.h.

Referenced by AP_RangeFinder_Wasp().


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