aboutsummaryrefslogtreecommitdiff
path: root/apps/drivers
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-09-07 16:56:47 +0200
committerLorenz Meier <lm@inf.ethz.ch>2012-09-07 16:56:47 +0200
commitc25cef299f7bd2e09062e38cebd94298b331e6e7 (patch)
treef632609bf265de0f041f5226dc4992839acbe3fe /apps/drivers
parent297990fe35d0a428ee095b0d8eb1776b58f4472a (diff)
downloadpx4-firmware-c25cef299f7bd2e09062e38cebd94298b331e6e7.tar.gz
px4-firmware-c25cef299f7bd2e09062e38cebd94298b331e6e7.tar.bz2
px4-firmware-c25cef299f7bd2e09062e38cebd94298b331e6e7.zip
Fixed to mag measurement and filter
Diffstat (limited to 'apps/drivers')
-rw-r--r--apps/drivers/hmc5883/hmc5883.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/drivers/hmc5883/hmc5883.cpp b/apps/drivers/hmc5883/hmc5883.cpp
index 1f05a3343..da3b83777 100644
--- a/apps/drivers/hmc5883/hmc5883.cpp
+++ b/apps/drivers/hmc5883/hmc5883.cpp
@@ -612,8 +612,8 @@ HMC5883::collect()
#pragma pack(push, 1)
struct { /* status register and data as read back from the device */
uint8_t x[2];
- uint8_t y[2];
uint8_t z[2];
+ uint8_t y[2];
} hmc_report;
#pragma pack(pop)
struct {
@@ -833,7 +833,7 @@ test()
err(1, "immediate read failed");
warnx("single read");
- warnx("measurement: %.6f %.6f %.6f", report.x, report.y, report.z);
+ warnx("measurement: %.6f %.6f %.6f", (double)report.x, (double)report.y, (double)report.z);
warnx("time: %lld", report.timestamp);
/* set the queue depth to 10 */
@@ -863,7 +863,7 @@ test()
err(1, "periodic read failed");
warnx("periodic read %u", i);
- warnx("measurement: %.6f %.6f %.6f", report.x, report.y, report.z);
+ warnx("measurement: %.6f %.6f %.6f", (double)report.x, (double)report.y, (double)report.z);
warnx("time: %lld", report.timestamp);
}