aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/hmc5883/hmc5883.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-06-10 15:05:50 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-06-10 15:05:50 +0200
commitdc2df309cba57a754b291b528f92d252fc271f57 (patch)
tree84d674a4376bbf5a4a2d74a67d31ceedf6cd7695 /src/drivers/hmc5883/hmc5883.cpp
parenta2ef04146aa5eb233fd564f38e447e983e5985a7 (diff)
downloadpx4-firmware-dc2df309cba57a754b291b528f92d252fc271f57.tar.gz
px4-firmware-dc2df309cba57a754b291b528f92d252fc271f57.tar.bz2
px4-firmware-dc2df309cba57a754b291b528f92d252fc271f57.zip
Introduce HMC5883 multi-device support
Diffstat (limited to 'src/drivers/hmc5883/hmc5883.cpp')
-rw-r--r--src/drivers/hmc5883/hmc5883.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/hmc5883/hmc5883.cpp b/src/drivers/hmc5883/hmc5883.cpp
index fddba806e..be8e14807 100644
--- a/src/drivers/hmc5883/hmc5883.cpp
+++ b/src/drivers/hmc5883/hmc5883.cpp
@@ -866,9 +866,9 @@ HMC5883::collect()
if (_mag_topic != -1) {
/* publish it */
- orb_publish(ORB_ID(sensor_mag), _mag_topic, &new_report);
+ orb_publish(ORB_ID(sensor_mag0), _mag_topic, &new_report);
} else {
- _mag_topic = orb_advertise(ORB_ID(sensor_mag), &new_report);
+ _mag_topic = orb_advertise(ORB_ID(sensor_mag0), &new_report);
if (_mag_topic < 0)
debug("failed to create sensor_mag publication");