From 923af1e3014efd382af394a72695ee83bf0cf719 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 18 Feb 2019 13:06:30 +1100 Subject: [PATCH] AC_AutoTune: use abs not fabsf for integers --- libraries/AC_AutoTune/AC_AutoTune.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AC_AutoTune/AC_AutoTune.cpp b/libraries/AC_AutoTune/AC_AutoTune.cpp index 647279a91b..b2c4695eef 100644 --- a/libraries/AC_AutoTune/AC_AutoTune.cpp +++ b/libraries/AC_AutoTune/AC_AutoTune.cpp @@ -438,13 +438,13 @@ bool AC_AutoTune::currently_level() } if (!check_level(LEVEL_ISSUE_ANGLE_ROLL, - fabsf(ahrs_view->roll_sensor - roll_cd), + abs(ahrs_view->roll_sensor - roll_cd), threshold_mul*AUTOTUNE_LEVEL_ANGLE_CD)) { return false; } if (!check_level(LEVEL_ISSUE_ANGLE_PITCH, - fabsf(ahrs_view->pitch_sensor - pitch_cd), + abs(ahrs_view->pitch_sensor - pitch_cd), threshold_mul*AUTOTUNE_LEVEL_ANGLE_CD)) { return false; }