APM:Libraries
|
#include <AP_MotorsHeli_RSC.h>
Public Member Functions | |
AP_MotorsHeli_RSC (SRV_Channel::Aux_servo_function_t aux_fn, uint8_t default_channel) | |
void | init_servo () |
void | set_control_mode (RotorControlMode mode) |
void | set_critical_speed (float critical_speed) |
float | get_critical_speed () const |
float | get_idle_output () |
void | set_idle_output (float idle_output) |
float | get_desired_speed () const |
void | set_desired_speed (float desired_speed) |
float | get_control_output () const |
float | get_rotor_speed () const |
bool | is_runup_complete () const |
void | set_ramp_time (int8_t ramp_time) |
void | set_runup_time (int8_t runup_time) |
void | set_throttle_curve (float thrcrv[5], uint16_t slewrate) |
void | set_collective (float collective) |
void | output (RotorControlState state) |
Private Member Functions | |
void | update_rotor_ramp (float rotor_ramp_input, float dt) |
void | update_rotor_runup (float dt) |
void | write_rsc (float servo_out) |
float | calculate_desired_throttle (float collective_in) |
Private Attributes | |
uint64_t | _last_update_us |
SRV_Channel::Aux_servo_function_t | _aux_fn |
uint8_t | _default_channel |
RotorControlMode | _control_mode = ROTOR_CONTROL_MODE_DISABLED |
float | _critical_speed = 0.0f |
float | _idle_output = 0.0f |
float | _desired_speed = 0.0f |
float | _control_output = 0.0f |
float | _rotor_ramp_output = 0.0f |
float | _rotor_runup_output = 0.0f |
int8_t | _ramp_time = 0 |
int8_t | _runup_time = 0 |
bool | _runup_complete = false |
float | _thrcrv_poly [4][4] |
uint16_t | _power_slewrate = 0 |
float | _collective_in |
Friends | |
class | AP_MotorsHeli_Single |
class | AP_MotorsHeli_Dual |
class | AP_MotorsHeli_Quad |
Definition at line 24 of file AP_MotorsHeli_RSC.h.
|
inline |
|
private |
Definition at line 195 of file AP_MotorsHeli_RSC.cpp.
Referenced by output().
|
inline |
Definition at line 59 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Single::move_actuators().
|
inline |
Definition at line 46 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Quad::rotor_speed_above_critical(), AP_MotorsHeli_Dual::rotor_speed_above_critical(), and AP_MotorsHeli_Single::rotor_speed_above_critical().
|
inline |
Definition at line 53 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Single::get_desired_rotor_speed(), and AP_MotorsHeli_Single::move_yaw().
|
inline |
Definition at line 49 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Single::move_actuators().
float AP_MotorsHeli_RSC::get_rotor_speed | ( | ) | const |
Definition at line 175 of file AP_MotorsHeli_RSC.cpp.
Referenced by get_control_output(), AP_MotorsHeli_Quad::get_desired_rotor_speed(), AP_MotorsHeli_Dual::get_desired_rotor_speed(), AP_MotorsHeli_Quad::get_main_rotor_speed(), AP_MotorsHeli_Dual::get_main_rotor_speed(), AP_MotorsHeli_Single::get_main_rotor_speed(), AP_MotorsHeli_Quad::rotor_speed_above_critical(), AP_MotorsHeli_Dual::rotor_speed_above_critical(), AP_MotorsHeli_Single::rotor_speed_above_critical(), and update_rotor_runup().
void AP_MotorsHeli_RSC::init_servo | ( | ) |
Definition at line 24 of file AP_MotorsHeli_RSC.cpp.
Referenced by AP_MotorsHeli_RSC(), AP_MotorsHeli_Quad::init_outputs(), AP_MotorsHeli_Dual::init_outputs(), and AP_MotorsHeli_Single::init_outputs().
|
inline |
Definition at line 65 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Quad::update_motor_control(), AP_MotorsHeli_Dual::update_motor_control(), and AP_MotorsHeli_Single::update_motor_control().
void AP_MotorsHeli_RSC::output | ( | RotorControlState | state | ) |
Definition at line 46 of file AP_MotorsHeli_RSC.cpp.
Referenced by set_collective(), AP_MotorsHeli_Quad::update_motor_control(), AP_MotorsHeli_Dual::update_motor_control(), and AP_MotorsHeli_Single::update_motor_control().
|
inline |
Definition at line 77 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Quad::move_actuators(), AP_MotorsHeli_Dual::move_actuators(), and AP_MotorsHeli_Single::move_actuators().
|
inline |
Definition at line 40 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Quad::calculate_scalars(), AP_MotorsHeli_Dual::calculate_scalars(), and AP_MotorsHeli_Single::calculate_scalars().
|
inline |
Definition at line 43 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_armed_scalars(), and AP_MotorsHeli_Single::calculate_scalars().
|
inline |
Definition at line 56 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Quad::set_desired_rotor_speed(), AP_MotorsHeli_Dual::set_desired_rotor_speed(), and AP_MotorsHeli_Single::set_desired_rotor_speed().
|
inline |
Definition at line 50 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_armed_scalars(), and AP_MotorsHeli_Single::calculate_scalars().
|
inline |
Definition at line 68 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_armed_scalars(), and AP_MotorsHeli_Single::calculate_scalars().
|
inline |
Definition at line 71 of file AP_MotorsHeli_RSC.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_armed_scalars(), and AP_MotorsHeli_Single::calculate_scalars().
void AP_MotorsHeli_RSC::set_throttle_curve | ( | float | thrcrv[5], |
uint16_t | slewrate | ||
) |
Definition at line 32 of file AP_MotorsHeli_RSC.cpp.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_armed_scalars(), and set_runup_time().
|
private |
Definition at line 106 of file AP_MotorsHeli_RSC.cpp.
Referenced by output().
|
private |
Definition at line 131 of file AP_MotorsHeli_RSC.cpp.
Referenced by output().
|
private |
Definition at line 183 of file AP_MotorsHeli_RSC.cpp.
Referenced by output().
|
friend |
Definition at line 27 of file AP_MotorsHeli_RSC.h.
|
friend |
Definition at line 28 of file AP_MotorsHeli_RSC.h.
|
friend |
Definition at line 26 of file AP_MotorsHeli_RSC.h.
|
private |
Definition at line 86 of file AP_MotorsHeli_RSC.h.
Referenced by init_servo(), and write_rsc().
|
private |
Definition at line 102 of file AP_MotorsHeli_RSC.h.
Referenced by output(), and set_collective().
|
private |
Definition at line 90 of file AP_MotorsHeli_RSC.h.
Referenced by output(), set_control_mode(), update_rotor_runup(), and write_rsc().
|
private |
Definition at line 94 of file AP_MotorsHeli_RSC.h.
Referenced by get_control_output(), and output().
|
private |
Definition at line 91 of file AP_MotorsHeli_RSC.h.
Referenced by get_critical_speed(), set_critical_speed(), and update_rotor_runup().
|
private |
Definition at line 87 of file AP_MotorsHeli_RSC.h.
Referenced by init_servo().
|
private |
Definition at line 93 of file AP_MotorsHeli_RSC.h.
Referenced by get_desired_speed(), output(), and set_desired_speed().
|
private |
Definition at line 92 of file AP_MotorsHeli_RSC.h.
Referenced by get_idle_output(), output(), and set_idle_output().
|
private |
Definition at line 83 of file AP_MotorsHeli_RSC.h.
Referenced by output().
|
private |
Definition at line 101 of file AP_MotorsHeli_RSC.h.
Referenced by output(), and set_throttle_curve().
|
private |
Definition at line 97 of file AP_MotorsHeli_RSC.h.
Referenced by set_ramp_time(), update_rotor_ramp(), and update_rotor_runup().
|
private |
Definition at line 95 of file AP_MotorsHeli_RSC.h.
Referenced by output(), update_rotor_ramp(), and update_rotor_runup().
|
private |
Definition at line 96 of file AP_MotorsHeli_RSC.h.
Referenced by get_rotor_speed(), update_rotor_ramp(), and update_rotor_runup().
|
private |
Definition at line 99 of file AP_MotorsHeli_RSC.h.
Referenced by is_runup_complete(), and update_rotor_runup().
|
private |
Definition at line 98 of file AP_MotorsHeli_RSC.h.
Referenced by set_runup_time(), and update_rotor_runup().
|
private |
Definition at line 100 of file AP_MotorsHeli_RSC.h.
Referenced by calculate_desired_throttle(), and set_throttle_curve().