diff --git a/libraries/AC_Avoidance/AC_Avoid.cpp b/libraries/AC_Avoidance/AC_Avoid.cpp index 18cdb88b7a..6b28fc0415 100644 --- a/libraries/AC_Avoidance/AC_Avoid.cpp +++ b/libraries/AC_Avoidance/AC_Avoid.cpp @@ -399,7 +399,7 @@ void AC_Avoid::adjust_velocity_polygon_fence(float kP, float accel_cmss, Vector2 // get polygon boundary uint16_t num_points; - const Vector2f* boundary = _fence.get_boundary_points(num_points); + const Vector2f* boundary = _fence.polyfence().get_boundary_points(num_points); // adjust velocity using polygon adjust_velocity_polygon(kP, accel_cmss, desired_vel_cms, boundary, num_points, true, _fence.get_margin(), dt);