mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 02:43:34 +08:00
Introduce HMC5883 multi-device support
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user