AC_Landing: use abs not fabsf for integers

This commit is contained in:
Peter Barker 2019-02-18 13:06:42 +11:00 committed by Peter Barker
parent 923af1e301
commit 4ec11f608d

View File

@ -187,7 +187,7 @@ bool AP_Landing_Deepstall::verify_land(const Location &prev_WP_loc, Location &ne
{
switch (stage) {
case DEEPSTALL_STAGE_FLY_TO_LANDING:
if (get_distance(current_loc, landing_point) > fabsf(2 * landing.aparm.loiter_radius)) {
if (get_distance(current_loc, landing_point) > abs(2 * landing.aparm.loiter_radius)) {
landing.nav_controller->update_waypoint(current_loc, landing_point);
return false;
}