FW POS: remove setting of curr_sp to LOITER if next wp invalid

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2020-12-11 16:02:40 +01:00 committed by Lorenz Meier
parent 55a1d090a1
commit 0b86c11c66
1 changed files with 0 additions and 3 deletions

View File

@ -734,9 +734,6 @@ FixedwingPositionControl::control_position(const hrt_abstime &now, const Vector2
&& (dist_xy < 2.f * math::max(acc_rad, fabsf(pos_sp_curr.loiter_radius)))) {
// SETPOINT_TYPE_POSITION -> SETPOINT_TYPE_LOITER
position_sp_type = position_setpoint_s::SETPOINT_TYPE_LOITER;
} else if ((dist_xy < 2.f * math::max(acc_rad, fabsf(pos_sp_curr.loiter_radius))) && !pos_sp_next.valid) {
position_sp_type = position_setpoint_s::SETPOINT_TYPE_LOITER;
}
} else if (pos_sp_curr.type == position_setpoint_s::SETPOINT_TYPE_LOITER) {