Copter: fix position ctrl init for guided takeof

This commit is contained in:
Bill Geyer 2022-05-13 20:38:49 -04:00 committed by Peter Barker
parent d03aad5254
commit a4e53a9e2d
3 changed files with 3 additions and 4 deletions

View File

@ -541,6 +541,8 @@ void Mode::make_safe_ground_handling(bool force_throttle_unlimited)
break;
}
pos_control->relax_velocity_controller_xy();
pos_control->update_xy_controller();
pos_control->relax_z_controller(0.0f); // forces throttle output to decay to zero
pos_control->update_z_controller();
// we may need to move this out

View File

@ -896,7 +896,6 @@ void ModeAuto::wp_run()
// if not armed set throttle to zero and exit immediately
if (is_disarmed_or_landed()) {
make_safe_ground_handling();
wp_nav->wp_and_spline_init();
return;
}
@ -993,7 +992,6 @@ void ModeAuto::loiter_run()
// if not armed set throttle to zero and exit immediately
if (is_disarmed_or_landed()) {
make_safe_ground_handling();
wp_nav->wp_and_spline_init();
return;
}
@ -1019,7 +1017,7 @@ void ModeAuto::loiter_to_alt_run()
{
// if not auto armed or motor interlock not enabled set throttle to zero and exit immediately
if (is_disarmed_or_landed() || !motors->get_interlock()) {
zero_throttle_and_relax_ac();
make_safe_ground_handling();
return;
}

View File

@ -37,7 +37,6 @@ void ModeBrake::run()
// if not armed set throttle to zero and exit immediately
if (is_disarmed_or_landed()) {
make_safe_ground_handling();
pos_control->relax_velocity_controller_xy();
pos_control->relax_z_controller(0.0f);
return;
}