APM:Libraries
|
#include <AP_MotorsMatrix.h>
Public Member Functions | |
AP_MotorsMatrix (uint16_t loop_rate, uint16_t speed_hz=AP_MOTORS_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) |
void | set_update_rate (uint16_t speed_hz) |
void | output_test (uint8_t motor_seq, int16_t pwm) |
void | output_to_motors () |
uint16_t | get_motor_mask () |
Public Member Functions inherited from AP_MotorsMulticopter | |
AP_MotorsMulticopter (uint16_t loop_rate, uint16_t speed_hz=AP_MOTORS_SPEED_DEFAULT) | |
virtual void | output () |
void | output_min () |
void | set_yaw_headroom (int16_t pwm) |
void | set_throttle_range (int16_t radio_min, int16_t radio_max) |
void | update_throttle_hover (float dt) |
virtual float | get_throttle_hover () const |
void | set_throttle_passthrough_for_esc_calibration (float throttle_input) |
float | get_lift_max () |
float | get_batt_voltage_filt () const |
float | get_throttle_limit () const |
float | get_throttle_thrust_max () const |
bool | spool_up_complete () const |
virtual void | output_motor_mask (float thrust, uint8_t mask) |
int16_t | get_pwm_output_min () const |
int16_t | get_pwm_output_max () const |
FUNCTOR_TYPEDEF (thrust_compensation_fn_t, void, float *, uint8_t) | |
void | set_thrust_compensation_callback (thrust_compensation_fn_t callback) |
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) |
virtual void | init (motor_frame_class frame_class, motor_frame_type frame_type)=0 |
virtual void | set_frame_class_and_type (motor_frame_class frame_class, motor_frame_type frame_type)=0 |
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 |
Protected Member Functions | |
void | output_armed_stabilizing () |
void | add_motor_raw (int8_t motor_num, float roll_fac, float pitch_fac, float yaw_fac, uint8_t testing_order) |
void | add_motor (int8_t motor_num, float angle_degrees, float yaw_factor, uint8_t testing_order) |
void | add_motor (int8_t motor_num, float roll_factor_in_degrees, float pitch_factor_in_degrees, float yaw_factor, uint8_t testing_order) |
void | remove_motor (int8_t motor_num) |
virtual void | setup_motors (motor_frame_class frame_class, motor_frame_type frame_type) |
void | normalise_rpy_factors () |
void | thrust_compensation (void) override |
Protected Member Functions inherited from AP_MotorsMulticopter | |
void | output_logic () |
virtual void | update_throttle_filter () |
virtual float | get_current_limit_max_throttle () |
float | apply_thrust_curve_and_volt_scaling (float thrust) const |
void | update_lift_max_from_batt_voltage () |
float | get_compensation_gain () const |
int16_t | calc_thrust_to_pwm (float thrust_in) const |
int16_t | calc_spin_up_to_pwm () const |
virtual void | output_boost_throttle (void) |
void | save_params_on_disarm () |
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) |
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 14 of file AP_MotorsMatrix.h.
|
inline |
Constructor.
Definition at line 18 of file AP_MotorsMatrix.h.
|
protected |
Definition at line 327 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix(), and setup_motors().
|
protected |
|
protected |
Definition at line 303 of file AP_MotorsMatrix.cpp.
Referenced by add_motor(), AP_Motors6DOF::add_motor_raw_6dof(), AP_MotorsMatrix(), and setup_motors().
|
virtual |
Implements AP_Motors.
Definition at line 123 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix().
void AP_MotorsMatrix::init | ( | motor_frame_class | frame_class, |
motor_frame_type | frame_type | ||
) |
Definition at line 27 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix(), and setup().
|
protected |
Definition at line 661 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix(), and setup_motors().
|
protectedvirtual |
Implements AP_Motors.
Definition at line 136 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix().
|
virtual |
Implements AP_Motors.
Definition at line 286 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix(), and motor_order_test().
|
virtual |
Implements AP_MotorsMulticopter.
Definition at line 72 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix().
|
protected |
Definition at line 344 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix(), AP_Motors6DOF::setup_motors(), and setup_motors().
void AP_MotorsMatrix::set_frame_class_and_type | ( | motor_frame_class | frame_class, |
motor_frame_type | frame_type | ||
) |
Definition at line 56 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix().
|
virtual |
Reimplemented from AP_Motors.
Definition at line 41 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix(), init(), set_frame_class_and_type(), and setup().
|
protectedvirtual |
Definition at line 356 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix(), init(), and set_frame_class_and_type().
|
overrideprotectedvirtual |
Reimplemented from AP_MotorsMulticopter.
Definition at line 704 of file AP_MotorsMatrix.cpp.
Referenced by AP_MotorsMatrix().
|
protected |
Definition at line 74 of file AP_MotorsMatrix.h.
Referenced by init(), AP_Motors6DOF::output_armed_stabilizing(), and set_frame_class_and_type().
|
protected |
Definition at line 75 of file AP_MotorsMatrix.h.
Referenced by init(), and set_frame_class_and_type().
|
protected |
Definition at line 70 of file AP_MotorsMatrix.h.
Referenced by add_motor_raw(), normalise_rpy_factors(), output_armed_stabilizing(), AP_Motors6DOF::output_armed_stabilizing(), AP_Motors6DOF::output_armed_stabilizing_vectored(), AP_Motors6DOF::output_armed_stabilizing_vectored_6dof(), and remove_motor().
|
protected |
Definition at line 69 of file AP_MotorsMatrix.h.
Referenced by add_motor_raw(), normalise_rpy_factors(), output_armed_stabilizing(), AP_Motors6DOF::output_armed_stabilizing(), AP_Motors6DOF::output_armed_stabilizing_vectored(), AP_Motors6DOF::output_armed_stabilizing_vectored_6dof(), and remove_motor().
|
protected |
Definition at line 73 of file AP_MotorsMatrix.h.
Referenced by add_motor_raw(), and output_test().
|
protected |
Definition at line 72 of file AP_MotorsMatrix.h.
Referenced by output_armed_stabilizing(), AP_Motors6DOF::output_armed_stabilizing(), AP_Motors6DOF::output_armed_stabilizing_vectored(), AP_Motors6DOF::output_armed_stabilizing_vectored_6dof(), output_to_motors(), AP_Motors6DOF::output_to_motors(), and thrust_compensation().
|
protected |
Definition at line 71 of file AP_MotorsMatrix.h.
Referenced by add_motor_raw(), normalise_rpy_factors(), output_armed_stabilizing(), AP_Motors6DOF::output_armed_stabilizing(), AP_Motors6DOF::output_armed_stabilizing_vectored(), AP_Motors6DOF::output_armed_stabilizing_vectored_6dof(), and remove_motor().