Skip to content

Flow control problems #9

@ondrap

Description

@ondrap

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.

Metadata

Metadata

Assignees

No one assigned

    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