Revert "Draw content in display loop only when needed"

This reverts commit bf04a92cc0.
2.0.x
AnHardt 10 years ago
parent bf04a92cc0
commit d521693641

@ -186,7 +186,7 @@ char lcd_printPGM(const char* str) {
return n; return n;
} }
int8_t show_splashscreen = 2; static int8_t show_splashscreed = 2;
static void lcd_implementation_init() static void lcd_implementation_init()
{ {
@ -221,25 +221,18 @@ static void lcd_implementation_init()
u8g.firstPage(); u8g.firstPage();
do { do {
switch (show_splashscreen) { if (show_splashscreed) {
case 2 : { u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp); lcd_setFont(FONT_MENU);
break; #ifndef STRING_SPLASH_LINE2
} u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
case 1 : { #else
lcd_setFont(FONT_MENU); int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
#ifndef STRING_SPLASH_LINE2 u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1); u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
#else #endif
int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2; show_splashscreed--;
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1); }
u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
#endif
break;
}
break;
}
if (show_splashscreen) show_splashscreen--;
} while (u8g.nextPage()); } while (u8g.nextPage());
} }

Loading…
Cancel
Save