Giter Club home page Giter Club logo

Comments (21)

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

AuspeXeu avatar AuspeXeu commented on May 31, 2024

I am trying to use the BLE driver on the web. Hardware is my computer which has bluetooth and I am doing that inside chrome.

According to the link I attached in my first comment, it seems like you should serialize the calls to startNotifications.

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

AuspeXeu avatar AuspeXeu commented on May 31, 2024

Windows 10, chrome 81.

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

AuspeXeu avatar AuspeXeu commented on May 31, 2024

It's localhost. Ergometer-space.org has the same issues it seems.

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

AuspeXeu avatar AuspeXeu commented on May 31, 2024

Well ... according to the link, in case you haven't had a chance to look at it. It can cause issues if the startNotifications commands are called in parallel instead of in sequence. And I checked your code, you're doing them all at once.

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

AuspeXeu avatar AuspeXeu commented on May 31, 2024

Well, your promiseAllSync does not actually serialize the execution of the promises. they are just awaited in a different way. The execution is started upon new Promise which is before the promiseAllSync call.

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

AuspeXeu avatar AuspeXeu commented on May 31, 2024

This is not correct. The promise code starts executing immediately after the promise is instantiated. The then code simply means this is called after the promise finished. I have a small fix in my version right now which I'll be trying out today and see if it helps.

Edit: Just try the following code. By your logic, none of the code inside the promises should run, since we don't use any then.

for(let i = 0; i < 10; i++) {
  new Promise(() => console.log(i))
}

from ergometerjs.

AuspeXeu avatar AuspeXeu commented on May 31, 2024

Yeah, so this still seems unresolved for me. I tried to run this on my Android phone. and am getting these weird GATT errors.

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

AuspeXeu avatar AuspeXeu commented on May 31, 2024

It is a fairly old phone. You have the latest version from the git repo running on your erg space, no?

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

I could for the first time repeat the connection problems. Hopefully I can now debug and fix this.

from ergometerjs.

tijmenvangulik avatar tijmenvangulik commented on May 31, 2024

I have published a fix for multi plex mode for android. You can turn on this mode and then it should compensate for limited blue tooth hard ware.

from ergometerjs.

AuspeXeu avatar AuspeXeu commented on May 31, 2024

Thanks

from ergometerjs.

Related Issues (13)

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.