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

#include <AP_RPM.h>

Collaboration diagram for AP_RPM:
[legend]

Classes

struct  RPM_State
 

Public Types

enum  RPM_Type { RPM_TYPE_NONE = 0, RPM_TYPE_PX4_PWM = 1, RPM_TYPE_PIN = 2 }
 

Public Member Functions

 AP_RPM ()
 
 AP_RPM (const AP_RPM &other)=delete
 
AP_RPMoperator= (const AP_RPM &)=delete
 
uint8_t num_sensors (void) const
 
void init (void)
 
void update (void)
 
float get_rpm (uint8_t instance) const
 
float get_signal_quality (uint8_t instance) const
 
bool healthy (uint8_t instance) const
 
bool enabled (uint8_t instance) const
 

Public Attributes

AP_Int8 _type [RPM_MAX_INSTANCES]
 
AP_Int8 _pin [RPM_MAX_INSTANCES]
 
AP_Float _scaling [RPM_MAX_INSTANCES]
 
AP_Float _maximum [RPM_MAX_INSTANCES]
 
AP_Float _minimum [RPM_MAX_INSTANCES]
 
AP_Float _quality_min [RPM_MAX_INSTANCES]
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Private Member Functions

void detect_instance (uint8_t instance)
 
void update_instance (uint8_t instance)
 

Private Attributes

RPM_State state [RPM_MAX_INSTANCES]
 
AP_RPM_Backenddrivers [RPM_MAX_INSTANCES]
 
uint8_t num_instances:2
 

Friends

class AP_RPM_Backend
 

Detailed Description

Definition at line 27 of file AP_RPM.h.

Member Enumeration Documentation

◆ RPM_Type

Enumerator
RPM_TYPE_NONE 
RPM_TYPE_PX4_PWM 
RPM_TYPE_PIN 

Definition at line 39 of file AP_RPM.h.

Constructor & Destructor Documentation

◆ AP_RPM() [1/2]

AP_RPM::AP_RPM ( void  )

Definition at line 93 of file AP_RPM.cpp.

Here is the call graph for this function:

◆ AP_RPM() [2/2]

AP_RPM::AP_RPM ( const AP_RPM other)
delete

Member Function Documentation

◆ detect_instance()

void AP_RPM::detect_instance ( uint8_t  instance)
private

◆ enabled()

bool AP_RPM::enabled ( uint8_t  instance) const

Definition at line 181 of file AP_RPM.cpp.

Referenced by get_signal_quality(), and loop().

Here is the caller graph for this function:

◆ get_rpm()

float AP_RPM::get_rpm ( uint8_t  instance) const
inline

Definition at line 77 of file AP_RPM.h.

Referenced by DataFlash_Class::Log_Write_RPM(), loop(), and AP_ICEngine::update().

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

◆ get_signal_quality()

float AP_RPM::get_signal_quality ( uint8_t  instance) const
inline

Definition at line 87 of file AP_RPM.h.

Referenced by loop().

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

◆ healthy()

bool AP_RPM::healthy ( uint8_t  instance) const

Definition at line 164 of file AP_RPM.cpp.

Referenced by get_rpm(), get_signal_quality(), loop(), and AP_ICEngine::update().

Here is the caller graph for this function:

◆ init()

void AP_RPM::init ( void  )

Definition at line 106 of file AP_RPM.cpp.

Referenced by num_sensors(), and setup().

Here is the caller graph for this function:

◆ num_sensors()

uint8_t AP_RPM::num_sensors ( void  ) const
inline

Definition at line 64 of file AP_RPM.h.

Referenced by loop(), and setup().

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

◆ operator=()

AP_RPM& AP_RPM::operator= ( const AP_RPM )
delete

◆ update()

void AP_RPM::update ( void  )

Definition at line 148 of file AP_RPM.cpp.

Referenced by loop(), and num_sensors().

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

◆ update_instance()

void AP_RPM::update_instance ( uint8_t  instance)
private

Friends And Related Function Documentation

◆ AP_RPM_Backend

friend class AP_RPM_Backend
friend

Definition at line 29 of file AP_RPM.h.

Member Data Documentation

◆ _maximum

AP_Float AP_RPM::_maximum[RPM_MAX_INSTANCES]

Definition at line 57 of file AP_RPM.h.

Referenced by AP_RPM_Pin::update(), and AP_RPM_PX4_PWM::update().

◆ _minimum

AP_Float AP_RPM::_minimum[RPM_MAX_INSTANCES]

◆ _pin

AP_Int8 AP_RPM::_pin[RPM_MAX_INSTANCES]

Definition at line 55 of file AP_RPM.h.

Referenced by AP_RPM_Backend::get_pin().

◆ _quality_min

AP_Float AP_RPM::_quality_min[RPM_MAX_INSTANCES]

Definition at line 59 of file AP_RPM.h.

Referenced by healthy().

◆ _scaling

AP_Float AP_RPM::_scaling[RPM_MAX_INSTANCES]

Definition at line 56 of file AP_RPM.h.

Referenced by AP_RPM_Pin::update(), AP_RPM_SITL::update(), and AP_RPM_PX4_PWM::update().

◆ _type

AP_Int8 AP_RPM::_type[RPM_MAX_INSTANCES]

Definition at line 54 of file AP_RPM.h.

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

◆ drivers

AP_RPM_Backend* AP_RPM::drivers[RPM_MAX_INSTANCES]
private

Definition at line 97 of file AP_RPM.h.

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

◆ num_instances

uint8_t AP_RPM::num_instances
private

Definition at line 98 of file AP_RPM.h.

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

◆ state

RPM_State AP_RPM::state[RPM_MAX_INSTANCES]
private

Definition at line 96 of file AP_RPM.h.

Referenced by AP_RPM(), get_rpm(), get_signal_quality(), healthy(), and init().

◆ var_info

const AP_Param::GroupInfo AP_RPM::var_info
static

Definition at line 61 of file AP_RPM.h.

Referenced by AP_RPM().


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