Codestyle tweaks to ultralcd.cpp

This commit is contained in:
Scott Lahteine 2016-12-14 04:20:33 -08:00 committed by GitHub
parent 8d9fcd8e6f
commit 67ca6c7bfe

View File

@ -2981,9 +2981,9 @@ void lcd_update() {
millis_t bbr = planner.block_buffer_runtime();
#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
if (lcdDrawUpdate && (!bbr || (bbr > max_display_update_time * 2000)))
if (lcdDrawUpdate && (!bbr || (bbr > 2 * max_display_update_time * 1000)))
#endif
{
#if ENABLED(DOGLCD)
@ -3016,13 +3016,13 @@ void lcd_update() {
lcd_setFont(FONT_MENU);
CURRENTSCREEN();
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;
}
#else
CURRENTSCREEN();
#endif
max_display_update_time = max(max_display_update_time, millis() - ms);
NOLESS(max_display_update_time, millis() - ms);
}
#if ENABLED(ULTIPANEL)