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

Timer flickers on change #8

Open
futurexdesign opened this issue Apr 13, 2023 · 0 comments
Open

Timer flickers on change #8

futurexdesign opened this issue Apr 13, 2023 · 0 comments
Milestone

Comments

@futurexdesign
Copy link
Owner

There is noticeable flicker when the timer value changes. It seems that tcMenu is re-rendering the entire menu row, rather than just the string value which has changed, and with the speed of the LCD, it causes a flicker as the data renders.

According to TFT_eSPI documentation, and tcMenu documentation, this seems like it can be avoided if the menu item is double-buffered as a sprite. I've tried to increase the allowed sprite size to work for the size of the timer row, but it doesn't necessarily seem to be working as expected. tcMenu seems to make reference to 40px being the max sprite height, but I can't find where that is in code.

If i shrink the size of the row down, the flicker appears to go away. I can't tell if this is because the double-buffering is working correctly, because there is just less data to render (so it happens faster), or if it is just not noticeable because of the smaller size, there is less flickering for my eye to catch.

Things I've tried:

  • Increasing the buffer size settings when the gfx object is created
  • Overclocking the SPI bus to 80mhz (from 70mhz). This didn't help, and ultimately caused occasional screen artifacts.
  • Changing font, and size.

Things I may try going forward:

  • Switch to a dashboard view where the timer isn't a menu item, but a manually rendered block. I can ensure that it is a buffered sprite at that point. Issue is... I would then have to manually format the string and run all of the graphics calls to render the text to the correct spot using render pipeline callbacks. This is far from my ideal case, I'm trying to avoid breaking out into manual rendering at all costs.
  • See if I can find in the tcMenu code where the sprite support may be limited, and not creating a buffered sub display. So far I haven't found it, the eSPI code tcMenu creates is a rather thin layer, and doesn't have any sort of limitation to size that i can find. We should still have plenty of ram available for buffering up to the entire screen as a framebuffer.
@futurexdesign futurexdesign added this to the NewUI Bugs milestone Apr 13, 2023
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

1 participant