#define THROTTLE_CURVE_ENABLED 1 // throttle curve disabled by default
#define THROTTLE_CURVE_MID_THRUST 52 // throttle which produces 1/2 the maximum thrust. expressed as a percentage of the full throttle range (i.e 0 ~ 100)
#define THROTTLE_CURVE_MAX_THRUST 93 // throttle which produces the maximum thrust. expressed as a percentage of the full throttle range (i.e 0 ~ 100)
// bit mask for recording which limits we have reached when outputting to motors
// set_min_throttle - sets the minimum throttle that will be sent to the engines when they're not off (i.e. to prevents issues with some motors spinning and some not at very low throttle)
// final output values sent to the motors. public (for now) so that they can be access for logging
int16_tmotor_out[AP_MOTORS_MAX_NUM_MOTORS];
// var_info for holding Parameter information
staticconststructAP_Param::GroupInfovar_info[];
protected:
// output functions that should be overloaded by child classes
virtualvoidoutput_armed(){
};
virtualvoidoutput_disarmed(){
};
RC_Channel*_rc_roll,*_rc_pitch,*_rc_throttle,*_rc_yaw;// input in from users
uint8_t_motor_to_channel_map[AP_MOTORS_MAX_NUM_MOTORS];// mapping of motor number (as received from upper APM code) to RC channel output - used to account for differences between APM1 and APM2
uint16_t_speed_hz;// speed in hz to send updates to motors
int16_t_min_throttle;// the minimum throttle to be sent to the engines when they're on (prevents issues with some motors on while other off at very low throttle)
int16_t_max_throttle;// the minimum throttle to be sent to the engines when they're on (prevents issues with some motors on while other off at very low throttle)
AP_CurveInt16_Size4_throttle_curve;// curve used to linearize the pwm->thrust
AP_Int8_throttle_curve_mid;// throttle which produces 1/2 the maximum thrust. expressed as a percentage (i.e. 0 ~ 100 ) of the full throttle range
AP_Int8_throttle_curve_max;// throttle which produces the maximum thrust. expressed as a percentage (i.e. 0 ~ 100 ) of the full throttle range
uint8_t_reached_limit;// bit mask to record which motor limits we hit (if any) during most recent output. Used to provide feedback to attitude controllers