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

lua api: display.clear could be added back #219

Open
kjjohnsen opened this issue Jun 13, 2024 · 4 comments
Open

lua api: display.clear could be added back #219

kjjohnsen opened this issue Jun 13, 2024 · 4 comments

Comments

@kjjohnsen
Copy link

There does not seem to be a way to clear the display without first putting some text into the buffer, and then displaying it. So, it is possible to clear the display, but you have to issue a seemingly unnecessary text call to do it. Here is an example:

frame.display.text('Hello world',50,100)
frame.display.show()
frame.display.text('',50,100) -- empty does not work
frame.display.show() -- does nothing
frame.display.text(' ',50,100) --non-empty works
frame.display.show() -- clears screen

Primary suggestion: re-add a clear function to the lua api
Secondary suggestion: make display.show with any empty buffer clear the display

Thanks!

@siliconwitch
Copy link
Member

Which firmware are you using? frame.display.show() should clear if no other draw command was given prior

@kjjohnsen
Copy link
Author

kjjohnsen commented Jul 11, 2024

It was the latest at the time.

This part
frame.display.text('',50,100) -- empty does not work frame.display.show() -- does nothing

Is what I would think is a bug/oddity, because it should clear. I did not try to display.show() in a row.

@CitizenOneX
Copy link

I get the same behaviour on firmware v24.200.1206 - that is, the display isn't cleared if I only call frame.display.show() without any other draw calls.
Thanks!

@CitizenOneX
Copy link

Update: Firmware v24.276.1359

Back-buffer clearing still seems to have a bug, and now the approach of "drawing a ' ' of text, then calling show()" doesn't work either.
When trying to clear the back buffer using a single space and show(), I got this (just the space character overlaid on the previous buffer). Calling show() twice in a row (with nothing in between) also doesn't clear the display, as before.
image

Other times the glitch shows up is just sending a break signal on wakeup - the "tap me in" prompt sometimes isn't cleared when the "Frame is Paired" text is shown. But other times it is - it's just intermittent.
image

So now it's not clear what would clear the display at all.
@siliconwitch said he'll try to take a look at this before long - thanks.

@siliconwitch siliconwitch moved this to Todo in Frame Oct 17, 2024
@siliconwitch siliconwitch moved this from Todo to Backlog / Future / Reference in Frame Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog / Future / Reference
Development

No branches or pull requests

3 participants