From dc2df309cba57a754b291b528f92d252fc271f57 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Tue, 10 Jun 2014 15:05:50 +0200 Subject: [PATCH] Introduce HMC5883 multi-device support --- src/drivers/hmc5883/hmc5883.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/hmc5883/hmc5883.cpp b/src/drivers/hmc5883/hmc5883.cpp index fddba806e3..be8e148078 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");