Copter: Fix Loiter attitude error during Pre-Takeoff

This commit is contained in:
Leonard Hall 2021-05-24 23:36:49 +09:30 committed by Randy Mackay
parent e275ec9e63
commit dd0b303ec2
2 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ void ModeLoiter::run()
case AltHold_Landed_Pre_Takeoff:
attitude_control->reset_rate_controller_I_terms_smoothly();
loiter_nav->init_target();
attitude_control->input_euler_angle_roll_pitch_euler_rate_yaw(0.0f, 0.0f, 0.0f);
attitude_control->input_thrust_vector_rate_heading(loiter_nav->get_thrust_vector(), target_yaw_rate);
pos_control->relax_z_controller(0.0f); // forces throttle output to decay to zero
break;

View File

@ -358,7 +358,7 @@ void ModeZigZag::manual_control()
case AltHold_Landed_Pre_Takeoff:
attitude_control->reset_rate_controller_I_terms_smoothly();
loiter_nav->init_target();
attitude_control->input_euler_angle_roll_pitch_euler_rate_yaw(0.0f, 0.0f, 0.0f);
attitude_control->input_thrust_vector_rate_heading(loiter_nav->get_thrust_vector(), target_yaw_rate);
pos_control->relax_z_controller(0.0f); // forces throttle output to decay to zero
break;