Browse Source

Made centering of bootlogo work and removed contraproductiv setScale2x2() in dogm_lcd_implementation.h

AnHardt 10 years ago
parent
commit
aa48056c03
1 changed files with 3 additions and 8 deletions
  1. 3
    8
      Marlin/dogm_lcd_implementation.h

+ 3
- 8
Marlin/dogm_lcd_implementation.h View File

117
 	} while(u8g.nextPage());
117
 	} while(u8g.nextPage());
118
 
118
 
119
   // Show splashscreen
119
   // Show splashscreen
120
-  int off = (u8g.getWidth() - START_BMPWIDTH) / 2;
120
+  int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
121
+  int offy = (u8g.getHeight() - 18 - START_BMPHEIGHT) / 2;
121
   int txtX = (u8g.getWidth() - (sizeof(STRING_SPLASH) - 1)*5) / 2; // 5 is fontwidth in pixel
122
   int txtX = (u8g.getWidth() - (sizeof(STRING_SPLASH) - 1)*5) / 2; // 5 is fontwidth in pixel
122
   int txtY = u8g.getHeight() - 10;
123
   int txtY = u8g.getHeight() - 10;
123
 	u8g.firstPage();
124
 	u8g.firstPage();
124
 	do {
125
 	do {
125
-    #ifdef START_BMPHIGH
126
-		  u8g.drawBitmapP(off, off, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
127
-    #else
128
-      u8g.setScale2x2();
129
-		  u8g.drawBitmapP(off, off, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
130
-      u8g.undoScale();
131
-    #endif
126
+	  u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
132
 			
127
 			
133
     u8g.setFont(u8g_font_5x8);
128
     u8g.setFont(u8g_font_5x8);
134
 		u8g.drawStr(txtX, txtY, STRING_SPLASH);
129
 		u8g.drawStr(txtX, txtY, STRING_SPLASH);

Loading…
Cancel
Save