Skip to content

mavlink_direct: fix setting target_component#2919

Merged
julianoes merged 2 commits into
mainfrom
pr-fix-mavlink-direct-target-component
Jul 13, 2026
Merged

mavlink_direct: fix setting target_component#2919
julianoes merged 2 commits into
mainfrom
pr-fix-mavlink-direct-target-component

Conversation

@julianoes

Copy link
Copy Markdown
Collaborator

MavlinkDirect and MavlinkDirectServer send_message() tried to set the libmav field target_component_id, which doesn't exist (the MAVLink field is called target_component). A target component set via MavlinkMessage::target_component_id was therefore silently dropped and the message went out with target_component 0 (broadcast).

This fixes the field name in both plugins and adds regression system tests covering both send directions (verified to fail without the fix).

MavlinkDirect and MavlinkDirectServer send_message() tried to set the
libmav field "target_component_id" which doesn't exist (the MAVLink
field is called "target_component"), so a target component set via
MavlinkMessage::target_component_id was silently dropped and the
message went out with target_component 0 (broadcast).

Add regression tests covering both send directions.
@julianoes julianoes merged commit 35686f1 into main Jul 13, 2026
52 checks passed
@julianoes julianoes deleted the pr-fix-mavlink-direct-target-component branch July 13, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant