APM:Libraries
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
VRBRAIN::VRBRAINAnalogSource Class Reference

#include <AnalogIn.h>

Inheritance diagram for VRBRAIN::VRBRAINAnalogSource:
[legend]
Collaboration diagram for VRBRAIN::VRBRAINAnalogSource:
[legend]

Public Member Functions

 VRBRAINAnalogSource (int16_t pin, float initial_value)
 
float read_average ()
 
float read_latest ()
 
void set_pin (uint8_t p)
 
float voltage_average ()
 
float voltage_latest ()
 
float voltage_average_ratiometric ()
 
void set_stop_pin (uint8_t p)
 
void set_settle_time (uint16_t settle_time_ms)
 

Private Member Functions

void _add_value (float v, float vcc5V)
 
float _pin_scaler ()
 

Private Attributes

int16_t _pin
 
int16_t _stop_pin
 
uint16_t _settle_time_ms
 
float _value
 
float _value_ratiometric
 
float _latest_value
 
uint8_t _sum_count
 
float _sum_value
 
float _sum_ratiometric
 

Friends

class VRBRAIN::VRBRAINAnalogIn
 

Detailed Description

Definition at line 21 of file AnalogIn.h.

Constructor & Destructor Documentation

◆ VRBRAINAnalogSource()

VRBRAINAnalogSource::VRBRAINAnalogSource ( int16_t  pin,
float  initial_value 
)

Definition at line 60 of file AnalogIn.cpp.

Member Function Documentation

◆ _add_value()

void VRBRAINAnalogSource::_add_value ( float  v,
float  vcc5V 
)
private

Definition at line 164 of file AnalogIn.cpp.

Referenced by VRBRAIN::VRBRAINAnalogIn::_timer_tick().

Here is the caller graph for this function:

◆ _pin_scaler()

float VRBRAINAnalogSource::_pin_scaler ( void  )
private

Definition at line 106 of file AnalogIn.cpp.

Referenced by voltage_average(), voltage_average_ratiometric(), and voltage_latest().

Here is the caller graph for this function:

◆ read_average()

float VRBRAINAnalogSource::read_average ( )
virtual

Implements AP_HAL::AnalogSource.

Definition at line 83 of file AnalogIn.cpp.

Referenced by voltage_average().

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

◆ read_latest()

float VRBRAINAnalogSource::read_latest ( )
virtual

Implements AP_HAL::AnalogSource.

Definition at line 98 of file AnalogIn.cpp.

Referenced by voltage_latest().

Here is the caller graph for this function:

◆ set_pin()

void VRBRAINAnalogSource::set_pin ( uint8_t  p)
virtual

Implements AP_HAL::AnalogSource.

Definition at line 145 of file AnalogIn.cpp.

Here is the call graph for this function:

◆ set_settle_time()

void VRBRAIN::VRBRAINAnalogSource::set_settle_time ( uint16_t  settle_time_ms)
inlinevirtual

Implements AP_HAL::AnalogSource.

Definition at line 34 of file AnalogIn.h.

◆ set_stop_pin()

void VRBRAINAnalogSource::set_stop_pin ( uint8_t  p)
virtual

Implements AP_HAL::AnalogSource.

Definition at line 78 of file AnalogIn.cpp.

◆ voltage_average()

float VRBRAINAnalogSource::voltage_average ( void  )
virtual

Implements AP_HAL::AnalogSource.

Definition at line 122 of file AnalogIn.cpp.

Referenced by voltage_average_ratiometric().

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

◆ voltage_average_ratiometric()

float VRBRAINAnalogSource::voltage_average_ratiometric ( void  )
virtual

Implements AP_HAL::AnalogSource.

Definition at line 131 of file AnalogIn.cpp.

Here is the call graph for this function:

◆ voltage_latest()

float VRBRAINAnalogSource::voltage_latest ( void  )
virtual

Implements AP_HAL::AnalogSource.

Definition at line 140 of file AnalogIn.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ VRBRAIN::VRBRAINAnalogIn

friend class VRBRAIN::VRBRAINAnalogIn
friend

Definition at line 23 of file AnalogIn.h.

Member Data Documentation

◆ _latest_value

float VRBRAIN::VRBRAINAnalogSource::_latest_value
private

Definition at line 45 of file AnalogIn.h.

Referenced by _add_value(), read_latest(), and set_pin().

◆ _pin

int16_t VRBRAIN::VRBRAINAnalogSource::_pin
private

Definition at line 38 of file AnalogIn.h.

Referenced by _pin_scaler(), VRBRAIN::VRBRAINAnalogIn::_timer_tick(), and set_pin().

◆ _settle_time_ms

uint16_t VRBRAIN::VRBRAINAnalogSource::_settle_time_ms
private

Definition at line 40 of file AnalogIn.h.

Referenced by VRBRAIN::VRBRAINAnalogIn::_timer_tick(), and set_settle_time().

◆ _stop_pin

int16_t VRBRAIN::VRBRAINAnalogSource::_stop_pin
private

◆ _sum_count

uint8_t VRBRAIN::VRBRAINAnalogSource::_sum_count
private

Definition at line 46 of file AnalogIn.h.

Referenced by _add_value(), read_average(), and set_pin().

◆ _sum_ratiometric

float VRBRAIN::VRBRAINAnalogSource::_sum_ratiometric
private

Definition at line 48 of file AnalogIn.h.

Referenced by _add_value(), read_average(), and set_pin().

◆ _sum_value

float VRBRAIN::VRBRAINAnalogSource::_sum_value
private

Definition at line 47 of file AnalogIn.h.

Referenced by _add_value(), read_average(), and set_pin().

◆ _value

float VRBRAIN::VRBRAINAnalogSource::_value
private

Definition at line 43 of file AnalogIn.h.

Referenced by read_average(), and set_pin().

◆ _value_ratiometric

float VRBRAIN::VRBRAINAnalogSource::_value_ratiometric
private

Definition at line 44 of file AnalogIn.h.

Referenced by read_average(), set_pin(), and voltage_average_ratiometric().


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