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

Async interface for update() in micropython #1045

Open
nmattia opened this issue Jan 3, 2025 · 1 comment
Open

Async interface for update() in micropython #1045

nmattia opened this issue Jan 3, 2025 · 1 comment

Comments

@nmattia
Copy link

nmattia commented Jan 3, 2025

Hi,

I love using picographics (with micropython), and I was wondering if it'd be possible to have an asynchronous interface for update()?

From a quick look at the source it seems to be hot looping until the display has finished refreshing. I'm using this with the Inky Frame 7.3", where the update takes ~40s, which unfortunately makes using a watchdog impossible (the max timeout value is ~8s).

Thanks!

@Gadgetoid
Copy link
Member

In the current beta release you should be able to graphics.set_blocking(False) and sit in a while graphics.is_busy(): loop in an async function.

Using core1 to extend the watchdog timeout is also a potential option: https://gist.github.com/Gadgetoid/81cbeba0b60c0901209fbd0e543032ef

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

No branches or pull requests

2 participants