AC_Avoidance: Refactor fence.get_safe_alt() to fence.get_safe_alt_max()
This commit is contained in:
parent
9c0ddf2808
commit
5829d4b645
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user