Continuous filename scrolling (#13609)

This commit is contained in:
Robby Candra 2019-04-08 04:58:32 +07:00 committed by Scott Lahteine
parent c29820f649
commit 81c2c3ec11

View file

@ -809,10 +809,13 @@ void MarlinUI::update() {
#if HAS_LCD_MENU && ENABLED(SCROLL_LONG_FILENAMES)
// If scrolling of long file names is enabled and we are in the sd card menu,
// cause a refresh to occur until all the text has scrolled into view.
if (currentScreen == menu_sdcard && filename_scroll_pos < filename_scroll_max && !lcd_status_update_delay--) {
lcd_status_update_delay = 6;
if (currentScreen == menu_sdcard && !lcd_status_update_delay--) {
lcd_status_update_delay = 4;
if (++filename_scroll_pos > filename_scroll_max) {
filename_scroll_pos = 0;
lcd_status_update_delay = 12;
}
refresh(LCDVIEW_REDRAW_NOW);
filename_scroll_pos++;
#if LCD_TIMEOUT_TO_STATUS
return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS;
#endif