Skip to content

DKPY2: autopilot baudrate locked to 115200, should be configurable #393

Closed

Description

@a7scenario

In DroneKit Python ver. 2 (DKPY2), the connect() function uses mavutil's mavlink_connection function to open a serial connection to the autopilot. The issue is that connect's call to mavlink_connection doesn't specify a baudrate and, therefore, mavlink_connection just uses its default baudrate of 115200. If I'm not mistaken, this means there is no way to change the baudrate of the connection between a Companion Computer and an autopilot if you're using DKPY2. It would be better if connect() added an input argument of baudrate=115200 that it relays to mavlink_connection, to allow for using different baudrates with your autopilot.

def connect(ip , await_params=False, status_printer=errprinter, vehicle_class=Vehicle, rate=4):
    state = MPFakeState(mavutil.mavlink_connection(ip), vehicle_class=vehicle_class)
    state.status_printer = status_printer
    state.prepare(await_params=await_params, rate=rate)
    return state.vehicle

Activity

  1. tcr3dr commented on Nov 2, 2015

    @tcr3dr
    Contributor

    Hi @a7scenario,

    I'll add this ASAP to connect(). Thanks for filing this issue.

  2. added 2 commits that reference this issue on Nov 2, 2015
    a2c544b
    4a81fb4
  3. added a commit that references this issue on Nov 2, 2015
    5f2dcd4
  4. tcr3dr commented on Nov 2, 2015

    @tcr3dr
    Contributor

    We'll publish this in the next rc, coming shortly.

  5. hamishwillee commented on Nov 3, 2015

    @hamishwillee
    Contributor

    Ah, I see you've assigned that to me already!

  6. added 3 commits that reference this issue on Nov 4, 2015
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions