Skip to content

Document baud property of connect() #395

Closed

Description

@tcr3dr

See #394.

Activity

  1. hamishwillee commented on Nov 3, 2015

    @hamishwillee
    Contributor

    I thought you could just pass the baudrate to the string connect('com14 --baudrate 15000'). This will require docs - and a fix to the connection string options http://python.dronekit.io/guide/getting_started.html#connecting-to-a-vehicle

  2. tcr3dr commented on Nov 3, 2015

    @tcr3dr
    ContributorAuthor

    @hamishwillee If that is actually the case (oh gosh) I would prefer not to add the explicit property; I very much like the 'connection string information is all that is needed to reestablish the connection' approach, much like SQL connection strings, etc.

    I can't test "/dev/tty.usbmodem1415 --baudrate 115200" yet though. I'll have to snag an APM from someone.

  3. hamishwillee commented on Nov 3, 2015

    @hamishwillee
    Contributor

    @tcr3dr Well, I just made the assumption because you told me "connection strings are exactly the same as you would pass to mavproxy". I say lets test. I kind of prefer the explicit way because the API shows you what i can do ... rather than having to guess.

  4. tcr3dr commented on Nov 3, 2015

    @tcr3dr
    ContributorAuthor

    @hamishwillee Oh, gotcha. So I am assuming the --baudrate property was parsed as part of the Python arguments, and ultimately was implemented in the way the connect(baud=...) property does it on HEAD. Which is to say the new mechanism would be the correct way to document it. Good catch.

  5. hamishwillee commented on Nov 3, 2015

    @hamishwillee
    Contributor

    @tcr3dr What is are rate, status_printer and vehicle_class parameters to connect()?

    def connect(ip, await_params=False, status_printer=errprinter, vehicle_class=Vehicle, rate=4, baud=115200)
    

    Specifically what do they "mean" and what values might you reasonably change them to?

  6. tcr3dr commented on Nov 9, 2015

    @tcr3dr
    ContributorAuthor

    @hamishwillee

    status_printer is a method of signature def status_printer(txt) which is used to print STATUS_TEXT sent to the vehicle [as well as other diagnostic information—note, not sure if I want to stick with this interpretation, so maybe we just say a STATUS_TEXT printer]. It defaults to lambda text: sys.stderr.write('>>> ' + text + '\n'). Passing None attaches no listener to STATUS_TEXT. You can pass any method you want to do your printing or logging. (Note: maybe this should be a logging method by default?)

    vehicle_class defaults to Vehicle. It refers to the class that will be instantiated from the class mechanism. You can change it to any subclass of Vehicle. See #437.

    rate is the refresh rate sent to request_data_stream_send ultimately. A (default) value of 4 means 4Hz updates. 10Hz means ten updates per second. etc...

  7. modified the milestone: v2.0.0 on Nov 10, 2015
  8. added a commit that references this issue on Nov 10, 2015
  9. hamishwillee commented on Nov 10, 2015

    @hamishwillee
    Contributor

    The connect docs/additional params are documented as part of #443

  10. added a commit that references this issue on Nov 10, 2015
  11. tcr3dr commented on Nov 11, 2015

    @tcr3dr
    ContributorAuthor

    #443 has been merged.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions