APM:Libraries
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
AP_WheelEncoder Class Reference

#include <AP_WheelEncoder.h>

Collaboration diagram for AP_WheelEncoder:
[legend]

Classes

struct  WheelEncoder_State
 

Public Types

enum  WheelEncoder_Type { WheelEncoder_TYPE_NONE = 0, WheelEncoder_TYPE_QUADRATURE = 1 }
 

Public Member Functions

 AP_WheelEncoder (void)
 
void init (void)
 
void update (void)
 
uint8_t num_sensors (void) const
 
bool healthy (uint8_t instance) const
 
bool enabled (uint8_t instance) const
 
uint16_t get_counts_per_revolution (uint8_t instance) const
 
float get_wheel_radius (uint8_t instance) const
 
Vector3f get_position (uint8_t instance) const
 
float get_delta_angle (uint8_t instance) const
 
float get_distance (uint8_t instance) const
 
uint32_t get_total_count (uint8_t instance) const
 
uint32_t get_error_count (uint8_t instance) const
 
float get_signal_quality (uint8_t instance) const
 
uint32_t get_last_reading_ms (uint8_t instance) const
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Protected Attributes

AP_Int8 _type [WHEELENCODER_MAX_INSTANCES]
 
AP_Int16 _counts_per_revolution [WHEELENCODER_MAX_INSTANCES]
 
AP_Float _wheel_radius [WHEELENCODER_MAX_INSTANCES]
 
AP_Vector3f _pos_offset [WHEELENCODER_MAX_INSTANCES]
 
AP_Int8 _pina [WHEELENCODER_MAX_INSTANCES]
 
AP_Int8 _pinb [WHEELENCODER_MAX_INSTANCES]
 
WheelEncoder_State state [WHEELENCODER_MAX_INSTANCES]
 
AP_WheelEncoder_Backenddrivers [WHEELENCODER_MAX_INSTANCES]
 
uint8_t num_instances
 

Friends

class AP_WheelEncoder_Backend
 
class AP_WheelEncoder_Quadrature
 

Detailed Description

Definition at line 29 of file AP_WheelEncoder.h.

Member Enumeration Documentation

◆ WheelEncoder_Type

Enumerator
WheelEncoder_TYPE_NONE 
WheelEncoder_TYPE_QUADRATURE 

Definition at line 38 of file AP_WheelEncoder.h.

Constructor & Destructor Documentation

◆ AP_WheelEncoder()

AP_WheelEncoder::AP_WheelEncoder ( void  )

Definition at line 142 of file AP_WheelEncoder.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ enabled()

bool AP_WheelEncoder::enabled ( uint8_t  instance) const

Definition at line 198 of file AP_WheelEncoder.cpp.

Referenced by num_sensors().

Here is the caller graph for this function:

◆ get_counts_per_revolution()

uint16_t AP_WheelEncoder::get_counts_per_revolution ( uint8_t  instance) const

Definition at line 211 of file AP_WheelEncoder.cpp.

Referenced by num_sensors().

Here is the caller graph for this function:

◆ get_delta_angle()

float AP_WheelEncoder::get_delta_angle ( uint8_t  instance) const

Definition at line 241 of file AP_WheelEncoder.cpp.

Referenced by get_distance(), and num_sensors().

Here is the caller graph for this function:

◆ get_distance()

float AP_WheelEncoder::get_distance ( uint8_t  instance) const

Definition at line 255 of file AP_WheelEncoder.cpp.

Referenced by num_sensors(), and AP_Winch_Servo::update().

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

◆ get_error_count()

uint32_t AP_WheelEncoder::get_error_count ( uint8_t  instance) const

Definition at line 272 of file AP_WheelEncoder.cpp.

Referenced by num_sensors().

Here is the caller graph for this function:

◆ get_last_reading_ms()

uint32_t AP_WheelEncoder::get_last_reading_ms ( uint8_t  instance) const

Definition at line 292 of file AP_WheelEncoder.cpp.

Referenced by num_sensors().

Here is the caller graph for this function:

◆ get_position()

Vector3f AP_WheelEncoder::get_position ( uint8_t  instance) const

Definition at line 231 of file AP_WheelEncoder.cpp.

