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

#include <RCInput.h>

Inheritance diagram for F4Light::RCInput:
[legend]
Collaboration diagram for F4Light::RCInput:
[legend]

Public Member Functions

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

Static Public Member Functions

static void late_init (uint8_t b)
 

Static Public Attributes

static uint16_t max_num_pulses
 

Private Member Functions

uint16_t _read_dsm (uint8_t ch)
 
uint16_t _read_ppm (uint8_t ch, uint8_t n)
 

Static Private Attributes

static _parserparsers [MAX_RC_PARSERS]
 
static uint8_t num_parsers
 
static uint8_t _last_read_from
 
static bool is_PPM
 
static uint64_t _last_read
 
static uint8_t _valid_channels
 
static uint16_t last_4 =0
 
static uint16_t _override [F4Light_RC_INPUT_NUM_CHANNELS]
 
static bool _override_valid
 
static bool rc_failsafe_enabled
 
static bool fs_flag
 
static bool aibao_fs_flag
 

Detailed Description

Definition at line 34 of file RCInput.h.

Constructor & Destructor Documentation

◆ RCInput()

RCInput::RCInput ( )

Definition at line 85 of file RCInput.cpp.

Member Function Documentation

◆ _read_dsm()

uint16_t F4Light::RCInput::_read_dsm ( uint8_t  ch)
private

◆ _read_ppm()

uint16_t RCInput::_read_ppm ( uint8_t  ch,
uint8_t  n 
)
private

Definition at line 182 of file RCInput.cpp.

Here is the call graph for this function:

◆ clear_overrides()

void RCInput::clear_overrides ( )
overridevirtual

Implements AP_HAL::RCInput.

Definition at line 331 of file RCInput.cpp.

Referenced by init().

Here is the call graph for this function:
Here is the caller 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 88 of file RCInput.cpp.

Here is the call graph for this function:

◆ late_init()

void RCInput::late_init ( uint8_t  b)
static

Definition at line 141 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 151 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 170 of file RCInput.cpp.

◆ rc_bind()

bool RCInput::rc_bind ( int  dsmMode)
overridevirtual

Reimplemented from AP_HAL::RCInput.

Definition at line 338 of file RCInput.cpp.

Here is the call graph for this function:

◆ read() [1/2]

uint16_t RCInput::read ( uint8_t  ch)
overridevirtual

Implements AP_HAL::RCInput.

Definition at line 190 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 307 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 318 of file RCInput.cpp.

Referenced by clear_overrides().

Here is the caller graph for this function:

Member Data Documentation

◆ _last_read

uint64_t F4Light::RCInput::_last_read
staticprivate

Definition at line 60 of file RCInput.h.

Referenced by new_input(), and read().

◆ _last_read_from

uint8_t F4Light::RCInput::_last_read_from
staticprivate

Definition at line 56 of file RCInput.h.

Referenced by init(), and read().

◆ _override

uint16_t RCInput::_override
staticprivate

Definition at line 70 of file RCInput.h.

Referenced by init(), read(), and set_override().

◆ _override_valid

bool RCInput::_override_valid
staticprivate

Definition at line 71 of file RCInput.h.

Referenced by new_input(), and set_override().

◆ _valid_channels

uint8_t F4Light::RCInput::_valid_channels
staticprivate

Definition at line 61 of file RCInput.h.

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

◆ aibao_fs_flag

bool F4Light::RCInput::aibao_fs_flag
staticprivate

Definition at line 75 of file RCInput.h.

Referenced by read().

◆ fs_flag

bool F4Light::RCInput::fs_flag
staticprivate

Definition at line 75 of file RCInput.h.

Referenced by read().

◆ is_PPM

bool F4Light::RCInput::is_PPM
staticprivate

Definition at line 58 of file RCInput.h.

Referenced by init().

◆ last_4

uint16_t RCInput::last_4 =0
staticprivate

Definition at line 67 of file RCInput.h.

Referenced by num_channels(), and read().

◆ max_num_pulses

uint16_t F4Light::RCInput::max_num_pulses
static

◆ num_parsers

uint8_t F4Light::RCInput::num_parsers
staticprivate

Definition at line 55 of file RCInput.h.

Referenced by init(), late_init(), new_input(), and read().

◆ parsers

_parser* F4Light::RCInput::parsers[MAX_RC_PARSERS]
staticprivate

Definition at line 54 of file RCInput.h.

Referenced by _read_ppm(), init(), late_init(), new_input(), rc_bind(), and read().

◆ rc_failsafe_enabled

bool F4Light::RCInput::rc_failsafe_enabled
staticprivate

Definition at line 73 of file RCInput.h.

Referenced by late_init(), and read().


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