Codestyle tweaks to ultralcd.cpp

2.0.x
Scott Lahteine 8 years ago committed by GitHub
parent 8d9fcd8e6f
commit 67ca6c7bfe

@ -2970,9 +2970,9 @@ void lcd_update() {
!lcd_status_update_delay-- !lcd_status_update_delay--
) { ) {
lcd_status_update_delay = 9 lcd_status_update_delay = 9
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
+ 3 + 3
#endif #endif
; ;
max_display_update_time--; max_display_update_time--;
lcdDrawUpdate = LCDVIEW_REDRAW_NOW; lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
@ -2981,9 +2981,9 @@ void lcd_update() {
millis_t bbr = planner.block_buffer_runtime(); millis_t bbr = planner.block_buffer_runtime();
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
if ((lcdDrawUpdate || drawing_screen) && (!bbr || (bbr > max_display_update_time * 2000))) if ((lcdDrawUpdate || drawing_screen) && (!bbr || (bbr > 2 * max_display_update_time * 1000)))
#else #else
if (lcdDrawUpdate && (!bbr || (bbr > max_display_update_time * 2000))) if (lcdDrawUpdate && (!bbr || (bbr > 2 * max_display_update_time * 1000)))
#endif #endif
{ {
#if ENABLED(DOGLCD) #if ENABLED(DOGLCD)
@ -3016,13 +3016,13 @@ void lcd_update() {
lcd_setFont(FONT_MENU); lcd_setFont(FONT_MENU);
CURRENTSCREEN(); CURRENTSCREEN();
if (drawing_screen && (drawing_screen = u8g.nextPage())) { if (drawing_screen && (drawing_screen = u8g.nextPage())) {
max_display_update_time = max(max_display_update_time, millis() - ms); NOLESS(max_display_update_time, millis() - ms);
return; return;
} }
#else #else
CURRENTSCREEN(); CURRENTSCREEN();
#endif #endif
max_display_update_time = max(max_display_update_time, millis() - ms); NOLESS(max_display_update_time, millis() - ms);
} }
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)

Loading…
Cancel
Save