Skip to content

Update examples to reflect changes to observer methods #413

Closed

Description

@franknitty69

As of DK 2.0.0 rc7, examples that utilize observer methods will fail because they are still using the old syntax and logic.

To fix the the issue, all examples using observer methods need the following changes:

  1. call back definitions require 2 parameters, not 1
    replace def mode_callback(attribute) with def mode_callback(vehicle, attr_name)
  2. replace add_attribute_observer with on_attribute
  3. replace remove_attribute_observer with remove_attribute_listener

Examples on python.dronekit.io need to be updated as well.

Activity

  1. tcr3dr commented on Nov 4, 2015

    @tcr3dr
    Contributor

    Will have the docs updated shortly. Also adding this list to our migration guide #379

  2. hamishwillee commented on Nov 5, 2015

    @hamishwillee
    Contributor

    #420 starts this task. Still working on it. @franknitty69 we are likely to change the names of some of the methods too.

  3. tcr3dr commented on Nov 7, 2015

    @tcr3dr
    Contributor

    Renaming these methods: #426

  4. tcr3dr commented on Nov 9, 2015

    @tcr3dr
    Contributor

    #420 and #426 have been merged. rc9 has these changes and the python.dronekit.io docs have been updated accordingly. What remains is the migration guide at #379.

    I believe we can move discussion to those issues. Thanks!

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

Metadata

Metadata

Assignees

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