PX4 Firmware
PX4 Autopilot Software http://px4.io
|
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} |
Definition at line 70 of file df_bebop_bus_wrapper.cpp.
DfBebopBusWrapper::DfBebopBusWrapper | ( | ) |
Definition at line 116 of file df_bebop_bus_wrapper.cpp.
Referenced by df_bebop_bus_wrapper::start().
|
default |
|
private |
Definition at line 201 of file df_bebop_bus_wrapper.cpp.
References _armed, _battery, _battery_orb_class_instance, _battery_topic, _esc_map, _esc_topic, _last_throttle, esc_status_s::esc, esc_status_s::esc_count, esc_report_s::esc_rpm, hrt_absolute_time(), hrt_abstime, orb_advertise(), orb_advertise_multi(), ORB_ID, ORB_PRIO_LOW, orb_publish(), esc_report_s::timestamp, esc_status_s::timestamp, and Battery::updateBatteryStatus().
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().
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().
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().
|
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().
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().
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().
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().
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().
|
private |
Definition at line 105 of file df_bebop_bus_wrapper.cpp.
Referenced by _publish(), start_motors(), and stop_motors().
|
private |
Definition at line 104 of file df_bebop_bus_wrapper.cpp.
Referenced by _publish().
|
private |
Definition at line 108 of file df_bebop_bus_wrapper.cpp.
Referenced by _publish().
|
private |
Definition at line 98 of file df_bebop_bus_wrapper.cpp.
Referenced by _publish().
|
private |
Definition at line 111 of file df_bebop_bus_wrapper.cpp.
Referenced by _publish().
|
private |
Definition at line 102 of file df_bebop_bus_wrapper.cpp.
Referenced by _publish().
|
private |
Definition at line 106 of file df_bebop_bus_wrapper.cpp.
Referenced by _publish().