Merge branch 'master' of github.com:PX4/Firmware

This commit is contained in:
Lorenz Meier
2013-08-25 22:14:03 +02:00
2 changed files with 15 additions and 1 deletions
+2
View File
@@ -689,6 +689,8 @@ MPU6000::accel_self_test()
return 1;
if (fabsf(_accel_scale.z_scale - 1.0f) > 0.4f || fabsf(_accel_scale.z_scale - 1.0f) < 0.000001f)
return 1;
return 0;
}
int
+13 -1
View File
@@ -135,7 +135,11 @@ do_gyro(int argc, char *argv[])
int ret = ioctl(fd, GYROIOCSELFTEST, 0);
if (ret) {
warnx("gyro self test FAILED! Check calibration.");
warnx("gyro self test FAILED! Check calibration:");
struct gyro_scale scale;
ret = ioctl(fd, GYROIOCGSCALE, (long unsigned int)&scale);
warnx("offsets: X: % 9.6f Y: % 9.6f Z: % 9.6f", scale.x_offset, scale.y_offset, scale.z_offset);
warnx("scale: X: % 9.6f Y: % 9.6f Z: % 9.6f", scale.x_scale, scale.y_scale, scale.z_scale);
} else {
warnx("gyro calibration and self test OK");
}
@@ -177,6 +181,10 @@ do_mag(int argc, char *argv[])
if (ret) {
warnx("mag self test FAILED! Check calibration.");
struct mag_scale scale;
ret = ioctl(fd, MAGIOCGSCALE, (long unsigned int)&scale);
warnx("offsets: X: % 9.6f Y: % 9.6f Z: % 9.6f", scale.x_offset, scale.y_offset, scale.z_offset);
warnx("scale: X: % 9.6f Y: % 9.6f Z: % 9.6f", scale.x_scale, scale.y_scale, scale.z_scale);
} else {
warnx("mag calibration and self test OK");
}
@@ -237,6 +245,10 @@ do_accel(int argc, char *argv[])
if (ret) {
warnx("accel self test FAILED! Check calibration.");
struct accel_scale scale;
ret = ioctl(fd, ACCELIOCGSCALE, (long unsigned int)&scale);
warnx("offsets: X: % 9.6f Y: % 9.6f Z: % 9.6f", scale.x_offset, scale.y_offset, scale.z_offset);
warnx("scale: X: % 9.6f Y: % 9.6f Z: % 9.6f", scale.x_scale, scale.y_scale, scale.z_scale);
} else {
warnx("accel calibration and self test OK");
}