Browse Source

AC_Landing: use abs not fabsf for integers

master
Peter Barker 6 years ago committed by Peter Barker
parent
commit
4ec11f608d
  1. 2
      libraries/AP_Landing/AP_Landing_Deepstall.cpp

2
libraries/AP_Landing/AP_Landing_Deepstall.cpp

@ -187,7 +187,7 @@ bool AP_Landing_Deepstall::verify_land(const Location &prev_WP_loc, Location &ne @@ -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;
}

Loading…
Cancel
Save