瀏覽代碼

Merge pull request #1823 from AnHardt/splashscreen

Disable splash-screen when done once
Scott Lahteine 10 年之前
父節點
當前提交
d70a4a3847
共有 1 個檔案被更改,包括 14 行新增9 行删除
  1. 14
    9
      Marlin/dogm_lcd_implementation.h

+ 14
- 9
Marlin/dogm_lcd_implementation.h 查看文件

186
   return n;
186
   return n;
187
 }
187
 }
188
 
188
 
189
+static bool show_splashscreen = true;
190
+
189
 static void lcd_implementation_init()
191
 static void lcd_implementation_init()
190
 {
192
 {
191
   #ifdef LCD_PIN_BL // Enable LCD backlight
193
   #ifdef LCD_PIN_BL // Enable LCD backlight
219
 
221
 
220
 	u8g.firstPage();
222
 	u8g.firstPage();
221
 	do {
223
 	do {
222
-    u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
223
-    lcd_setFont(FONT_MENU);
224
-    #ifndef STRING_SPLASH_LINE2
225
-      u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
226
-    #else
227
-      int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
228
-      u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
229
-      u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
230
-    #endif
224
+    if (show_splashscreen) {
225
+      u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
226
+      lcd_setFont(FONT_MENU);
227
+      #ifndef STRING_SPLASH_LINE2
228
+        u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
229
+      #else
230
+        int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
231
+        u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
232
+        u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
233
+      #endif
234
+    }
231
 	} while (u8g.nextPage());
235
 	} while (u8g.nextPage());
236
+  show_splashscreen = false;
232
 }
237
 }
233
 
238
 
234
 static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
239
 static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop

Loading…
取消
儲存