Referenced by num_sensors().

Here is the caller graph for this function:

◆ get_signal_quality()

float AP_WheelEncoder::get_signal_quality ( uint8_t  instance) const

Definition at line 282 of file AP_WheelEncoder.cpp.

Referenced by num_sensors().

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

◆ get_total_count()

uint32_t AP_WheelEncoder::get_total_count ( uint8_t  instance) const

Definition at line 262 of file AP_WheelEncoder.cpp.

Referenced by num_sensors().

Here is the caller graph for this function:

◆ get_wheel_radius()

float AP_WheelEncoder::get_wheel_radius ( uint8_t  instance) const

Definition at line 221 of file AP_WheelEncoder.cpp.

Referenced by num_sensors().

Here is the caller graph for this function:

◆ healthy()

bool AP_WheelEncoder::healthy ( uint8_t  instance) const

Definition at line 189 of file AP_WheelEncoder.cpp.

Referenced by num_sensors().

Here is the caller graph for this function:

◆ init()

void AP_WheelEncoder::init ( void  )

Definition at line 153 of file AP_WheelEncoder.cpp.

◆ num_sensors()

uint8_t AP_WheelEncoder::num_sensors ( void  ) const
inline

Definition at line 60 of file AP_WheelEncoder.h.

Here is the call graph for this function:

◆ update()

void AP_WheelEncoder::update ( void  )

Definition at line 179 of file AP_WheelEncoder.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ AP_WheelEncoder_Backend

friend class AP_WheelEncoder_Backend
friend

Definition at line 32 of file AP_WheelEncoder.h.

◆ AP_WheelEncoder_Quadrature

friend class AP_WheelEncoder_Quadrature
friend

Definition at line 33 of file AP_WheelEncoder.h.

Referenced by init().

Member Data Documentation

◆ _counts_per_revolution

AP_Int16 AP_WheelEncoder::_counts_per_revolution[WHEELENCODER_MAX_INSTANCES]
protected

Definition at line 100 of file AP_WheelEncoder.h.

Referenced by get_counts_per_revolution(), and get_delta_angle().

◆ _pina

AP_Int8 AP_WheelEncoder::_pina[WHEELENCODER_MAX_INSTANCES]
protected

Definition at line 103 of file AP_WheelEncoder.h.

Referenced by AP_WheelEncoder_Backend::get_pin_a().

◆ _pinb

AP_Int8 AP_WheelEncoder::_pinb[WHEELENCODER_MAX_INSTANCES]
protected

Definition at line 104 of file AP_WheelEncoder.h.

Referenced by AP_WheelEncoder_Backend::get_pin_b().

◆ _pos_offset

AP_Vector3f AP_WheelEncoder::_pos_offset[WHEELENCODER_MAX_INSTANCES]
protected

Definition at line 102 of file AP_WheelEncoder.h.

Referenced by get_position().

◆ _type

AP_Int8 AP_WheelEncoder::_type[WHEELENCODER_MAX_INSTANCES]
protected

Definition at line 99 of file AP_WheelEncoder.h.

Referenced by enabled(), init(), and update().

◆ _wheel_radius

AP_Float AP_WheelEncoder::_wheel_radius[WHEELENCODER_MAX_INSTANCES]
protected

Definition at line 101 of file AP_WheelEncoder.h.

Referenced by get_distance(), and get_wheel_radius().

◆ drivers

AP_WheelEncoder_Backend* AP_WheelEncoder::drivers[WHEELENCODER_MAX_INSTANCES]
protected

Definition at line 107 of file AP_WheelEncoder.h.

Referenced by AP_WheelEncoder(), init(), and update().

◆ num_instances

uint8_t AP_WheelEncoder::num_instances
protected

Definition at line 108 of file AP_WheelEncoder.h.

Referenced by enabled(), healthy(), init(), num_sensors(), and update().

◆ state

WheelEncoder_State AP_WheelEncoder::state[WHEELENCODER_MAX_INSTANCES]
protected

◆ var_info

const AP_Param::GroupInfo AP_WheelEncoder::var_info
static

Definition at line 95 of file AP_WheelEncoder.h.

Referenced by AP_WheelEncoder().


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