APM:Libraries
Public Member Functions | Private Attributes | List of all members
ChibiOS::RCInput Class Reference

#include <RCInput.h>

Inheritance diagram for ChibiOS::RCInput:
[legend]
Collaboration diagram for ChibiOS::RCInput:
[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 Attributes

uint16_t _override [RC_INPUT_MAX_CHANNELS]
 
uint16_t _rc_values [RC_INPUT_MAX_CHANNELS] = {0}
 
uint64_t _last_read
 
bool _override_valid
 
uint8_t _num_channels
 
Semaphore rcin_mutex
 
int16_t _rssi = -1
 
uint32_t _rcin_timestamp_last_signal
 
bool _init
 
ChibiOS::SoftSigReader sig_reader
 
AP_RCProtocol rcin_prot
 
ChibiOS::SoftSigReaderInt sig_reader
 

Detailed Description

Definition at line 41 of file RCInput.h.

Member Function Documentation

◆ _timer_tick()

void RCInput::_timer_tick ( void  )

Definition at line 157 of file RCInput.cpp.

Referenced by get_rssi().

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

◆ clear_overrides()

void RCInput::clear_overrides ( )
overridevirtual

Implements AP_HAL::RCInput.

Definition at line 149 of file RCInput.cpp.

Referenced by get_rssi().

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

◆ get_rssi()

int16_t ChibiOS::RCInput::get_rssi ( void  )
inlineoverridevirtual

Reimplemented from AP_HAL::RCInput.

Definition at line 49 of file RCInput.h.

Here is the call graph for this function:

◆ init()

void RCInput::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 31 of file RCInput.cpp.

Here is the call graph for this function:

◆ new_input()

bool RCInput::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 47 of file RCInput.cpp.

Here is the call graph for this function:

◆ num_channels()

uint8_t RCInput::num_channels ( )
overridevirtual

Return the number of valid channels in the last read

Implements AP_HAL::RCInput.

Definition at line 77 of file RCInput.cpp.

◆ rc_bind()

bool RCInput::rc_bind ( int  dsmMode)
overridevirtual

Reimplemented from AP_HAL::RCInput.

Definition at line 210 of file RCInput.cpp.

Referenced by get_rssi().

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

◆ read() [1/2]

uint16_t RCInput::read ( uint8_t  ch)
overridevirtual

Implements AP_HAL::RCInput.

Definition at line 85 of file RCInput.cpp.

Referenced by read().

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

◆ read() [2/2]

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

Implements AP_HAL::RCInput.

Definition at line 114 of file RCInput.cpp.

Here is the call graph for this function:

◆ set_override()

bool RCInput::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 129 of file RCInput.cpp.

Referenced by clear_overrides(), and get_rssi().

Here is the caller graph for this function:

Member Data Documentation

◆ _init

bool ChibiOS::RCInput::_init
private

Definition at line 71 of file RCInput.h.

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

◆ _last_read

uint64_t ChibiOS::RCInput::_last_read
private

Definition at line 65 of file RCInput.h.

Referenced by new_input().

◆ _num_channels

uint8_t ChibiOS::RCInput::_num_channels
private

Definition at line 67 of file RCInput.h.

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

◆ _override

uint16_t ChibiOS::RCInput::_override[RC_INPUT_MAX_CHANNELS]
private

Definition at line 62 of file RCInput.h.

Referenced by read(), and set_override().

◆ _override_valid

bool ChibiOS::RCInput::_override_valid
private

Definition at line 66 of file RCInput.h.

Referenced by new_input(), and set_override().

◆ _rc_values

uint16_t ChibiOS::RCInput::_rc_values[RC_INPUT_MAX_CHANNELS] = {0}
private

Definition at line 63 of file RCInput.h.

Referenced by _timer_tick(), and read().

◆ _rcin_timestamp_last_signal

uint32_t ChibiOS::RCInput::_rcin_timestamp_last_signal
private

Definition at line 70 of file RCInput.h.

Referenced by _timer_tick(), and new_input().

◆ _rssi

int16_t ChibiOS::RCInput::_rssi = -1
private

Definition at line 69 of file RCInput.h.

Referenced by get_rssi().

◆ rcin_mutex

Semaphore ChibiOS::RCInput::rcin_mutex
private

Definition at line 68 of file RCInput.h.

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

◆ rcin_prot

AP_RCProtocol ChibiOS::RCInput::rcin_prot
private

Definition at line 80 of file RCInput.h.

Referenced by _timer_tick(), init(), and rc_bind().

◆ sig_reader [1/2]

ChibiOS::SoftSigReader ChibiOS::RCInput::sig_reader
private

Definition at line 79 of file RCInput.h.

Referenced by _timer_tick(), and init().

◆ sig_reader [2/2]

ChibiOS::SoftSigReaderInt ChibiOS::RCInput::sig_reader
private

Definition at line 84 of file RCInput.h.


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