PX4 Firmware
PX4 Autopilot Software http://px4.io
DfBebopBusWrapper Class Reference
Inheritance diagram for DfBebopBusWrapper:
Collaboration diagram for DfBebopBusWrapper:

Public Member Functions

 DfBebopBusWrapper ()
 
 ~DfBebopBusWrapper ()=default
 
int start ()
 Start and initialize the driver. More...
 
int stop ()
 Stop the driver. More...
 
int print_info ()
 Print various infos (version, type, flights, errors. More...
 
int start_motors ()
 Start the motors. More...
 
int stop_motors ()
 Stop the motors. More...
 
int clear_errors ()
 Reset pending errors on the Bebop hardware. More...
 
int set_esc_speeds (const float speed_scaled[4])
 Set the ESC speeds [front left, front right, back right, back left]. More...
 
void set_last_throttle (float throttle)
 Capture the last throttle value for the battey computation. More...
 

Private Member Functions

int _publish (struct bebop_state_data &data)
 

Private Attributes

orb_advert_t _battery_topic
 
orb_advert_t _esc_topic
 
Battery _battery
 
bool _armed
 
float _last_throttle
 
int _battery_orb_class_instance
 
const uint8_t _esc_map [4] = {0, 2, 3, 1}
 

Detailed Description

Definition at line 70 of file df_bebop_bus_wrapper.cpp.

Constructor & Destructor Documentation

◆ DfBebopBusWrapper()

DfBebopBusWrapper::DfBebopBusWrapper ( )

Definition at line 116 of file df_bebop_bus_wrapper.cpp.

Referenced by df_bebop_bus_wrapper::start().

Here is the caller graph for this function:

◆ ~DfBebopBusWrapper()

DfBebopBusWrapper::~DfBebopBusWrapper ( )
default

Member Function Documentation

◆ _publish()

int DfBebopBusWrapper::_publish ( struct bebop_state_data &  data)
private

◆ clear_errors()

int DfBebopBusWrapper::clear_errors ( )

Reset pending errors on the Bebop hardware.

Definition at line 191 of file df_bebop_bus_wrapper.cpp.

Referenced by df_bebop_bus_wrapper::clear_errors().

Here is the caller graph for this function:

◆ print_info()

int DfBebopBusWrapper::print_info ( )

Print various infos (version, type, flights, errors.

Definition at line 158 of file df_bebop_bus_wrapper.cpp.

References df_bebop_bus_wrapper::info().

Referenced by df_bebop_bus_wrapper::info().

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

◆ set_esc_speeds()

int DfBebopBusWrapper::set_esc_speeds ( const float  speed_scaled[4])

Set the ESC speeds [front left, front right, back right, back left].

Definition at line 196 of file df_bebop_bus_wrapper.cpp.

Referenced by df_bebop_bus_wrapper::task_main().

Here is the caller graph for this function:

◆ set_last_throttle()

void DfBebopBusWrapper::set_last_throttle ( float  throttle)
inline

Capture the last throttle value for the battey computation.

Definition at line 98 of file df_bebop_bus_wrapper.cpp.

References orb_advert_t.

Referenced by df_bebop_bus_wrapper::task_main().

Here is the caller graph for this function:

◆ start()

int DfBebopBusWrapper::start ( )

Start and initialize the driver.

Definition at line 122 of file df_bebop_bus_wrapper.cpp.

References BOOT, ToneAlarmInterface::init(), and start().

Referenced by df_bebop_bus_wrapper::start().

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

◆ start_motors()

int DfBebopBusWrapper::start_motors ( )

Start the motors.

Definition at line 179 of file df_bebop_bus_wrapper.cpp.

References _armed.

Referenced by df_bebop_bus_wrapper::task_main().

Here is the caller graph for this function:

◆ stop()

int DfBebopBusWrapper::stop ( )

Stop the driver.

Definition at line 145 of file df_bebop_bus_wrapper.cpp.

References stop().

Referenced by df_bebop_bus_wrapper::stop().

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

◆ stop_motors()

int DfBebopBusWrapper::stop_motors ( )

Stop the motors.

Definition at line 185 of file df_bebop_bus_wrapper.cpp.

References _armed.

Referenced by df_bebop_bus_wrapper::task_main().

Here is the caller graph for this function:

Member Data Documentation

◆ _armed

bool DfBebopBusWrapper::_armed
private

Definition at line 105 of file df_bebop_bus_wrapper.cpp.

Referenced by _publish(), start_motors(), and stop_motors().

◆ _battery

Battery DfBebopBusWrapper::_battery
private

Definition at line 104 of file df_bebop_bus_wrapper.cpp.

Referenced by _publish().

◆ _battery_orb_class_instance

int DfBebopBusWrapper::_battery_orb_class_instance
private

Definition at line 108 of file df_bebop_bus_wrapper.cpp.

Referenced by _publish().

◆ _battery_topic

orb_advert_t DfBebopBusWrapper::_battery_topic
private

Definition at line 98 of file df_bebop_bus_wrapper.cpp.

Referenced by _publish().

◆ _esc_map

const uint8_t DfBebopBusWrapper::_esc_map[4] = {0, 2, 3, 1}
private

Definition at line 111 of file df_bebop_bus_wrapper.cpp.

Referenced by _publish().

◆ _esc_topic

orb_advert_t DfBebopBusWrapper::_esc_topic
private

Definition at line 102 of file df_bebop_bus_wrapper.cpp.

Referenced by _publish().

◆ _last_throttle

float DfBebopBusWrapper::_last_throttle
private

Definition at line 106 of file df_bebop_bus_wrapper.cpp.

Referenced by _publish().


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