diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-15 22:19:14 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-15 22:19:14 +0100 |
commit | 387bfad1cacc2f9929e7590130ca93f27c688655 (patch) | |
tree | a532e99464246d3d57f0f131b372ea7b83c3753e /src/drivers/meas_airspeed/meas_airspeed.cpp | |
parent | 51b7c27363e36d1a953a980574e4f4753e1aa86c (diff) | |
download | px4-firmware-387bfad1cacc2f9929e7590130ca93f27c688655.tar.gz px4-firmware-387bfad1cacc2f9929e7590130ca93f27c688655.tar.bz2 px4-firmware-387bfad1cacc2f9929e7590130ca93f27c688655.zip |
Fixed status printing for airspeed sensor
Diffstat (limited to 'src/drivers/meas_airspeed/meas_airspeed.cpp')
-rw-r--r-- | src/drivers/meas_airspeed/meas_airspeed.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/meas_airspeed/meas_airspeed.cpp b/src/drivers/meas_airspeed/meas_airspeed.cpp index 05ae21c1f..6fe6c2221 100644 --- a/src/drivers/meas_airspeed/meas_airspeed.cpp +++ b/src/drivers/meas_airspeed/meas_airspeed.cpp @@ -50,6 +50,7 @@ * - Interfacing to MEAS Digital Pressure Modules (http://www.meas-spec.com/downloads/Interfacing_to_MEAS_Digital_Pressure_Modules.pdf) */ + #include <nuttx/config.h> #include <drivers/device/i2c.h> @@ -386,7 +387,7 @@ test() err(1, "immediate read failed"); warnx("single read"); - warnx("diff pressure: %d pa", (double)report.differential_pressure_pa); + warnx("diff pressure: %8.4f pa", (double)report.differential_pressure_pa); /* start the sensor polling at 2Hz */ if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 2)) @@ -411,7 +412,7 @@ test() err(1, "periodic read failed"); warnx("periodic read %u", i); - warnx("diff pressure: %d pa", report.differential_pressure_pa); + warnx("diff pressure: %8.4f pa", (double)report.differential_pressure_pa); warnx("temperature: %d C (0x%02x)", (int)report.temperature, (unsigned) report.temperature); } |