diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2015-02-01 11:06:47 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2015-02-01 11:06:47 +0100 |
commit | 84ff3c671d5c6d00a1b6c9a8062bddfb6875f8f9 (patch) | |
tree | db0470a2471776e9ffe525b2fa7302cec7ab8bd8 /src/modules/mavlink/mavlink_main.cpp | |
parent | 7c958a2cca90a6262dc491fe9ef86d85bacdf3da (diff) | |
parent | a2a244584e36a0e9ffdb93a0dda8473baf8344d3 (diff) | |
download | px4-firmware-84ff3c671d5c6d00a1b6c9a8062bddfb6875f8f9.tar.gz px4-firmware-84ff3c671d5c6d00a1b6c9a8062bddfb6875f8f9.tar.bz2 px4-firmware-84ff3c671d5c6d00a1b6c9a8062bddfb6875f8f9.zip |
Merge remote-tracking branch 'upstream/master' into ros_messagelayer_merge2_attctrl_posctrl
Conflicts:
src/drivers/px4fmu/fmu.cpp
Diffstat (limited to 'src/modules/mavlink/mavlink_main.cpp')
-rw-r--r-- | src/modules/mavlink/mavlink_main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/mavlink/mavlink_main.cpp b/src/modules/mavlink/mavlink_main.cpp index 676b65adc..6bd0c7bce 100644 --- a/src/modules/mavlink/mavlink_main.cpp +++ b/src/modules/mavlink/mavlink_main.cpp @@ -904,20 +904,20 @@ Mavlink::send_statustext(unsigned char severity, const char *string) mavlink_logbuffer_write(&_logbuffer, &logmsg); } -MavlinkOrbSubscription *Mavlink::add_orb_subscription(const orb_id_t topic) +MavlinkOrbSubscription *Mavlink::add_orb_subscription(const orb_id_t topic, int instance) { /* check if already subscribed to this topic */ MavlinkOrbSubscription *sub; LL_FOREACH(_subscriptions, sub) { - if (sub->get_topic() == topic) { + if (sub->get_topic() == topic && sub->get_instance() == instance) { /* already subscribed */ return sub; } } /* add new subscription */ - MavlinkOrbSubscription *sub_new = new MavlinkOrbSubscription(topic); + MavlinkOrbSubscription *sub_new = new MavlinkOrbSubscription(topic, instance); LL_APPEND(_subscriptions, sub_new); |