Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

andark: queue redraws and enable fastload #3678

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

cbkerr
Copy link
Contributor

@cbkerr cbkerr commented Nov 29, 2024

I was using this clock face a lot, so I wanted to improve it. Thanks for the design @HeiLaut

For the draw queuing, I had some problems like:

  1. When unlocked, the second hand would not draw right away.
  2. The second hand would not move on the second, rather it would move a second after being unlocked.
  3. Sometimes locking or unlocking would not trigger the second hand to start drawing.

I tried to address these by using queueDraw and updateState approach from antonclkplus, and it seems to have fixed my problems.

For fast loading, here are my memory leak checks:

 ____                 _
|  __|___ ___ ___ _ _|_|___ ___
|  __|_ -| . |  _| | | |   | . |
|____|___|  _|_| |___|_|_|_|___|
         |_| espruino.com
 2v24 (c) 2024 G.Williams
>Bangle.loadWidgets();Bangle.drawWidgets();
=undefined
>process.memory().usage
=4225
>eval(require("Storage").read("andark.app.js"))
=undefined
>process.memory().usage
=5391
>Bangle.setUI()
=undefined
>process.memory().usage
=4271
>eval(require("Storage").read("andark.app.js"))
=undefined
>process.memory().usage
=5392
>Bangle.setUI()
=undefined
>process.memory().usage
=4271

Copy link
Collaborator

@bobrippling bobrippling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fixes! One small comment - we'll give @HeiLaut a few days to check and then I'll merge

apps/andark/app.js Show resolved Hide resolved
@bobrippling
Copy link
Collaborator

Alright that's time - thanks for the PR!

@bobrippling bobrippling merged commit b01901c into espruino:master Dec 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants