From 50515e28e14ea8a9849f1902b81d77090a1fc5a4 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Sat, 20 Apr 2013 15:40:56 +0900 Subject: [PATCH] Copter: replace fabs with fabsf --- ArduCopter/Attitude.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/Attitude.pde b/ArduCopter/Attitude.pde index 77f37ea53f..05e3ea9300 100644 --- a/ArduCopter/Attitude.pde +++ b/ArduCopter/Attitude.pde @@ -1215,7 +1215,7 @@ get_throttle_surface_tracking(int16_t target_rate) target_sonar_alt += target_rate * 0.02f; distance_error = (target_sonar_alt-sonar_alt); - sonar_induced_slew_rate = constrain(fabs(THR_SURFACE_TRACKING_P * distance_error),0,THR_SURFACE_TRACKING_VELZ_MAX); + sonar_induced_slew_rate = constrain(fabsf(THR_SURFACE_TRACKING_P * distance_error),0,THR_SURFACE_TRACKING_VELZ_MAX); // do not let target altitude get too far from current altitude above ground // Note: the 750cm limit is perhaps too wide but is consistent with the regular althold limits and helps ensure a smooth transition