From cdee68174dfef44f12fa66963d1bf9688a922a83 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 8 Nov 2016 13:54:24 +0900 Subject: [PATCH] AC_Avoidance: rename adjust_velocity_polygon_fence --- libraries/AC_Avoidance/AC_Avoid.cpp | 5 ++--- libraries/AC_Avoidance/AC_Avoid.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libraries/AC_Avoidance/AC_Avoid.cpp b/libraries/AC_Avoidance/AC_Avoid.cpp index c64468c2f6..2c86bfa7e5 100644 --- a/libraries/AC_Avoidance/AC_Avoid.cpp +++ b/libraries/AC_Avoidance/AC_Avoid.cpp @@ -34,8 +34,8 @@ void AC_Avoid::adjust_velocity(float kP, float accel_cmss, Vector2f &desired_vel float accel_cmss_limited = MIN(accel_cmss, AC_AVOID_ACCEL_CMSS_MAX); if ((_enabled & AC_AVOID_STOP_AT_FENCE) > 0) { - adjust_velocity_poly(kP, accel_cmss_limited, desired_vel); adjust_velocity_circle_fence(kP, accel_cmss_limited, desired_vel); + adjust_velocity_polygon_fence(kP, accel_cmss_limited, desired_vel); } if ((_enabled & AC_AVOID_USE_PROXIMITY_SENSOR) > 0) { @@ -96,8 +96,7 @@ void AC_Avoid::adjust_velocity_circle_fence(float kP, float accel_cmss, Vector2f /* * Adjusts the desired velocity for the polygon fence. */ - -void AC_Avoid::adjust_velocity_poly(const float kP, const float accel_cmss, Vector2f &desired_vel) +void AC_Avoid::adjust_velocity_polygon_fence(float kP, float accel_cmss, Vector2f &desired_vel) { // exit if the polygon fence is not enabled if ((_fence.get_enabled_fences() & AC_FENCE_TYPE_POLYGON) == 0) { diff --git a/libraries/AC_Avoidance/AC_Avoid.h b/libraries/AC_Avoidance/AC_Avoid.h index e8baca6429..1a47b0549d 100644 --- a/libraries/AC_Avoidance/AC_Avoid.h +++ b/libraries/AC_Avoidance/AC_Avoid.h @@ -47,7 +47,7 @@ private: /* * Adjusts the desired velocity for the polygon fence. */ - void adjust_velocity_poly(const float kP, const float accel_cmss, Vector2f &desired_vel); + void adjust_velocity_polygon_fence(float kP, float accel_cmss, Vector2f &desired_vel); /* * Adjusts the desired velocity based on output from the proximity sensor