Update marlinui.cpp

This commit is contained in:
Scott Lahteine 2020-11-12 22:46:28 -06:00 committed by GitHub
parent 64989d6fbe
commit 3f7327c279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1009,14 +1009,8 @@ void MarlinUI::update() {
// If scrolling of long file names is enabled and we are in the sd card menu, // 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. // cause a refresh to occur until all the text has scrolled into view.
if (currentScreen == menu_media && !lcd_status_update_delay--) { if (currentScreen == menu_media && !lcd_status_update_delay--) {
lcd_status_update_delay = 4; lcd_status_update_delay = ++filename_scroll_pos >= filename_scroll_max ? 12 : 4; // Long delay at end and start
filename_scroll_pos++; if (filename_scroll_max < filename_scroll_pos) filename_scroll_pos = 0;
if (filename_scroll_pos == filename_scroll_max){
lcd_status_update_delay = 12;
} else if (filename_scroll_pos > filename_scroll_max) {
filename_scroll_pos = 0;
lcd_status_update_delay = 12;
}
refresh(LCDVIEW_REDRAW_NOW); refresh(LCDVIEW_REDRAW_NOW);
RESET_STATUS_TIMEOUT(); RESET_STATUS_TIMEOUT();
} }