Copter: check_ekf_yaw_reset uses ahrs method

This commit is contained in:
Randy Mackay 2015-09-24 15:52:19 +09:00
parent e47175862a
commit 317779f976

View File

@ -53,7 +53,7 @@ float Copter::get_pilot_desired_yaw_rate(int16_t stick_angle)
void Copter::check_ekf_yaw_reset()
{
float yaw_angle_change_rad = 0.0f;
uint32_t new_ekfYawReset_ms = ahrs.get_NavEKF().getLastYawResetAngle(yaw_angle_change_rad);
uint32_t new_ekfYawReset_ms = ahrs.getLastYawResetAngle(yaw_angle_change_rad);
if (new_ekfYawReset_ms != ekfYawReset_ms) {
attitude_control.shift_ef_yaw_target(ToDeg(yaw_angle_change_rad) * 100.0f);
ekfYawReset_ms = new_ekfYawReset_ms;