|
|
|
@ -921,18 +921,18 @@ MPU6000::gyro_self_test()
@@ -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()
@@ -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% |
|
|
|
|