From fc30ababf0d5327d04a8ecbd0f155344548cafb6 Mon Sep 17 00:00:00 2001 From: Cosimo Corrado Date: Sun, 23 Mar 2014 22:07:09 +0100 Subject: [PATCH] use fabsf instead abs --- flight/modules/Sensors/sensors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flight/modules/Sensors/sensors.c b/flight/modules/Sensors/sensors.c index 5c1f38aea..aad801cbc 100644 --- a/flight/modules/Sensors/sensors.c +++ b/flight/modules/Sensors/sensors.c @@ -454,11 +454,11 @@ static void settingsUpdatedCb(__attribute__((unused)) UAVObjEvent *objEv) mag_scale[2] = cal.mag_scale.Z; accel_temp_calibrated = (agcal.temp_calibrated_extent.max - agcal.temp_calibrated_extent.min > .1f) && - (abs(agcal.accel_temp_coeff.X) > 1e-9f || abs(agcal.accel_temp_coeff.Y) > 1e-9f || abs(agcal.accel_temp_coeff.Z) > 1e-9f); + (fabsf(agcal.accel_temp_coeff.X) > 1e-9f || fabsf(agcal.accel_temp_coeff.Y) > 1e-9f || fabsf(agcal.accel_temp_coeff.Z) > 1e-9f); gyro_temp_calibrated = (agcal.temp_calibrated_extent.max - agcal.temp_calibrated_extent.min > .1f) && - (abs(agcal.gyro_temp_coeff.X) > 1e-9f || abs(agcal.gyro_temp_coeff.Y) > 1e-9f || - abs(agcal.gyro_temp_coeff.Z) > 1e-9f || abs(agcal.gyro_temp_coeff.Z2) > 1e-9f); + (fabsf(agcal.gyro_temp_coeff.X) > 1e-9f || fabsf(agcal.gyro_temp_coeff.Y) > 1e-9f || + fabsf(agcal.gyro_temp_coeff.Z) > 1e-9f || fabsf(agcal.gyro_temp_coeff.Z2) > 1e-9f); AttitudeSettingsData attitudeSettings;