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

#include <RCInput.h>

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

Public Member Functions

void init () override
 
bool new_input () override
 
uint8_t num_channels () override
 
uint16_t read (uint8_t ch) override
 
uint8_t read (uint16_t *periods, uint8_t len) override
 
int16_t get_rssi (void) override
 
bool set_override (uint8_t channel, int16_t override) override
 
void clear_overrides () override
 
void _timer_tick (void)
 
bool rc_bind (int dsmMode) override
 
- Public Member Functions inherited from AP_HAL::RCInput
virtual void teardown ()
 

Private Member Functions

const char * input_source_name (uint8_t id) const
 

Private Attributes

uint16_t _override [RC_INPUT_MAX_CHANNELS]
 
struct rc_input_values _rcin
 
int _rc_sub
 
uint64_t _last_read
 
bool _override_valid
 
perf_counter_t _perf_rcin
 
pthread_mutex_t rcin_mutex
 
int16_t _rssi = -1
 
uint8_t last_input_source = input_rc_s::RC_INPUT_SOURCE_UNKNOWN
 

Detailed Description

Definition at line 13 of file RCInput.h.

Member Function Documentation

◆ _timer_tick()

void VRBRAINRCInput::_timer_tick ( void  )

Definition at line 135 of file RCInput.cpp.

Referenced by get_rssi().

Here is the caller graph for this function:

◆ clear_overrides()

void VRBRAINRCInput::clear_overrides ( )
overridevirtual

Implements AP_HAL::RCInput.

Definition at line 104 of file RCInput.cpp.

Referenced by get_rssi(), and init().

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

◆ get_rssi()

int16_t VRBRAIN::VRBRAINRCInput::get_rssi ( void  )
inlineoverridevirtual

Reimplemented from AP_HAL::RCInput.

Definition at line 21 of file RCInput.h.

Here is the call graph for this function:

◆ init()

void VRBRAINRCInput::init ( )
overridevirtual

Call init from the platform hal instance init, so that both the type of the RCInput implementation and init argument (e.g. ISRRegistry) are known to the programmer. (It's too difficult to describe this dependency in the C++ type system.)

Implements AP_HAL::RCInput.

Definition at line 17 of file RCInput.cpp.

Here is the call graph for this function:

◆ input_source_name()

const char * VRBRAINRCInput::input_source_name ( uint8_t  id) const
private

Definition at line 111 of file RCInput.cpp.

Referenced by new_input().

Here is the caller graph for this function:

◆ new_input()

bool VRBRAINRCInput::new_input ( )
overridevirtual

Return true if there has been new input since the last call to new_input()

Implements AP_HAL::RCInput.

Definition at line 28 of file RCInput.cpp.

Here is the call graph for this function:

◆ num_channels()

uint8_t VRBRAINRCInput::num_channels ( )
overridevirtual

Return the number of valid channels in the last read

Implements AP_HAL::RCInput.

Definition at line 50 of file RCInput.cpp.

◆ rc_bind()

bool VRBRAINRCInput::rc_bind ( int  dsmMode)
overridevirtual

Reimplemented from AP_HAL::RCInput.

Definition at line 153 of file RCInput.cpp.

Referenced by get_rssi().

Here is the caller graph for this function:

◆ read() [1/2]

uint16_t VRBRAINRCInput::read ( uint8_t  ch)
overridevirtual

Implements AP_HAL::RCInput.

Definition at line 58 of file RCInput.cpp.

Referenced by read().

Here is the caller graph for this function:

◆ read() [2/2]

uint8_t VRBRAINRCInput::read ( uint16_t *  periods,
uint8_t  len 
)
overridevirtual

Implements AP_HAL::RCInput.

Definition at line 78 of file RCInput.cpp.

Here is the call graph for this function:

◆ set_override()

bool VRBRAINRCInput::set_override ( uint8_t  channel,
int16_t  override 
)
overridevirtual

Overrides: these are really grody and don't belong here but we need them at the moment to make the port work. case v of: v == -1 -> no change to this channel v == 0 -> do not override this channel v > 0 -> set v as override.

Implements AP_HAL::RCInput.

Definition at line 89 of file RCInput.cpp.

Referenced by clear_overrides(), and get_rssi().

Here is the caller graph for this function:

Member Data Documentation

◆ _last_read

uint64_t VRBRAIN::VRBRAINRCInput::_last_read
private

Definition at line 38 of file RCInput.h.

Referenced by new_input().

◆ _override

uint16_t VRBRAIN::VRBRAINRCInput::_override[RC_INPUT_MAX_CHANNELS]
private

Definition at line 35 of file RCInput.h.

Referenced by read(), and set_override().

◆ _override_valid

bool VRBRAIN::VRBRAINRCInput::_override_valid
private

Definition at line 39 of file RCInput.h.

Referenced by new_input(), and set_override().

◆ _perf_rcin

perf_counter_t VRBRAIN::VRBRAINRCInput::_perf_rcin
private

Definition at line 40 of file RCInput.h.

Referenced by _timer_tick(), and init().

◆ _rc_sub

int VRBRAIN::VRBRAINRCInput::_rc_sub
private

Definition at line 37 of file RCInput.h.

Referenced by _timer_tick(), and init().

◆ _rcin

struct rc_input_values VRBRAIN::VRBRAINRCInput::_rcin
private

Definition at line 36 of file RCInput.h.

Referenced by _timer_tick(), new_input(), num_channels(), and read().

◆ _rssi

int16_t VRBRAIN::VRBRAINRCInput::_rssi = -1
private

Definition at line 42 of file RCInput.h.

Referenced by _timer_tick(), and get_rssi().

◆ last_input_source

uint8_t VRBRAIN::VRBRAINRCInput::last_input_source = input_rc_s::RC_INPUT_SOURCE_UNKNOWN
private

Definition at line 44 of file RCInput.h.

Referenced by new_input().

◆ rcin_mutex

pthread_mutex_t VRBRAIN::VRBRAINRCInput::rcin_mutex
private

Definition at line 41 of file RCInput.h.

Referenced by _timer_tick(), init(), new_input(), num_channels(), and read().


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