Skip to content

Conversation

joaoantoniocardoso
Copy link
Member

@joaoantoniocardoso joaoantoniocardoso commented Oct 12, 2025

This is a backport of #3592 into 1.4

Summary by Sourcery

Backport MAVLink Server updates to include configurable system and component IDs in the launch command

Enhancements:

  • Add mavlink_system_id and mavlink_component_id attributes to MAVLinkServer
  • Read MAV_SYSTEM_ID from environment (default=1) and set component ID (191) if unset
  • Include --mavlink-system-id and --mavlink-component-id flags in the server startup command

Copy link

sourcery-ai bot commented Oct 12, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Backport PR introduces configurable MAVLink system and component IDs in the MAVLinkServer by adding new attributes, populating them with defaults (including an environment variable for system ID), and updating the server launch command to include corresponding CLI flags.

Class diagram for updated MAVLinkServer attributes

classDiagram
class MAVLinkServer {
  Optional log_path
  Optional mavlink_system_id
  Optional mavlink_component_id
  _get_version()
  convert_endpoint()
  name()
}
MAVLinkServer --|> AbstractRouter
Loading

Flow diagram for MAVLinkServer initialization of system and component IDs

flowchart TD
    A["MAVLinkServer initialized"] --> B["log_path set to default if not present"]
    B --> C["mavlink_system_id set from MAV_SYSTEM_ID env or default to 1"]
    C --> D["mavlink_component_id set to 191 if not present"]
    D --> E["Server launch command includes system and component IDs"]
Loading

File-Level Changes

Change Details Files
Add support for configurable MAVLink system and component IDs
  • Introduced optional mavlink_system_id and mavlink_component_id attributes
  • Read MAV_SYSTEM_ID from environment (defaulting to 1) and set default component ID to 191
  • Extended server command string to include --mavlink-system-id and --mavlink-component-id flags
core/services/ardupilot_manager/mavlink_proxy/MAVLinkServer.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

sourcery-ai[bot]

This comment was marked as outdated.

@joaoantoniocardoso joaoantoniocardoso force-pushed the backports/1.4/fix_mavlink_server_id branch from 8641b55 to 8225ac3 Compare October 12, 2025 01:59
@joaoantoniocardoso joaoantoniocardoso force-pushed the backports/1.4/fix_mavlink_server_id branch from 8225ac3 to 7b551bd Compare October 12, 2025 02:01
@joaoantoniocardoso joaoantoniocardoso changed the title core: services: ardupilot_manager: mavlink_proxy: Fix MAVLink Server component and system ID [backport]core: services: ardupilot_manager: mavlink_proxy: Fix MAVLink Server component and system ID Oct 12, 2025
@joaoantoniocardoso joaoantoniocardoso changed the title [backport]core: services: ardupilot_manager: mavlink_proxy: Fix MAVLink Server component and system ID [backport] core: services: ardupilot_manager: mavlink_proxy: Fix MAVLink Server component and system ID Oct 12, 2025
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