-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Fix menus responsiveness when HAS_MARLINUI_U8GLIB. #26555
Fix menus responsiveness when HAS_MARLINUI_U8GLIB. #26555
Conversation
c624e13
to
e6f1b07
Compare
I just tested this on my machine (bugfix-2.1.x @ 06dc7f4, SKR Mini E3 v1.2) and I think I encountered a bug: When the last file name on the SD card is long enough that it should scroll, it will not scroll under certain circumstances. When moving down the file list from the top to the very bottom, the filename won't scroll. When scrolling up one item, then down again to the bottom one, it will then scroll the filename. I have to mention that after the recent encoder improvements (#26501), my machine is affected by bug #26605. So I don't know if this is somehow connected to this PR. I can say, however, that even when the encoder direction changes and that encoder step is missed due to the bug, long filenames which are not at the very end of the list still do scroll fine. |
6a226dd
to
46b595b
Compare
@XDA-Bam Thank you for trying it and finding that bug. It was due |
Just tested the latest changes with bugfix-2.1.x @ 22fc07d. I can confirm that the filename scrolling bug is fixed and I encountered no problems at all dashing around the menus for a minute or two. Everything is nice and snappy now! 😃 |
9c65146
to
4f65466
Compare
This small patch has been on my printer with no issues and no wrong print starts for the last two months. |
46b595b
to
96d5213
Compare
96d5213
to
f64c1c1
Compare
Synced and retested. Ready to be merged. |
@thisiskeithb Sorry if you're not the right person but can you please help get this fix PR a review? |
This all makes sense to me, until I get to all the drawing_screen resets in the bottom of marlinui.cpp. At this point I'm not sure whether every instance is correct, as I don't know this code well. You probably have studied it out and understand it better than me, but @thisiskeithb recommended that we hold off on merging this if there is a release imminent, as it needs some runtime to make sure it doesn't introduce new issues for anyone. Only @thinkyhead knows what's coming up as far as releases, so while I think this is ready to go (with just my one minor suggestion), we'll need to wait for him to decide on the timing. |
@thisiskeithb how much runtime do you think we would need in bugfix to feel good that issues would have been reported? Is a week enough? |
Co-authored-by: Jason Smith <jason.inet@gmail.com>
I'm testing this now and the difference is noticeable. It seems like it also somehow fixes the remaining occasional missed and reversed encoder steps. +1 for merge Noticed no issues, fixed bugs (encoder and long filename scrolling), and a more responsive menu |
@XDA-Bam you should try this one now that the 2nd encoder fixes MR was merged. Both combined are fantastic. I'd be curious if you this also solves the remaining encoder hiccups you observed |
@dbuezas Can confirm your findings for my Currently running without |
The overlapping updates you observe are good news for this PR, the menu is updated while rendering. |
Sorry this has been hanging out so long. Everything here still stable with no interim changes stepping on anything? |
Description
Fix responsiveness when moving through marlin menus (U8GLIB). Affects menu_media / SD contents menu the most since that's slower to draw to begin with.
Also, for SCROLL_LONG_FILENAMES add guarding to avoid redrawing menu_media screen if there's nothing to scroll (further responsiveness improvement).
Benefits
Fixes this sort of bad responsiveness:
https://github.com/MarlinFirmware/Marlin/assets/299015/8481f501-3f48-4217-89c4-f821eaa73e12
Bad responsiveness that caused me to start the wrong print quite a few times.
The issue is caused by
drawing_screen
overriding the correct handling of button/encoder events (that callrefresh(LCDVIEW_REDRAW_NOW))
. This PR fixes that interference. There's still a corner case and that's handled by restarting the screen draw from the top (achieved withdrawing_screen = false
), prioritizing responsiveness.Requirements
HAS_MARLINUI_U8GLIB / ENABLED(DOGLCD)