@ -362,13 +362,13 @@ void AC_AttitudeControl_Heli::rate_bf_to_motor_roll_pitch(const Vector3f &rate_r
@@ -362,13 +362,13 @@ void AC_AttitudeControl_Heli::rate_bf_to_motor_roll_pitch(const Vector3f &rate_r
if ( _flags_heli . leaky_i ) {
_pid_rate_roll . update_leaky_i ( AC_ATTITUDE_HELI_RATE_INTEGRATOR_LEAK_RATE ) ;
}
float roll_pid = _pid_rate_roll . update_all ( rate_roll_target_rads , rate_rads . x , _flags_heli . limit_ roll) + _actuator_sysid . x ;
float roll_pid = _pid_rate_roll . update_all ( rate_roll_target_rads , rate_rads . x , _motors . limit . roll ) + _actuator_sysid . x ;
if ( _flags_heli . leaky_i ) {
_pid_rate_pitch . update_leaky_i ( AC_ATTITUDE_HELI_RATE_INTEGRATOR_LEAK_RATE ) ;
}
float pitch_pid = _pid_rate_pitch . update_all ( rate_pitch_target_rads , rate_rads . y , _flags_heli . limit_ pitch) + _actuator_sysid . y ;
float pitch_pid = _pid_rate_pitch . update_all ( rate_pitch_target_rads , rate_rads . y , _motors . limit . pitch ) + _actuator_sysid . y ;
// use pid library to calculate ff
float roll_ff = _pid_rate_roll . get_ff ( ) ;
@ -424,7 +424,7 @@ float AC_AttitudeControl_Heli::rate_target_to_motor_yaw(float rate_yaw_actual_ra
@@ -424,7 +424,7 @@ float AC_AttitudeControl_Heli::rate_target_to_motor_yaw(float rate_yaw_actual_ra
_pid_rate_yaw . update_leaky_i ( AC_ATTITUDE_HELI_RATE_INTEGRATOR_LEAK_RATE ) ;
}
float pid = _pid_rate_yaw . update_all ( rate_target_rads , rate_yaw_actual_rads , _flags_heli . limit_ yaw) + _actuator_sysid . z ;
float pid = _pid_rate_yaw . update_all ( rate_target_rads , rate_yaw_actual_rads , _motors . limit . yaw ) + _actuator_sysid . z ;
// use pid library to calculate ff
float vff = _pid_rate_yaw . get_ff ( ) * _feedforward_scalar ;