Skip to content

How do you register/observe changes to a particular Vehicle parameter #89

Closed

Description

@hamishwillee

class Parameters implements HasObservers interface, and it should therefore be possible to register to observe parameter changes (this is also indicated by the original documents).

I tried this, but while the code will run, the observer is not called (possibly because THR_MIN is not an attribute):

v.add_attribute_observer('THR_MIN', thin_callback)

I tried this, but while the fails with some kind of not-supported error

v.parameters.add_attribute_observer('THR_MIN', thin_callback)

How is this done?

Activity

  1. geeksville commented on May 12, 2015

    @geeksville
    Collaborator

    This is meant to be supported and if it doesn't work it would be easy to add.

  2. hamishwillee commented on May 12, 2015

    @hamishwillee
    ContributorAuthor

    Thanks @geeksville

    @mrpollo I think "we" should add this by implementing add_attribute_observer in Parameter class. The question is, will it be done in a timely manner, or should I update the documentation now to reflect that it is not possible right now?

  3. mrpollo commented on May 13, 2015

    @mrpollo
    Member

    update docs to reflect current state of API and please create a new issue assigned to me to add this feature

    @geeksville thanks!

  4. hamishwillee commented on May 13, 2015

    @hamishwillee
    ContributorAuthor

    OK, #107 is the issue for the missing functionality. Am assigning current issue to me to fix the docs.

  5. hamishwillee commented on May 13, 2015

    @hamishwillee
    ContributorAuthor

    Documentation fixed by #108. Closing. Note that I couldn't hide the observer methods in Parameters (because same documentation is used for Vehicle class). So what I did is add a disclaimer above them indicating that the methods aren't impelemtned.

  6. removed their assignment
    on Jul 27, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions