Skip to content

send_mavlink() doesn't autofix system id #400

Closed

Description

@juanmacrack93

When sending mavlink messages created with message_factory, the correct system id must be specified, otherwise it won't work.

This was tested using the following code:

 msg = vehicle.message_factory.mount_control_encode(
        0, 0,  # target system, target component
        30 * 100,  # pitch
        0,  # roll
        0,  # yaw
        0)  # save trim
vehicle.send_mavlink(msg)

However, changing the system id to the proper value (1 in this case) fixes the problem.
The documentation suggests that this should be automatically taken care of by send_mavlink(), yet it does't seem to be the case.

I tried the same code with dronekit 1 and it does indeed work without the need to specify the sysid manually.

Activity

  1. tcr3dr commented on Nov 3, 2015

    @tcr3dr
    Contributor

    Hi @juanmacrack93,

    Thanks for filing the issue. Message correction is added back in with the refactor on this PR: #401

    Exposing a way to change the target system and component is not on that PR yet, but should be added in shortly.

  2. modified the milestone: v2.0.0 on Nov 10, 2015
  3. tcr3dr commented on Nov 11, 2015

    @tcr3dr
    Contributor

    You can follow #448 for a way to modify the system/component directly.

  4. tcr3dr commented on Nov 18, 2015

    @tcr3dr
    Contributor

    Further addressed by #461.

  5. tcr3dr commented on Nov 18, 2015

    @tcr3dr
    Contributor

    Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions