Introduce HMC5883 multi-device support

This commit is contained in:
Lorenz Meier
2014-06-10 15:05:50 +02:00
parent a2ef04146a
commit dc2df309cb
+2 -2
View File
@@ -866,9 +866,9 @@ HMC5883::collect()
if (_mag_topic != -1) { if (_mag_topic != -1) {
/* publish it */ /* publish it */
orb_publish(ORB_ID(sensor_mag), _mag_topic, &new_report); orb_publish(ORB_ID(sensor_mag0), _mag_topic, &new_report);
} else { } 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) if (_mag_topic < 0)
debug("failed to create sensor_mag publication"); debug("failed to create sensor_mag publication");