PX4 Firmware
PX4 Autopilot Software http://px4.io
df_bebop_bus_wrapper Namespace Reference

Functions

int start ()
 Attempt to start driver on all available I2C busses. More...
 
int stop ()
 Stop the driver. More...
 
int info ()
 Print a little info about the driver. More...
 
int clear_errors ()
 Clear errors present on the Bebop hardware. More...
 
void usage ()
 Prints info about the driver argument usage. More...
 
void task_main (int argc, char *argv[])
 
int initialize_mixers (const char *mixers_filename)
 
int mixers_control_callback (uintptr_t handle, uint8_t control_group, uint8_t control_index, float &input)
 

Variables

DfBebopBusWrapperg_dev = nullptr
 
volatile bool _task_should_exit = false
 
static bool _is_running = false
 
static bool _motors_running = false
 
static px4_task_t _task_handle = -1
 
static const char * MIXER_FILENAME = "/home/root/bebop.main.mix"
 
int _controls_sub
 
int _armed_sub
 
orb_advert_t _outputs_pub = nullptr
 
orb_advert_t _rc_pub = nullptr
 
actuator_controls_s _controls [1]
 
actuator_outputs_s _outputs
 
actuator_armed_s _armed
 
MixerGroup_mixers = nullptr
 

Function Documentation

◆ clear_errors()

int df_bebop_bus_wrapper::clear_errors ( )

Clear errors present on the Bebop hardware.

Definition at line 562 of file df_bebop_bus_wrapper.cpp.

References DfBebopBusWrapper::clear_errors().

Referenced by df_bebop_bus_wrapper_main().

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

◆ info()

int df_bebop_bus_wrapper::info ( )

Print a little info about the driver.

Definition at line 539 of file df_bebop_bus_wrapper.cpp.

References DfBebopBusWrapper::print_info().

Referenced by df_bebop_bus_wrapper_main(), and DfBebopBusWrapper::print_info().

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

◆ initialize_mixers()

int df_bebop_bus_wrapper::initialize_mixers ( const char *  mixers_filename)

Definition at line 297 of file df_bebop_bus_wrapper.cpp.

References _mixers, MixerGroup::load_from_buf(), load_mixer_file(), and mixers_control_callback().

Referenced by task_main().

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

◆ mixers_control_callback()

int df_bebop_bus_wrapper::mixers_control_callback ( uintptr_t  handle,
uint8_t  control_group,
uint8_t  control_index,
float &  input 
)

Definition at line 285 of file df_bebop_bus_wrapper.cpp.

References actuator_controls_s::control.

Referenced by initialize_mixers().

Here is the caller graph for this function:

◆ start()

int df_bebop_bus_wrapper::start ( )

Attempt to start driver on all available I2C busses.

This function will return as soon as the first sensor is detected on one of the available busses or if no sensors are detected.

Definition at line 460 of file df_bebop_bus_wrapper.cpp.

References DfBebopBusWrapper::DfBebopBusWrapper(), DfBebopBusWrapper::start(), and task_main().

Referenced by df_bebop_bus_wrapper_main().

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

◆ stop()

int df_bebop_bus_wrapper::stop ( )

Stop the driver.

Stop the driver.

Definition at line 505 of file df_bebop_bus_wrapper.cpp.

References g_dev, and DfBebopBusWrapper::stop().

Referenced by df_bebop_bus_wrapper_main().

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

◆ task_main()

void df_bebop_bus_wrapper::task_main ( int  argc,
char *  argv[] 
)

Definition at line 331 of file df_bebop_bus_wrapper.cpp.

References _controls_sub, actuator_armed_s::armed, f(), actuator_armed_s::force_failsafe, initialize_mixers(), actuator_armed_s::lockdown, actuator_armed_s::manual_lockdown, MixerGroup::mix(), actuator_outputs_s::noutputs, orb_advertise(), orb_check(), orb_copy(), ORB_ID, orb_publish(), orb_subscribe(), orb_unsubscribe(), actuator_outputs_s::output, actuator_armed_s::prearmed, px4_poll(), DfBebopBusWrapper::set_esc_speeds(), DfBebopBusWrapper::set_last_throttle(), DfBebopBusWrapper::start_motors(), DfBebopBusWrapper::stop_motors(), actuator_outputs_s::timestamp, and actuator_controls_s::timestamp.

Referenced by start().

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

◆ usage()

void df_bebop_bus_wrapper::usage ( void  )

Prints info about the driver argument usage.

Prints info about the driver argument usage.

Definition at line 582 of file df_bebop_bus_wrapper.cpp.

Referenced by df_bebop_bus_wrapper_main().

Here is the caller graph for this function:

Variable Documentation

◆ _armed

actuator_armed_s df_bebop_bus_wrapper::_armed

Definition at line 269 of file df_bebop_bus_wrapper.cpp.

Referenced by MixingOutput::armed(), and MixingOutput::armNoThrottle().

◆ _armed_sub

int df_bebop_bus_wrapper::_armed_sub

Definition at line 260 of file df_bebop_bus_wrapper.cpp.

Referenced by SafetyButton::FlashButton().

◆ _controls

actuator_controls_s df_bebop_bus_wrapper::_controls[1]

Definition at line 267 of file df_bebop_bus_wrapper.cpp.

◆ _controls_sub

int df_bebop_bus_wrapper::_controls_sub

Definition at line 259 of file df_bebop_bus_wrapper.cpp.

Referenced by task_main().

◆ _is_running

bool df_bebop_bus_wrapper::_is_running = false
static

Definition at line 252 of file df_bebop_bus_wrapper.cpp.

◆ _mixers

MixerGroup* df_bebop_bus_wrapper::_mixers = nullptr

Definition at line 271 of file df_bebop_bus_wrapper.cpp.

Referenced by initialize_mixers(), and MixingOutput::mixers().

◆ _motors_running

bool df_bebop_bus_wrapper::_motors_running = false
static

Definition at line 253 of file df_bebop_bus_wrapper.cpp.

◆ _outputs

actuator_outputs_s df_bebop_bus_wrapper::_outputs

Definition at line 268 of file df_bebop_bus_wrapper.cpp.

◆ _outputs_pub

orb_advert_t df_bebop_bus_wrapper::_outputs_pub = nullptr

Definition at line 263 of file df_bebop_bus_wrapper.cpp.

◆ _rc_pub

orb_advert_t df_bebop_bus_wrapper::_rc_pub = nullptr

Definition at line 264 of file df_bebop_bus_wrapper.cpp.

Referenced by RCUpdate::RCUpdate::Run().

◆ _task_handle

px4_task_t df_bebop_bus_wrapper::_task_handle = -1
static

Definition at line 254 of file df_bebop_bus_wrapper.cpp.

◆ _task_should_exit

volatile bool df_bebop_bus_wrapper::_task_should_exit = false

Definition at line 251 of file df_bebop_bus_wrapper.cpp.

Referenced by UavcanNode::run().

◆ g_dev

DfBebopBusWrapper* df_bebop_bus_wrapper::g_dev = nullptr

Definition at line 250 of file df_bebop_bus_wrapper.cpp.

Referenced by stop().

◆ MIXER_FILENAME

const char* df_bebop_bus_wrapper::MIXER_FILENAME = "/home/root/bebop.main.mix"
static

Definition at line 256 of file df_bebop_bus_wrapper.cpp.