Coder Social home page Coder Social logo

Comments (6)

tomazs avatar tomazs commented on August 26, 2024 1

You would need to implement a custom command, i.e.

  1. Extend from Command and call readRemoteRssi() on the provide gatt instance
  2. override the onReadRemoteRssi() to get the value
  3. call finish when the command is done (so other BT operations can proceed)

When the implementation is done, create a operation build and call it's * executeCommand*

from neatle.

tomazs avatar tomazs commented on August 26, 2024 1

from neatle.

Myk-da-Beast avatar Myk-da-Beast commented on August 26, 2024

Wow thanks for the response. I'm not familiar with operations or commands but I will try to implement your solution and report my results =)

from neatle.

Myk-da-Beast avatar Myk-da-Beast commented on August 26, 2024

You say call finish when the command is done, does that mean at the end of Command.start() ?

from neatle.

Myk-da-Beast avatar Myk-da-Beast commented on August 26, 2024

Perhaps I misunderstood but I've attempted to implement your solution, however I'm unable to do the last step. When I attempt to call finish() from within the Command subclass I'm stuck since finish takes a CommandResult. From what I can see all of the default CommandResults are limited to the library, and I cannot override the constructor. =(

from neatle.

Myk-da-Beast avatar Myk-da-Beast commented on August 26, 2024

Hmm. I don't see any such static methods. The constructor itself seems to be public but for some reason when I try to use it I get an error saying:
Cannot access '': it is public/package/ in 'CommandResult'

I don't think I'm understanding the meaning of this error. I would think that since it is public I should be fine to use it... Could it perhaps be because I'm using Kotlin?

from neatle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.