diff --git a/src/lib/l1/ECL_L1_Pos_Controller.cpp b/src/lib/l1/ECL_L1_Pos_Controller.cpp index fe3bf308a9..e46c7bac62 100644 --- a/src/lib/l1/ECL_L1_Pos_Controller.cpp +++ b/src/lib/l1/ECL_L1_Pos_Controller.cpp @@ -264,8 +264,8 @@ ECL_L1_Pos_Controller::navigate_loiter(const Vector2f &vector_A, const Vector2f /* calculate velocity on circle / along tangent */ float tangent_vel = xtrack_vel_center * loiter_direction; - /* prevent PD output from turning the wrong way */ - if (tangent_vel < 0.0f) { + /* prevent PD output from turning the wrong way when in circle mode */ + if (tangent_vel < 0.0f && _circle_mode) { lateral_accel_sp_circle_pd = math::max(lateral_accel_sp_circle_pd, 0.0f); }