APM:Libraries
Public Types | Public Member Functions | Private Attributes | List of all members
AP_RCProtocol Class Reference

#include <AP_RCProtocol.h>

Collaboration diagram for AP_RCProtocol:
[legend]

Public Types

enum  rcprotocol_t {
  PPM = 0, SBUS, SBUS_NI, DSM,
  NONE
}
 

Public Member Functions

void init ()
 
void process_pulse (uint32_t width_s0, uint32_t width_s1)
 
enum rcprotocol_t protocol_detected ()
 
uint8_t num_channels ()
 
uint16_t read (uint8_t chan)
 
bool new_input ()
 
void start_bind (void)
 

Private Attributes

enum rcprotocol_t _detected_protocol = NONE
 
AP_RCProtocol_Backendbackend [NONE]
 
bool _new_input = false
 
uint32_t _last_input_ms
 

Detailed Description

Definition at line 25 of file AP_RCProtocol.h.

Member Enumeration Documentation

◆ rcprotocol_t

Enumerator
PPM 
SBUS 
SBUS_NI 
DSM 
NONE 

Definition at line 27 of file AP_RCProtocol.h.

Member Function Documentation

◆ init()

void AP_RCProtocol::init ( void  )

Definition at line 24 of file AP_RCProtocol.cpp.

Referenced by ChibiOS::RCInput::init().

Here is the caller graph for this function:

◆ new_input()

bool AP_RCProtocol::new_input ( void  )

Definition at line 58 of file AP_RCProtocol.cpp.

Referenced by ChibiOS::RCInput::_timer_tick(), process_pulse(), and protocol_detected().

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

◆ num_channels()

uint8_t AP_RCProtocol::num_channels ( void  )

Definition at line 72 of file AP_RCProtocol.cpp.

Referenced by ChibiOS::RCInput::_timer_tick(), and protocol_detected().

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

◆ process_pulse()

void AP_RCProtocol::process_pulse ( uint32_t  width_s0,
uint32_t  width_s1 
)

Definition at line 32 of file AP_RCProtocol.cpp.

Referenced by ChibiOS::RCInput::_timer_tick().

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

◆ protocol_detected()

enum rcprotocol_t AP_RCProtocol::protocol_detected ( )
inline

Definition at line 36 of file AP_RCProtocol.h.

Here is the call graph for this function:

◆ read()

uint16_t AP_RCProtocol::read ( uint8_t  chan)

Definition at line 80 of file AP_RCProtocol.cpp.

Referenced by ChibiOS::RCInput::_timer_tick(), and protocol_detected().

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

◆ start_bind()

void AP_RCProtocol::start_bind ( void  )

Definition at line 91 of file AP_RCProtocol.cpp.

Referenced by protocol_detected(), and ChibiOS::RCInput::rc_bind().

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

Member Data Documentation

◆ _detected_protocol

enum rcprotocol_t AP_RCProtocol::_detected_protocol = NONE
private

Definition at line 43 of file AP_RCProtocol.h.

Referenced by num_channels(), process_pulse(), protocol_detected(), and read().

◆ _last_input_ms

uint32_t AP_RCProtocol::_last_input_ms
private

Definition at line 46 of file AP_RCProtocol.h.

Referenced by process_pulse().

◆ _new_input

bool AP_RCProtocol::_new_input = false
private

Definition at line 45 of file AP_RCProtocol.h.

Referenced by new_input(), and process_pulse().

◆ backend

AP_RCProtocol_Backend* AP_RCProtocol::backend[NONE]
private

Definition at line 44 of file AP_RCProtocol.h.

Referenced by init(), new_input(), num_channels(), process_pulse(), read(), and start_bind().


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