aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Jansen <jnsn.johan@gmail.com>2015-01-26 14:22:36 +0100
committerLorenz Meier <lm@inf.ethz.ch>2015-01-26 19:59:16 +0100
commit9c627255ccc980270fe56b6c4ddeb494e1ce0f50 (patch)
tree446ac390d71a079c6a51e7514b116dd528ad6b9d
parent9cc94fcb2dde1a591c20e008ca59d1f876c2070a (diff)
downloadpx4-firmware-9c627255ccc980270fe56b6c4ddeb494e1ce0f50.tar.gz
px4-firmware-9c627255ccc980270fe56b6c4ddeb494e1ce0f50.tar.bz2
px4-firmware-9c627255ccc980270fe56b6c4ddeb494e1ce0f50.zip
MPU6000: Increase gyro offset tolerance to 7 dps
-rw-r--r--src/drivers/mpu6000/mpu6000.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/drivers/mpu6000/mpu6000.cpp b/src/drivers/mpu6000/mpu6000.cpp
index 168b34ea9..81d156af1 100644
--- a/src/drivers/mpu6000/mpu6000.cpp
+++ b/src/drivers/mpu6000/mpu6000.cpp
@@ -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%