APM:Libraries
|
#include <AP_MotorsHeli.h>
Classes | |
struct | heliflags_type |
Public Member Functions | |
AP_MotorsHeli (uint16_t loop_rate, uint16_t speed_hz=AP_MOTORS_HELI_SPEED_DEFAULT) | |
Constructor. More... | |
void | init (motor_frame_class frame_class, motor_frame_type frame_type) |
void | set_frame_class_and_type (motor_frame_class frame_class, motor_frame_type frame_type) |
virtual void | set_update_rate (uint16_t speed_hz)=0 |
void | output_min () |
virtual void | output_test (uint8_t motor_seq, int16_t pwm)=0 |
virtual bool | parameter_check (bool display_msg) const |
virtual bool | has_flybar () const |
void | set_collective_for_landing (bool landing) |
void | set_inverted_flight (bool inverted) |
uint8_t | get_rsc_mode () const |
float | get_rsc_setpoint () const |
virtual void | set_desired_rotor_speed (float desired_speed)=0 |
virtual float | get_desired_rotor_speed () const =0 |
virtual float | get_main_rotor_speed () const =0 |
bool | rotor_runup_complete () const |
virtual bool | rotor_speed_above_critical () const =0 |
virtual uint16_t | get_motor_mask ()=0 |
virtual void | set_acro_tail (bool set) |
virtual void | ext_gyro_gain (float gain) |
void | output () |
virtual bool | supports_yaw_passthrough () const |
float | get_throttle_hover () const |
Public Member Functions inherited from AP_Motors | |
AP_Motors (uint16_t loop_rate, uint16_t speed_hz=AP_MOTORS_SPEED_DEFAULT) | |
bool | initialised_ok () const |
bool | armed () const |
void | armed (bool arm) |
void | set_interlock (bool set) |
bool | get_interlock () const |
void | set_roll (float roll_in) |
void | set_pitch (float pitch_in) |
void | set_yaw (float yaw_in) |
void | set_throttle (float throttle_in) |
void | set_throttle_avg_max (float throttle_avg_max) |
void | set_throttle_filter_cutoff (float filt_hz) |
void | set_forward (float forward_in) |
void | set_lateral (float lateral_in) |
float | get_roll () const |
float | get_pitch () const |
float | get_yaw () const |
float | get_throttle () const |
float | get_throttle_bidirectional () const |
float | get_forward () const |
float | get_lateral () const |
virtual void | set_desired_spool_state (enum spool_up_down_desired spool) |
enum spool_up_down_desired | get_desired_spool_state (void) const |
void | set_air_density_ratio (float ratio) |
void | set_radio_passthrough (float roll_input, float pitch_input, float throttle_input, float yaw_input) |
void | set_loop_rate (uint16_t loop_rate) |
pwm_type | get_pwm_type (void) const |
Static Public Attributes | |
static const struct AP_Param::GroupInfo | var_info [] |
Protected Member Functions | |
void | output_armed_stabilizing () |
void | output_armed_zero_throttle () |
void | output_disarmed () |
virtual void | update_motor_control (RotorControlState state)=0 |
void | reset_flight_controls () |
void | update_throttle_filter () |
virtual void | move_actuators (float roll_out, float pitch_out, float coll_in, float yaw_out)=0 |
void | reset_swash_servo (SRV_Channel *servo) |
virtual bool | init_outputs ()=0 |
virtual void | calculate_armed_scalars ()=0 |
virtual void | calculate_scalars ()=0 |
virtual void | calculate_roll_pitch_collective_factors ()=0 |
virtual void | servo_test ()=0 |
int16_t | calc_pwm_output_1to1_swash_servo (float input, const SRV_Channel *servo) |
Protected Member Functions inherited from AP_Motors | |
virtual void | rc_write (uint8_t chan, uint16_t pwm) |
virtual void | rc_write_angle (uint8_t chan, int16_t angle_cd) |
virtual void | rc_set_freq (uint32_t mask, uint16_t freq_hz) |
virtual uint32_t | rc_map_mask (uint32_t mask) const |
void | add_motor_num (int8_t motor_num) |
virtual void | save_params_on_disarm () |
int16_t | calc_pwm_output_1to1 (float input, const SRV_Channel *servo) |
int16_t | calc_pwm_output_0to1 (float input, const SRV_Channel *servo) |
Definition at line 50 of file AP_MotorsHeli.h.
|
protected |
Definition at line 142 of file AP_MotorsHeli.h.
|
inline |
Constructor.
Definition at line 54 of file AP_MotorsHeli.h.
|
protected |
Definition at line 432 of file AP_MotorsHeli.cpp.
Referenced by AP_MotorsHeli_Dual::move_actuators(), and AP_MotorsHeli_Single::move_actuators().
|
protectedpure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by output().
|
protectedpure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
|
protectedpure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by init(), output_disarmed(), and reset_flight_controls().
|
inlinevirtual |
Reimplemented in AP_MotorsHeli_Single.
Definition at line 126 of file AP_MotorsHeli.h.
|
pure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by get_rsc_setpoint().
|
pure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by get_rsc_setpoint().
|
pure virtual |
Implements AP_Motors.
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by rotor_runup_complete().
|
inline |
Definition at line 99 of file AP_MotorsHeli.h.
|
inline |
|
inlinevirtual |
Implements AP_Motors.
Definition at line 134 of file AP_MotorsHeli.h.
|
inlinevirtual |
Reimplemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Definition at line 90 of file AP_MotorsHeli.h.
|
virtual |
Implements AP_Motors.
Definition at line 204 of file AP_MotorsHeli.cpp.
Referenced by AP_MotorsHeli().
|
protectedpure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by init(), output_disarmed(), and reset_flight_controls().
|
protectedpure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by output_armed_stabilizing(), output_armed_zero_throttle(), output_disarmed(), and output_min().
|
virtual |
Implements AP_Motors.
Definition at line 256 of file AP_MotorsHeli.cpp.
Referenced by ext_gyro_gain().
|
protectedvirtual |
Implements AP_Motors.
Definition at line 274 of file AP_MotorsHeli.cpp.
Referenced by output().
|
protected |
Definition at line 287 of file AP_MotorsHeli.cpp.
Referenced by output().
|
protected |
Definition at line 300 of file AP_MotorsHeli.cpp.
Referenced by output().
|
virtual |
Implements AP_Motors.
Definition at line 241 of file AP_MotorsHeli.cpp.
Referenced by AP_MotorsHeli().
|
pure virtual |
Implements AP_Motors.
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by AP_MotorsHeli().
|
virtual |
Reimplemented in AP_MotorsHeli_Single.
Definition at line 359 of file AP_MotorsHeli.cpp.
Referenced by AP_MotorsHeli(), and AP_MotorsHeli_Single::parameter_check().
|
protected |
Definition at line 422 of file AP_MotorsHeli.cpp.
Referenced by output_armed_stabilizing(), and output_armed_zero_throttle().
|
protected |
Definition at line 398 of file AP_MotorsHeli.cpp.
Referenced by AP_MotorsHeli_Dual::init_outputs(), and AP_MotorsHeli_Single::init_outputs().
|
inline |
|
pure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by rotor_runup_complete().
|
protectedpure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by output_disarmed().
|
inlinevirtual |
Reimplemented in AP_MotorsHeli_Single.
Definition at line 123 of file AP_MotorsHeli.h.
|
inline |
Definition at line 93 of file AP_MotorsHeli.h.
|
pure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by get_rsc_setpoint().
|
virtual |
Implements AP_Motors.
Definition at line 235 of file AP_MotorsHeli.cpp.
Referenced by AP_MotorsHeli().
|
inline |
Definition at line 96 of file AP_MotorsHeli.h.
|
pure virtual |
Reimplemented from AP_Motors.
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by AP_MotorsHeli(), and init().
|
inlinevirtual |
Reimplemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Definition at line 132 of file AP_MotorsHeli.h.
|
protectedpure virtual |
Implemented in AP_MotorsHeli_Single, AP_MotorsHeli_Dual, and AP_MotorsHeli_Quad.
Referenced by output_armed_stabilizing(), output_armed_zero_throttle(), output_disarmed(), and output_min().
|
protectedvirtual |
Implements AP_Motors.
Definition at line 408 of file AP_MotorsHeli.cpp.
Referenced by output().
|
protected |
Definition at line 201 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_scalars(), AP_MotorsHeli_Dual::calculate_scalars(), AP_MotorsHeli_Single::calculate_scalars(), AP_MotorsHeli_Quad::move_actuators(), AP_MotorsHeli_Dual::move_actuators(), and AP_MotorsHeli_Single::move_actuators().
|
protected |
Definition at line 202 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_scalars(), AP_MotorsHeli_Dual::calculate_scalars(), and AP_MotorsHeli_Single::calculate_scalars().
|
protected |
Definition at line 216 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_scalars(), AP_MotorsHeli_Dual::calculate_scalars(), AP_MotorsHeli_Single::calculate_scalars(), AP_MotorsHeli_Single::move_actuators(), and output_disarmed().
|
protected |
Definition at line 200 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_scalars(), AP_MotorsHeli_Dual::calculate_scalars(), AP_MotorsHeli_Single::calculate_scalars(), AP_MotorsHeli_Quad::move_actuators(), AP_MotorsHeli_Dual::move_actuators(), and AP_MotorsHeli_Single::move_actuators().
|
protected |
Definition at line 199 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Dual::move_actuators(), and AP_MotorsHeli_Single::move_actuators().
|
protected |
Definition at line 219 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_roll_pitch_collective_factors(), and init().
|
protected |
Referenced by AP_MotorsHeli(), AP_MotorsHeli_Quad::move_actuators(), AP_MotorsHeli_Dual::move_actuators(), AP_MotorsHeli_Single::move_actuators(), rotor_runup_complete(), set_collective_for_landing(), set_inverted_flight(), AP_MotorsHeli_Quad::update_motor_control(), AP_MotorsHeli_Dual::update_motor_control(), and AP_MotorsHeli_Single::update_motor_control().
|
protected |
Definition at line 208 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::move_actuators(), AP_MotorsHeli_Dual::move_actuators(), and AP_MotorsHeli_Single::move_actuators().
|
protected |
Definition at line 209 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_scalars(), and parameter_check().
|
protected |
Definition at line 210 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_scalars(), and parameter_check().
|
protected |
Definition at line 205 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_scalars(), AP_MotorsHeli_Dual::calculate_scalars(), AP_MotorsHeli_Single::calculate_scalars(), get_rsc_mode(), and parameter_check().
|
protected |
Definition at line 206 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_scalars(), and parameter_check().
|
protected |
Definition at line 207 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_armed_scalars(), AP_MotorsHeli_Single::calculate_scalars(), and parameter_check().
|
protected |
Definition at line 204 of file AP_MotorsHeli.h.
Referenced by get_rsc_setpoint(), and parameter_check().
|
protected |
Definition at line 212 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), and AP_MotorsHeli_Single::calculate_armed_scalars().
|
protected |
Definition at line 211 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli_Quad::calculate_armed_scalars(), AP_MotorsHeli_Dual::calculate_armed_scalars(), and AP_MotorsHeli_Single::calculate_armed_scalars().
|
protected |
Definition at line 203 of file AP_MotorsHeli.h.
Referenced by init(), AP_MotorsHeli_Dual::move_actuators(), AP_MotorsHeli_Single::move_actuators(), output_armed_stabilizing(), output_armed_zero_throttle(), output_disarmed(), and reset_flight_controls().
|
protected |
Definition at line 213 of file AP_MotorsHeli.h.
Referenced by init().
|
protected |
Definition at line 217 of file AP_MotorsHeli.h.
Referenced by init(), output_disarmed(), AP_MotorsHeli_Dual::servo_test(), and AP_MotorsHeli_Single::servo_test().
|
static |
Definition at line 137 of file AP_MotorsHeli.h.
Referenced by AP_MotorsHeli().