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

#include <command_manager.h>

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

Classes

struct  mux_t
 
struct  rc_stick_override_t
 

Public Member Functions

const control_tcombined_control () const
 
 CommandManager (ROSflight &_rf)
 
void init ()
 
bool offboard_control_active ()
 
void override_combined_command_with_rc ()
 
const control_trc_control () const
 
bool rc_override_active ()
 
bool run ()
 
void set_new_offboard_command (control_t new_offboard_command)
 
void set_new_rc_command (control_t new_rc_command)
 

Private Types

enum  att_mode_t { ATT_MODE_RATE, ATT_MODE_ANGLE }
 
enum  MuxChannel { MUX_X, MUX_Y, MUX_Z, MUX_F }
 

Private Member Functions

void do_min_throttle_muxing ()
 
bool do_roll_pitch_yaw_muxing (MuxChannel channel)
 
bool do_throttle_muxing (void)
 
void init_failsafe ()
 
void interpret_rc (void)
 
void param_change_callback (uint16_t param_id) override
 
bool stick_deviated (MuxChannel channel)
 

Private Attributes

control_t combined_command_
 
control_tfailsafe_command_
 
control_t fixedwing_failsafe_command_
 
control_t multirotor_failsafe_command_
 
mux_t muxes [4]
 
bool new_command_
 
control_t offboard_command_
 
control_t rc_command_
 
bool rc_override_
 
rc_stick_override_t rc_stick_override_ [3] = {{RC::STICK_X, 0}, {RC::STICK_Y, 0}, {RC::STICK_Z, 0}}
 
ROSflightRF_
 

Detailed Description

Definition at line 70 of file command_manager.h.

Member Enumeration Documentation

Enumerator
ATT_MODE_RATE 
ATT_MODE_ANGLE 

Definition at line 114 of file command_manager.h.

Enumerator
MUX_X 
MUX_Y 
MUX_Z 
MUX_F 

Definition at line 120 of file command_manager.h.

Constructor & Destructor Documentation

rosflight_firmware::CommandManager::CommandManager ( ROSflight _rf)

Definition at line 62 of file command_manager.cpp.

Member Function Documentation

const control_t& rosflight_firmware::CommandManager::combined_control ( ) const
inline

Definition at line 162 of file command_manager.h.

void rosflight_firmware::CommandManager::do_min_throttle_muxing ( )
private
bool rosflight_firmware::CommandManager::do_roll_pitch_yaw_muxing ( MuxChannel  channel)
private

Definition at line 169 of file command_manager.cpp.

bool rosflight_firmware::CommandManager::do_throttle_muxing ( void  )
private

Definition at line 195 of file command_manager.cpp.

void rosflight_firmware::CommandManager::init ( )

Definition at line 64 of file command_manager.cpp.

void rosflight_firmware::CommandManager::init_failsafe ( )
private

Definition at line 83 of file command_manager.cpp.

void rosflight_firmware::CommandManager::interpret_rc ( void  )
private

Definition at line 93 of file command_manager.cpp.

bool rosflight_firmware::CommandManager::offboard_control_active ( )

Definition at line 233 of file command_manager.cpp.

void rosflight_firmware::CommandManager::override_combined_command_with_rc ( )

Definition at line 255 of file command_manager.cpp.

void rosflight_firmware::CommandManager::param_change_callback ( uint16_t  param_id)
overrideprivatevirtual

Implements rosflight_firmware::ParamListenerInterface.

Definition at line 69 of file command_manager.cpp.

const control_t& rosflight_firmware::CommandManager::rc_control ( ) const
inline

Definition at line 163 of file command_manager.h.

bool rosflight_firmware::CommandManager::rc_override_active ( )

Definition at line 228 of file command_manager.cpp.

bool rosflight_firmware::CommandManager::run ( )

Definition at line 261 of file command_manager.cpp.

void rosflight_firmware::CommandManager::set_new_offboard_command ( control_t  new_offboard_command)

Definition at line 243 of file command_manager.cpp.

void rosflight_firmware::CommandManager::set_new_rc_command ( control_t  new_rc_command)

Definition at line 249 of file command_manager.cpp.

bool rosflight_firmware::CommandManager::stick_deviated ( MuxChannel  channel)
private

Definition at line 148 of file command_manager.cpp.

Member Data Documentation

control_t rosflight_firmware::CommandManager::combined_command_
private
Initial value:
= {0,
{false, ANGLE, 0.0},
{false, ANGLE, 0.0},
{false, RATE, 0.0},
{false, THROTTLE, 0.0}}

Definition at line 96 of file command_manager.h.

control_t& rosflight_firmware::CommandManager::failsafe_command_
private

Definition at line 141 of file command_manager.h.

control_t rosflight_firmware::CommandManager::fixedwing_failsafe_command_
private
Initial value:
= {0,
{true, PASSTHROUGH, 0.0},
{true, PASSTHROUGH, 0.0},
{true, PASSTHROUGH, 0.0},
{true, THROTTLE, 0.0}}

Definition at line 107 of file command_manager.h.

control_t rosflight_firmware::CommandManager::multirotor_failsafe_command_
private
Initial value:
= {0,
{true, ANGLE, 0.0},
{true, ANGLE, 0.0},
{true, RATE, 0.0},
{true, THROTTLE, 0.0}}

Definition at line 102 of file command_manager.h.

mux_t rosflight_firmware::CommandManager::muxes[4]
private
bool rosflight_firmware::CommandManager::new_command_
private

Definition at line 138 of file command_manager.h.

control_t rosflight_firmware::CommandManager::offboard_command_
private
Initial value:
= {0,
{false, ANGLE, 0.0},
{false, ANGLE, 0.0},
{false, RATE, 0.0},
{false, THROTTLE, 0.0}}

Definition at line 91 of file command_manager.h.

control_t rosflight_firmware::CommandManager::rc_command_
private
Initial value:
= {0,
{false, ANGLE, 0.0},
{false, ANGLE, 0.0},
{false, RATE, 0.0},
{false, THROTTLE, 0.0}}

Definition at line 86 of file command_manager.h.

bool rosflight_firmware::CommandManager::rc_override_
private

Definition at line 139 of file command_manager.h.

rc_stick_override_t rosflight_firmware::CommandManager::rc_stick_override_[3] = {{RC::STICK_X, 0}, {RC::STICK_Y, 0}, {RC::STICK_Z, 0}}
private

Definition at line 134 of file command_manager.h.

ROSflight& rosflight_firmware::CommandManager::RF_
private

Definition at line 136 of file command_manager.h.


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


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Fri Oct 9 2020 03:17:21