diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-16 11:21:59 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-16 11:21:59 +0200 |
commit | 1530aeccae706fe8024b4de2293060539c01ceaa (patch) | |
tree | 21cd439f2c31722d8dc2f6f47df2b4decc34926d /apps/drivers/mpu6000/mpu6000.cpp | |
parent | 5198a9daf798089b4f6f2112029260f614cf7702 (diff) | |
download | px4-firmware-1530aeccae706fe8024b4de2293060539c01ceaa.tar.gz px4-firmware-1530aeccae706fe8024b4de2293060539c01ceaa.tar.bz2 px4-firmware-1530aeccae706fe8024b4de2293060539c01ceaa.zip |
Working towards full sensor flexibility
Diffstat (limited to 'apps/drivers/mpu6000/mpu6000.cpp')
-rw-r--r-- | apps/drivers/mpu6000/mpu6000.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/drivers/mpu6000/mpu6000.cpp b/apps/drivers/mpu6000/mpu6000.cpp index 7576fc1d9..1123ddf3a 100644 --- a/apps/drivers/mpu6000/mpu6000.cpp +++ b/apps/drivers/mpu6000/mpu6000.cpp @@ -288,9 +288,9 @@ MPU6000::MPU6000(int bus, spi_dev_e device) : _gyro(new MPU6000_gyro(this)), _product(0), _call_interval(0), - _accel_range_scale(1.0f), + _accel_range_scale(0.02f), _accel_topic(-1), - _gyro_range_scale(1.0f), + _gyro_range_scale(0.02f), _gyro_topic(-1), _reads(0), _sample_perf(perf_alloc(PC_ELAPSED, "mpu6000_read")) @@ -826,7 +826,7 @@ test() fd = open(ACCEL_DEVICE_PATH, O_RDONLY); if (fd < 0) { - reason = "can't open driver"; + reason = "can't open driver, use <mpu6000 start> first"; break; } @@ -841,9 +841,10 @@ test() printf("single read\n"); fflush(stdout); printf("time: %lld\n", report.timestamp); - printf("x: %f\n", report.x); - printf("y: %f\n", report.y); - printf("z: %f\n", report.z); + printf("x: %5.2f\n", (double)report.x); + printf("y: %5.2f\n", (double)report.y); + printf("z: %5.2f\n", (double)report.z); + printf("test: %8.4f\n", 1.5); } while (0); |