GithubHelp home page GithubHelp logo

Flow control problems about android-sdk HOT 5 OPEN

ondrap avatar ondrap commented on July 17, 2024
Flow control problems

from android-sdk.

Comments (5)

ondrap avatar ondrap commented on July 17, 2024

Another frequent problem is that when I connect to the glasses very early after power-on (before the ActiveLook animation), it turns off. The onConnected handler is called correctly, but I get 4 dots on screen that disappear after a while.

This is likely a result of the direct connection to the glasses, as with the scan-then-connect sequence the connection doesn't probably occur that early in the boot sequence.

from android-sdk.

ondrap avatar ondrap commented on July 17, 2024

Adding information to the last problem - scan-then-connect won't solve the problem. If the connection happens too soon after the glasses are powered on, they turn off immediately. What seems to help is 'scan - wait 1 second - connect.

from android-sdk.

SylvainRomillon avatar SylvainRomillon commented on July 17, 2024

Another frequent problem is that when I connect to the glasses very early after power-on (before the ActiveLook animation), it turns off. The onConnected handler is called correctly, but I get 4 dots on screen that disappear after a while.

This is likely a result of the direct connection to the glasses, as with the scan-then-connect sequence the connection doesn't probably occur that early in the boot sequence.

This is a firmware known issue, we are working to solve it

from android-sdk.

SylvainRomillon avatar SylvainRomillon commented on July 17, 2024

There seems to be something not quite correct with the way the device is handling flow control. I'm quite deterministically able to induce the following situations:

* run 6 `fontSave` (for 6 fonts) interspersed with [color, rect, rectf] (progressbar).
  
  * when there is no progressbar drawing, everything is OK
  * when there is progressbar drawing, the font saving randomly fails
  * when I introduce a small (200ms) delay after each progressbar update, it works OK

* run a bunch of mixed `imgSave`, `layoutSave`, `layoutDisplayExtended` (the order is such that the images and layouts needed for the display are correctly saved) is able to get the glasses in some semi-stuck mode - screen is blank, it doesn't react to e.g. BT disconnection. Introducing small delay before or after each `imgSave` and `layoutSave` seems to fix the problem.

It seems to me there is some dependency between 'drawing' and 'saving'. and one doesn't like the other.

Also, is there some way to wait for the send buffer to get empty? It may happen that I get too many commands in queue and instead of building an ever larger backlog, I'd be able to start dropping the display requests in the application. I'd need some way to call flush which would return when the sending queue is empty. Currently I just read some battery status and assume that when I get a value back, everything sent so far was processed. I just wonder if there was some way without the extra roundtrip.

We have disabled the command stacking cause we have a firmware known issue. It's fixed in the brunch rc/4.2.1.

Could you provide us logs of data that you send to the glasses ?

from android-sdk.

ondrap avatar ondrap commented on July 17, 2024

I tried the 4.2.1 branch and it's something like 3-4 times slower. To draw anything slightly complex is just too slow with this version of the sdk.

I will simulate the problems in a few days with the main sdk branch and provide the logs.

from android-sdk.

Related Issues (6)

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.