AP_InertialSensor: use fabsf()

This commit is contained in:
Andrew Tridgell 2013-11-15 10:42:23 +11:00
parent aef9289476
commit 71bb462ad0
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ bool AP_InertialSensor_PX4::healthy(void)
// gyros have not updated
return false;
}
if (fabs(_accel.x) > 30 && fabs(_accel.y) > 30 && fabs(_accel.z) > 30 &&
if (fabsf(_accel.x) > 30 && fabsf(_accel.y) > 30 && fabsf(_accel.z) > 30 &&
(_previous_accel - _accel).length() < 0.01f) {
// unchanging accel, large in all 3 axes. This is a likely
// accelerometer failure of the LSM303d