From dec96b0a3a516ed8a76ebaf0fc2db5227a1669bf Mon Sep 17 00:00:00 2001 From: bresch Date: Wed, 3 Apr 2019 17:41:05 +0200 Subject: [PATCH] revert FlightTasks: fix mission DO_CHANGE_SPEED --- .../tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/FlightTasks/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp b/src/lib/FlightTasks/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp index f46dd955b0..c7ab200be9 100644 --- a/src/lib/FlightTasks/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp +++ b/src/lib/FlightTasks/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp @@ -167,7 +167,7 @@ void FlightTaskAutoLineSmoothVel::_prepareSetpoints() Vector2f u_pos_traj_to_dest_xy(Vector2f(pos_traj_to_dest).unit_or_zero()); float speed_sp_track = Vector2f(pos_traj_to_dest).length() * _param_mpc_xy_traj_p.get(); - speed_sp_track = math::constrain(speed_sp_track, 0.0f, _mc_cruise_speed); + speed_sp_track = math::constrain(speed_sp_track, 0.0f, _param_mpc_xy_cruise.get()); Vector2f vel_sp_xy = u_pos_traj_to_dest_xy * speed_sp_track;