AC_Avoidance: Refactor fence.get_safe_alt() to fence.get_safe_alt_max()

This commit is contained in:
Jacob Walser 2017-02-06 15:03:44 -05:00 committed by Andrew Tridgell
parent 9c0ddf2808
commit 5829d4b645
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ void AC_Avoid::adjust_velocity_z(float kP, float accel_cmss, float& climb_rate_c
if ((_enabled & AC_AVOID_STOP_AT_FENCE) > 0) {
// calculate distance from vehicle to safe altitude
float veh_alt = get_alt_above_home();
alt_diff_cm = _fence.get_safe_alt() * 100.0f - veh_alt;
alt_diff_cm = _fence.get_safe_alt_max() * 100.0f - veh_alt;
limit_alt = true;
}