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

#include <RCInput.h>

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

Public Member Functions

 RCInput (SITL_State *sitlState)
 
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
 
bool set_override (uint8_t channel, int16_t override) override
 
void clear_overrides () override
 
- Public Member Functions inherited from AP_HAL::RCInput
virtual void teardown ()
 
virtual int16_t get_rssi (void)
 
virtual bool rc_bind (int dsmMode)
 

Private Attributes

SITL_State_sitlState
 
uint16_t _override [SITL_RC_INPUT_CHANNELS]
 

Detailed Description

Definition at line 10 of file RCInput.h.

Constructor & Destructor Documentation

◆ RCInput()

HALSITL::RCInput::RCInput ( SITL_State sitlState)
inlineexplicit

Definition at line 12 of file RCInput.h.

Here is the call graph for this function:

Member Function Documentation

◆ clear_overrides()

void RCInput::clear_overrides ( )
overridevirtual

Implements AP_HAL::RCInput.

Definition at line 60 of file RCInput.cpp.

Referenced by init(), and num_channels().

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 10 of file RCInput.cpp.

Referenced by RCInput().

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

Referenced by RCInput().

Here is the caller graph for this function:

◆ num_channels()

uint8_t HALSITL::RCInput::num_channels ( )
inlineoverridevirtual

Return the number of valid channels in the last read

Implements AP_HAL::RCInput.

Definition at line 15 of file RCInput.h.

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 24 of file RCInput.cpp.

Referenced by num_channels(), and read().

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 35 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 46 of file RCInput.cpp.

Referenced by num_channels().

Here is the caller graph for this function:

Member Data Documentation

◆ _override

uint16_t HALSITL::RCInput::_override[SITL_RC_INPUT_CHANNELS]
private

Definition at line 28 of file RCInput.h.

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

◆ _sitlState

SITL_State* HALSITL::RCInput::_sitlState
private

Definition at line 25 of file RCInput.h.

Referenced by new_input(), and read().


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