Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
rosflight_firmware::RC Class Reference

#include <rc.h>

Inheritance diagram for rosflight_firmware::RC:
Inheritance graph
[legend]

Classes

struct  rc_stick_config_t
 
struct  rc_switch_config_t
 

Public Types

enum  Stick {
  STICK_X, STICK_Y, STICK_Z, STICK_F,
  STICKS_COUNT
}
 
enum  Switch {
  SWITCH_ARM, SWITCH_ATT_OVERRIDE, SWITCH_THROTTLE_OVERRIDE, SWITCH_ATT_TYPE,
  SWITCHES_COUNT
}
 

Public Member Functions

void init ()
 
bool new_command ()
 
void param_change_callback (uint16_t param_id) override
 
 RC (ROSflight &_rf)
 
bool run ()
 
float stick (Stick channel)
 
bool switch_mapped (Switch channel)
 
bool switch_on (Switch channel)
 

Private Member Functions

bool check_rc_lost ()
 
void init_rc ()
 
void init_sticks ()
 
void init_switches ()
 
void look_for_arm_disarm_signal ()
 

Private Attributes

uint32_t last_rc_receive_time = 0
 
bool new_command_
 
uint32_t prev_time_ms = 0
 
ROSflightRF_
 
volatile float stick_values [STICKS_COUNT]
 
rc_stick_config_t sticks [STICKS_COUNT]
 
volatile bool switch_values [SWITCHES_COUNT]
 
rc_switch_config_t switches [SWITCHES_COUNT]
 
uint32_t time_of_last_stick_deviation = 0
 
uint32_t time_sticks_have_been_in_arming_position_ms = 0
 

Detailed Description

Definition at line 44 of file rc.h.

Member Enumeration Documentation

Enumerator
STICK_X 
STICK_Y 
STICK_Z 
STICK_F 
STICKS_COUNT 

Definition at line 47 of file rc.h.

Enumerator
SWITCH_ARM 
SWITCH_ATT_OVERRIDE 
SWITCH_THROTTLE_OVERRIDE 
SWITCH_ATT_TYPE 
SWITCHES_COUNT 

Definition at line 56 of file rc.h.

Constructor & Destructor Documentation

rosflight_firmware::RC::RC ( ROSflight _rf)

Definition at line 40 of file rc.cpp.

Member Function Documentation

bool rosflight_firmware::RC::check_rc_lost ( )
private

Definition at line 173 of file rc.cpp.

void rosflight_firmware::RC::init ( )

Definition at line 42 of file rc.cpp.

void rosflight_firmware::RC::init_rc ( )
private

Definition at line 48 of file rc.cpp.

void rosflight_firmware::RC::init_sticks ( void  )
private

Definition at line 99 of file rc.cpp.

void rosflight_firmware::RC::init_switches ( )
private

Definition at line 114 of file rc.cpp.

void rosflight_firmware::RC::look_for_arm_disarm_signal ( )
private

Definition at line 205 of file rc.cpp.

bool rosflight_firmware::RC::new_command ( )

Definition at line 321 of file rc.cpp.

void rosflight_firmware::RC::param_change_callback ( uint16_t  param_id)
overridevirtual

Implements rosflight_firmware::ParamListenerInterface.

Definition at line 55 of file rc.cpp.

bool rosflight_firmware::RC::run ( )

Definition at line 264 of file rc.cpp.

float rosflight_firmware::RC::stick ( Stick  channel)

Definition at line 84 of file rc.cpp.

bool rosflight_firmware::RC::switch_mapped ( Switch  channel)

Definition at line 94 of file rc.cpp.

bool rosflight_firmware::RC::switch_on ( Switch  channel)

Definition at line 89 of file rc.cpp.

Member Data Documentation

uint32_t rosflight_firmware::RC::last_rc_receive_time = 0
private

Definition at line 96 of file rc.h.

bool rosflight_firmware::RC::new_command_
private

Definition at line 91 of file rc.h.

uint32_t rosflight_firmware::RC::prev_time_ms = 0
private

Definition at line 95 of file rc.h.

ROSflight& rosflight_firmware::RC::RF_
private

Definition at line 76 of file rc.h.

volatile float rosflight_firmware::RC::stick_values[STICKS_COUNT]
private

Definition at line 102 of file rc.h.

rc_stick_config_t rosflight_firmware::RC::sticks[STICKS_COUNT]
private

Definition at line 98 of file rc.h.

volatile bool rosflight_firmware::RC::switch_values[SWITCHES_COUNT]
private

Definition at line 101 of file rc.h.

rc_switch_config_t rosflight_firmware::RC::switches[SWITCHES_COUNT]
private

Definition at line 99 of file rc.h.

uint32_t rosflight_firmware::RC::time_of_last_stick_deviation = 0
private

Definition at line 93 of file rc.h.

uint32_t rosflight_firmware::RC::time_sticks_have_been_in_arming_position_ms = 0
private

Definition at line 94 of file rc.h.


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


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Sat May 9 2020 03:17:00