l3gd20 selftest: don't check for 0 offset

If temperature compensation is enabled, the offset will be 0
This commit is contained in:
Beat Küng
2017-02-03 13:13:40 +01:00
committed by Lorenz Meier
parent 32ed939ea4
commit 0d000173b5
+4 -4
View File
@@ -1147,8 +1147,8 @@ L3GD20::test_error()
int
L3GD20::self_test()
{
/* evaluate gyro offsets, complain if offset -> zero or larger than 25 dps */
if (fabsf(_gyro_scale.x_offset) > L3GD20_MAX_OFFSET || fabsf(_gyro_scale.x_offset) < 0.000001f) {
/* evaluate gyro offsets, complain if offset larger than 25 dps */
if (fabsf(_gyro_scale.x_offset) > L3GD20_MAX_OFFSET) {
return 1;
}
@@ -1156,7 +1156,7 @@ L3GD20::self_test()
return 1;
}
if (fabsf(_gyro_scale.y_offset) > L3GD20_MAX_OFFSET || fabsf(_gyro_scale.y_offset) < 0.000001f) {
if (fabsf(_gyro_scale.y_offset) > L3GD20_MAX_OFFSET) {
return 1;
}
@@ -1164,7 +1164,7 @@ L3GD20::self_test()
return 1;
}
if (fabsf(_gyro_scale.z_offset) > L3GD20_MAX_OFFSET || fabsf(_gyro_scale.z_offset) < 0.000001f) {
if (fabsf(_gyro_scale.z_offset) > L3GD20_MAX_OFFSET) {
return 1;
}