mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 17:35:22 +08:00
MPU6000: Increase gyro offset tolerance to 7 dps
This commit is contained in:
committed by
Lorenz Meier
parent
9cc94fcb2d
commit
9c627255cc
@@ -921,18 +921,18 @@ MPU6000::gyro_self_test()
|
||||
if (self_test())
|
||||
return 1;
|
||||
|
||||
/* evaluate gyro offsets, complain if offset -> zero or larger than 6 dps */
|
||||
if (fabsf(_gyro_scale.x_offset) > 0.1f || fabsf(_gyro_scale.x_offset) < 0.000001f)
|
||||
/* evaluate gyro offsets, complain if offset -> zero or larger than 7 dps */
|
||||
if (fabsf(_gyro_scale.x_offset) > 0.12f || fabsf(_gyro_scale.x_offset) < 0.000001f)
|
||||
return 1;
|
||||
if (fabsf(_gyro_scale.x_scale - 1.0f) > 0.3f)
|
||||
return 1;
|
||||
|
||||
if (fabsf(_gyro_scale.y_offset) > 0.1f || fabsf(_gyro_scale.y_offset) < 0.000001f)
|
||||
if (fabsf(_gyro_scale.y_offset) > 0.12f || fabsf(_gyro_scale.y_offset) < 0.000001f)
|
||||
return 1;
|
||||
if (fabsf(_gyro_scale.y_scale - 1.0f) > 0.3f)
|
||||
return 1;
|
||||
|
||||
if (fabsf(_gyro_scale.z_offset) > 0.1f || fabsf(_gyro_scale.z_offset) < 0.000001f)
|
||||
if (fabsf(_gyro_scale.z_offset) > 0.12f || fabsf(_gyro_scale.z_offset) < 0.000001f)
|
||||
return 1;
|
||||
if (fabsf(_gyro_scale.z_scale - 1.0f) > 0.3f)
|
||||
return 1;
|
||||
@@ -941,6 +941,7 @@ MPU6000::gyro_self_test()
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
perform a self-test comparison to factory trim values. This takes
|
||||
about 200ms and will return OK if the current values are within 14%
|
||||
|
||||
Reference in New Issue
Block a user