diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-26 15:01:08 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-26 15:01:08 +0200 |
commit | 56e66a80cdd5f0f09716ee503cdc2810e3e74a69 (patch) | |
tree | 367551932b428de386d0d416da0a9df0d61b8f53 /apps | |
parent | dfa5cc52d594067b7c59cc878e4a6c9a64d84f5d (diff) | |
download | px4-firmware-56e66a80cdd5f0f09716ee503cdc2810e3e74a69.tar.gz px4-firmware-56e66a80cdd5f0f09716ee503cdc2810e3e74a69.tar.bz2 px4-firmware-56e66a80cdd5f0f09716ee503cdc2810e3e74a69.zip |
Printing fixes
Diffstat (limited to 'apps')
-rw-r--r-- | apps/drivers/mpu6000/mpu6000.cpp | 16 | ||||
-rw-r--r-- | apps/drivers/ms5611/ms5611.cpp | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/apps/drivers/mpu6000/mpu6000.cpp b/apps/drivers/mpu6000/mpu6000.cpp index cf44a0b29..5a801a9b7 100644 --- a/apps/drivers/mpu6000/mpu6000.cpp +++ b/apps/drivers/mpu6000/mpu6000.cpp @@ -963,13 +963,13 @@ test() warnx("single read"); warnx("time: %lld", a_report.timestamp); - warnx("acc x: \t% 5.2f\tm/s^2", (double)a_report.x); - warnx("acc y: \t% 5.2f\tm/s^2", (double)a_report.y); - warnx("acc z: \t% 5.2f\tm/s^2", (double)a_report.z); + warnx("acc x: \t% 8.4f\tm/s^2", (double)a_report.x); + warnx("acc y: \t% 8.4f\tm/s^2", (double)a_report.y); + warnx("acc z: \t% 8.4f\tm/s^2", (double)a_report.z); warnx("acc x: \t%d\traw", a_report.x_raw); warnx("acc y: \t%d\traw", a_report.y_raw); warnx("acc z: \t%d\traw", a_report.z_raw); - warnx("acc range: %6.2f m/s^2 (%6.2f g)", (double)a_report.range_m_s2, + warnx("acc range: %8.4f m/s^2 (%8.4f g)", (double)a_report.range_m_s2, (double)(a_report.range_m_s2 / 9.81f)); /* do a simple demand read */ @@ -977,13 +977,13 @@ test() if (sz != sizeof(g_report)) err(1, "immediate gyro read failed"); - warnx("gyro x: \t% 5.2f\trad/s", (double)g_report.x); - warnx("gyro y: \t% 5.2f\trad/s", (double)g_report.y); - warnx("gyro z: \t% 5.2f\trad/s", (double)g_report.z); + warnx("gyro x: \t% 8.4f\trad/s", (double)g_report.x); + warnx("gyro y: \t% 8.4f\trad/s", (double)g_report.y); + warnx("gyro z: \t% 8.4f\trad/s", (double)g_report.z); warnx("gyro x: \t%d\traw", g_report.x_raw); warnx("gyro y: \t%d\traw", g_report.y_raw); warnx("gyro z: \t%d\traw", g_report.z_raw); - warnx("gyro range: %6.3f rad/s (%8.2f deg/s)", (double)g_report.range_rad_s, + warnx("gyro range: %8.4f rad/s (%8.2f deg/s)", (double)g_report.range_rad_s, (double)((g_report.range_rad_s / M_PI_F) * 180.0f)); /* XXX add poll-rate tests here too */ diff --git a/apps/drivers/ms5611/ms5611.cpp b/apps/drivers/ms5611/ms5611.cpp index ba57829eb..1341fc3c8 100644 --- a/apps/drivers/ms5611/ms5611.cpp +++ b/apps/drivers/ms5611/ms5611.cpp @@ -834,9 +834,9 @@ test() err(1, "immediate read failed"); warnx("single read"); - warnx("pressure: %10.4f", report.pressure); - warnx("altitude: %11.4f", report.altitude); - warnx("temperature: %8.4f", report.temperature); + warnx("pressure: %10.4f", (double)report.pressure); + warnx("altitude: %11.4f", (double)report.altitude); + warnx("temperature: %8.4f", (double)report.temperature); warnx("time: %lld", report.timestamp); /* set the queue depth to 10 */ @@ -866,9 +866,9 @@ test() err(1, "periodic read failed"); warnx("periodic read %u", i); - warnx("pressure: %u", (unsigned)report.pressure); - warnx("altitude: %u", (unsigned)report.altitude); - warnx("temperature: %u", (unsigned)report.temperature); + warnx("pressure: %10.4f", (double)report.pressure); + warnx("altitude: %11.4f", (double)report.altitude); + warnx("temperature: %8.4f", (double)report.temperature); warnx("time: %lld", report.timestamp); } |