diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-25 17:53:04 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-29 16:33:53 +0100 |
commit | f641a26feee76f4a811fec34834cc818a8e8f76a (patch) | |
tree | 32b05ff803b37b19f445dbe213e99c53b8d784cd | |
parent | 801e9ed4fbc66d0aa359184be9f4ed3899f10096 (diff) | |
download | px4-firmware-f641a26feee76f4a811fec34834cc818a8e8f76a.tar.gz px4-firmware-f641a26feee76f4a811fec34834cc818a8e8f76a.tar.bz2 px4-firmware-f641a26feee76f4a811fec34834cc818a8e8f76a.zip |
Move MAVLink to new mag interface
-rw-r--r-- | src/modules/mavlink/mavlink_receiver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index e5a21651d..5aa623e95 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -1086,10 +1086,11 @@ MavlinkReceiver::handle_message_hil_sensor(mavlink_message_t *msg) mag.z = imu.zmag; if (_mag_pub < 0) { - _mag_pub = orb_advertise(ORB_ID(sensor_mag0), &mag); + /* publish to the first mag topic */ + _mag_pub = orb_advertise(ORB_ID(sensor_mag), &mag); } else { - orb_publish(ORB_ID(sensor_mag0), _mag_pub, &mag); + orb_publish(ORB_ID(sensor_mag), _mag_pub, &mag); } } |