aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/hmc5883/hmc5883.cpp
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2013-09-12 16:21:59 +1000
committerLorenz Meier <lm@inf.ethz.ch>2013-09-12 09:26:49 +0200
commit4893509344f9304060dabc8a9ecad28fe891dcf8 (patch)
tree6dd11e99adba8f4163a7a4274181a9ca85fd755c /src/drivers/hmc5883/hmc5883.cpp
parentc9b8a019eaae6ee7daf11835602059199369544e (diff)
downloadpx4-firmware-4893509344f9304060dabc8a9ecad28fe891dcf8.tar.gz
px4-firmware-4893509344f9304060dabc8a9ecad28fe891dcf8.tar.bz2
px4-firmware-4893509344f9304060dabc8a9ecad28fe891dcf8.zip
drivers: report error_count in drivers where possible
Diffstat (limited to 'src/drivers/hmc5883/hmc5883.cpp')
-rw-r--r--src/drivers/hmc5883/hmc5883.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drivers/hmc5883/hmc5883.cpp b/src/drivers/hmc5883/hmc5883.cpp
index 58a1593ed..de043db64 100644
--- a/src/drivers/hmc5883/hmc5883.cpp
+++ b/src/drivers/hmc5883/hmc5883.cpp
@@ -791,6 +791,7 @@ HMC5883::collect()
/* this should be fairly close to the end of the measurement, so the best approximation of the time */
new_report.timestamp = hrt_absolute_time();
+ new_report.error_count = perf_event_count(_comms_errors);
/*
* @note We could read the status register here, which could tell us that