|
@ -2707,27 +2707,32 @@ void lcd_update() { |
|
|
} |
|
|
} |
|
|
#endif // ULTIPANEL
|
|
|
#endif // ULTIPANEL
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(ENSURE_SMOOTH_MOVES) && ENABLED(ALWAYS_ALLOW_MENU) |
|
|
|
|
|
#define STATUS_UPDATE_CONDITION planner.long_move() |
|
|
|
|
|
#else |
|
|
|
|
|
#define STATUS_UPDATE_CONDITION true |
|
|
|
|
|
#endif |
|
|
|
|
|
#if ENABLED(ENSURE_SMOOTH_MOVES) && DISABLED(ALWAYS_ALLOW_MENU) |
|
|
|
|
|
#define LCD_HANDLER_CONDITION planner.long_move() |
|
|
|
|
|
#else |
|
|
|
|
|
#define LCD_HANDLER_CONDITION true |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
// We arrive here every ~100ms when idling often enough.
|
|
|
// We arrive here every ~100ms when idling often enough.
|
|
|
// Instead of tracking the changes simply redraw the Info Screen ~1 time a second.
|
|
|
// Instead of tracking the changes simply redraw the Info Screen ~1 time a second.
|
|
|
static int8_t lcd_status_update_delay = 1; // first update one loop delayed
|
|
|
static int8_t lcd_status_update_delay = 1; // first update one loop delayed
|
|
|
#if ENABLED(ENSURE_SMOOTH_MOVES) && ENABLED(ALWAYS_ALLOW_MENU) |
|
|
if (STATUS_UPDATE_CONDITION && |
|
|
if (planner.long_move()) { |
|
|
|
|
|
#endif |
|
|
|
|
|
if ( |
|
|
|
|
|
#if ENABLED(ULTIPANEL) |
|
|
#if ENABLED(ULTIPANEL) |
|
|
currentScreen == lcd_status_screen && |
|
|
currentScreen == lcd_status_screen && |
|
|
#endif |
|
|
#endif |
|
|
!lcd_status_update_delay--) { |
|
|
!lcd_status_update_delay-- |
|
|
|
|
|
) { |
|
|
lcd_status_update_delay = 9; |
|
|
lcd_status_update_delay = 9; |
|
|
lcdDrawUpdate = LCDVIEW_REDRAW_NOW; |
|
|
lcdDrawUpdate = LCDVIEW_REDRAW_NOW; |
|
|
} |
|
|
} |
|
|
#if ENABLED(ENSURE_SMOOTH_MOVES) && ENABLED(ALWAYS_ALLOW_MENU) |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(ENSURE_SMOOTH_MOVES) && DISABLED(ALWAYS_ALLOW_MENU) |
|
|
if (LCD_HANDLER_CONDITION) { |
|
|
if (planner.long_move()) { |
|
|
|
|
|
#endif |
|
|
|
|
|
if (lcdDrawUpdate) { |
|
|
if (lcdDrawUpdate) { |
|
|
|
|
|
|
|
|
switch (lcdDrawUpdate) { |
|
|
switch (lcdDrawUpdate) { |
|
@ -2740,7 +2745,7 @@ void lcd_update() { |
|
|
case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT
|
|
|
case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT
|
|
|
case LCDVIEW_NONE: |
|
|
case LCDVIEW_NONE: |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} // switch
|
|
|
|
|
|
|
|
|
#if ENABLED(ULTIPANEL) |
|
|
#if ENABLED(ULTIPANEL) |
|
|
#define CURRENTSCREEN() (*currentScreen)(), lcd_clicked = false |
|
|
#define CURRENTSCREEN() (*currentScreen)(), lcd_clicked = false |
|
@ -2786,11 +2791,10 @@ void lcd_update() { |
|
|
break; |
|
|
break; |
|
|
case LCDVIEW_NONE: |
|
|
case LCDVIEW_NONE: |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} // switch
|
|
|
|
|
|
|
|
|
|
|
|
} // LCD_HANDLER_CONDITION
|
|
|
|
|
|
|
|
|
#if ENABLED(ENSURE_SMOOTH_MOVES) && DISABLED(ALWAYS_ALLOW_MENU) |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|