Skip to content
Snippets Groups Projects
Commit c07ded9a authored by Jonathan Challinger's avatar Jonathan Challinger Committed by Randy Mackay
Browse files

Copter: Don't use land detector to stop stabilizing in stabilize

parent 5230684b
No related branches found
No related tags found
No related merge requests found
...@@ -44,16 +44,10 @@ static void stabilize_run() ...@@ -44,16 +44,10 @@ static void stabilize_run()
// get pilot's desired throttle // get pilot's desired throttle
pilot_throttle_scaled = get_pilot_desired_throttle(g.rc_3.control_in); pilot_throttle_scaled = get_pilot_desired_throttle(g.rc_3.control_in);
// reset target lean angles and heading while landed // call attitude controller
if (ap.land_complete) { attitude_control.angle_ef_roll_pitch_rate_ef_yaw_smooth(target_roll, target_pitch, target_yaw_rate, get_smoothing_gain());
attitude_control.relax_bf_rate_controller();
attitude_control.set_yaw_target_to_current_heading();
}else{
// call attitude controller
attitude_control.angle_ef_roll_pitch_rate_ef_yaw_smooth(target_roll, target_pitch, target_yaw_rate, get_smoothing_gain());
// body-frame rate controller is run directly from 100hz loop // body-frame rate controller is run directly from 100hz loop
}
// output pilot's throttle // output pilot's throttle
attitude_control.set_throttle_out(pilot_throttle_scaled, true); attitude_control.set_throttle_out(pilot_throttle_scaled, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment