diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-20 10:08:56 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-20 10:08:56 +0200 |
commit | 0be4508cb32c70090326a3f5e1cab0acdda6e945 (patch) | |
tree | 12baf0ae027203ffbdc69130fe1f47dd0ca3aa4d /src/systemcmds | |
parent | 7cff9b1e84e1c620d9af7fd8feae7ee77d8ef6a6 (diff) | |
parent | e943488e9f85b7e8982bf137dbbe7f8183da21bf (diff) | |
download | px4-firmware-0be4508cb32c70090326a3f5e1cab0acdda6e945.tar.gz px4-firmware-0be4508cb32c70090326a3f5e1cab0acdda6e945.tar.bz2 px4-firmware-0be4508cb32c70090326a3f5e1cab0acdda6e945.zip |
Merge branch 'master' into fmuv2_bringup_new_state_machine_drton
Diffstat (limited to 'src/systemcmds')
-rw-r--r-- | src/systemcmds/config/config.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/systemcmds/config/config.c b/src/systemcmds/config/config.c index 42814f2b2..5a02fd620 100644 --- a/src/systemcmds/config/config.c +++ b/src/systemcmds/config/config.c @@ -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"); } |