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

#include <command_manager.h>

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)
 
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]
 
ROSflightRF_
 

Detailed Description

Definition at line 69 of file command_manager.h.

Member Enumeration Documentation

Enumerator
ATT_MODE_RATE 
ATT_MODE_ANGLE 

Definition at line 131 of file command_manager.h.

Enumerator
MUX_X 
MUX_Y 
MUX_Z 
MUX_F 

Definition at line 137 of file command_manager.h.

Constructor & Destructor Documentation

rosflight_firmware::CommandManager::CommandManager ( ROSflight _rf)

Definition at line 67 of file command_manager.cpp.

Member Function Documentation

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

Definition at line 185 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 178 of file command_manager.cpp.

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

Definition at line 203 of file command_manager.cpp.

void rosflight_firmware::CommandManager::init ( )

Definition at line 72 of file command_manager.cpp.

void rosflight_firmware::CommandManager::init_failsafe ( )
private

Definition at line 92 of file command_manager.cpp.

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

Definition at line 102 of file command_manager.cpp.

bool rosflight_firmware::CommandManager::offboard_control_active ( )

Definition at line 241 of file command_manager.cpp.

void rosflight_firmware::CommandManager::override_combined_command_with_rc ( )

Definition at line 263 of file command_manager.cpp.

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

Definition at line 86 of file command_manager.cpp.

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

Definition at line 189 of file command_manager.h.

bool rosflight_firmware::CommandManager::rc_override_active ( )

Definition at line 236 of file command_manager.cpp.

bool rosflight_firmware::CommandManager::run ( )

Definition at line 270 of file command_manager.cpp.

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

Definition at line 251 of file command_manager.cpp.

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

Definition at line 257 of file command_manager.cpp.

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

Definition at line 157 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 105 of file command_manager.h.

control_t& rosflight_firmware::CommandManager::failsafe_command_
private

Definition at line 163 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 122 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 114 of file command_manager.h.

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

Definition at line 160 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 97 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 89 of file command_manager.h.

bool rosflight_firmware::CommandManager::rc_override_
private

Definition at line 161 of file command_manager.h.

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

Definition at line 151 of file command_manager.h.

ROSflight& rosflight_firmware::CommandManager::RF_
private

Definition at line 158 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 Wed Jul 3 2019 19:59:31