|
@@ -3775,16 +3775,6 @@ void kill_screen(const char* lcd_msg) {
|
3775
|
3775
|
void lcd_sdcard_menu() {
|
3776
|
3776
|
ENCODER_DIRECTION_MENUS();
|
3777
|
3777
|
|
3778
|
|
- #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
|
3779
|
|
- static millis_t assume_print_finished = 0;
|
3780
|
|
- if (ELAPSED(millis(), assume_print_finished)) { // if the printer has been busy printing, lcd_sdcard_menu() should not
|
3781
|
|
- lcdDrawUpdate = LCDVIEW_REDRAW_NOW; // have been active for 5 seconds. In this case, restore the previous
|
3782
|
|
- encoderPosition = last_sdfile_encoderPosition; // encoderPosition to the last selected item.
|
3783
|
|
- assume_print_finished = millis() + 5000;
|
3784
|
|
- }
|
3785
|
|
- last_sdfile_encoderPosition = encoderPosition; // needed as a workaround for the 5s timer
|
3786
|
|
- #endif
|
3787
|
|
-
|
3788
|
3778
|
const uint16_t fileCnt = card.getnrfilenames();
|
3789
|
3779
|
START_MENU();
|
3790
|
3780
|
MENU_BACK(MSG_MAIN);
|
|
@@ -4744,18 +4734,13 @@ void lcd_update() {
|
4744
|
4734
|
// then we want to use 1/2 of the time only.
|
4745
|
4735
|
uint16_t bbr2 = planner.block_buffer_runtime() >> 1;
|
4746
|
4736
|
|
4747
|
|
- if (
|
4748
|
|
- #if ENABLED(DOGLCD)
|
4749
|
|
- (lcdDrawUpdate || drawing_screen) && (
|
4750
|
|
- !bbr2 || (bbr2 > max_display_update_time)
|
4751
|
|
- #if ENABLED(SDSUPPORT)
|
4752
|
|
- || currentScreen == lcd_sdcard_menu
|
4753
|
|
- #endif
|
4754
|
|
- )
|
4755
|
|
- #else
|
4756
|
|
- lcdDrawUpdate && (!bbr2 || (bbr2 > max_display_update_time))
|
4757
|
|
- #endif
|
4758
|
|
- ) {
|
|
4737
|
+ #if ENABLED(DOGLCD)
|
|
4738
|
+ #define IS_DRAWING drawing_screen
|
|
4739
|
+ #else
|
|
4740
|
+ #define IS_DRAWING false
|
|
4741
|
+ #endif
|
|
4742
|
+
|
|
4743
|
+ if ((lcdDrawUpdate || IS_DRAWING) && (!bbr2 || bbr2 > max_display_update_time)) {
|
4759
|
4744
|
#if ENABLED(DOGLCD)
|
4760
|
4745
|
if (!drawing_screen)
|
4761
|
4746
|
#endif
|