mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 07:40:35 +08:00
mavlink: fix transmitting vehicle commands
This commit is contained in:
committed by
Lorenz Meier
parent
9fa882119d
commit
532a970410
@@ -1337,13 +1337,15 @@ void Mavlink::send_protocol_version()
|
|||||||
|
|
||||||
MavlinkOrbSubscription *Mavlink::add_orb_subscription(const orb_id_t topic, int instance)
|
MavlinkOrbSubscription *Mavlink::add_orb_subscription(const orb_id_t topic, int instance)
|
||||||
{
|
{
|
||||||
/* check if already subscribed to this topic */
|
if (topic != ORB_ID(vehicle_command)) {
|
||||||
MavlinkOrbSubscription *sub;
|
/* check if already subscribed to this topic */
|
||||||
|
MavlinkOrbSubscription *sub;
|
||||||
|
|
||||||
LL_FOREACH(_subscriptions, sub) {
|
LL_FOREACH(_subscriptions, sub) {
|
||||||
if (sub->get_topic() == topic && sub->get_instance() == instance) {
|
if (sub->get_topic() == topic && sub->get_instance() == instance) {
|
||||||
/* already subscribed */
|
/* already subscribed */
|
||||||
return sub;
|
return sub;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user