mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
l3gd20 selftest: don't check for 0 offset
If temperature compensation is enabled, the offset will be 0
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user