Browse Source

Merge Bootscreen Text (PR#24)

Richard Wackerbarth 9 years ago
parent
commit
e66ab97a3c

+ 1
- 0
Marlin/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 0
- 1
Marlin/Marlin_main.cpp View File

@@ -666,7 +666,6 @@ void setup() {
666 666
   Config_RetrieveSettings();
667 667
 
668 668
   lcd_init();
669
-  _delay_ms(1000);  // wait 1sec to display the splash screen
670 669
 
671 670
   tp_init();    // Initialize temperature loop
672 671
   plan_init();  // Initialize planner;

+ 1
- 0
Marlin/configurator/config/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 72
- 70
Marlin/dogm_bitmaps.h View File

@@ -3,77 +3,79 @@
3 3
 // Please note that using the high-res version takes 402Bytes of PROGMEM. 
4 4
 //#define START_BMPHIGH
5 5
 
6
-#if ENABLED(START_BMPHIGH)
7
-  #define START_BMPWIDTH      112
8
-  #define START_BMPHEIGHT      38
9
-  #define START_BMPBYTEWIDTH   14
10
-  #define START_BMPBYTES      532 // START_BMPWIDTH * START_BMPHEIGHT / 8
11
-  
12
-  const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
13
-     0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
14
-    ,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
15
-    ,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xff
16
-    ,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xff,0xff
17
-    ,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0xff
18
-    ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff
19
-    ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0xff
20
-    ,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x3f,0xff
21
-    ,0xc0,0x0f,0xc0,0xfc,0x00,0x00,0x00,0x00,0x00,0x78,0x18,0x00,0x1f,0xff
22
-    ,0xc0,0x3f,0xe1,0xff,0x00,0x00,0x00,0x00,0x00,0x78,0x3c,0x00,0x0f,0xff
23
-    ,0xc0,0x7f,0xf3,0xff,0x80,0x00,0x00,0x00,0x00,0x78,0x3c,0x00,0x07,0xff
24
-    ,0xc0,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x78,0x3c,0x00,0x03,0xff
25
-    ,0xc1,0xf8,0x7f,0x87,0xe0,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x01,0xff
26
-    ,0xc1,0xf0,0x3f,0x03,0xe0,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xff
27
-    ,0xc1,0xe0,0x1e,0x01,0xe0,0x1f,0x00,0x03,0xe0,0x78,0x3c,0x03,0xf0,0x7f
28
-    ,0xc1,0xe0,0x1e,0x01,0xe0,0x7f,0xc0,0x0f,0xf8,0x78,0x3c,0x07,0xfc,0x3f
29
-    ,0xc1,0xe0,0x1e,0x01,0xe1,0xff,0xe0,0x1f,0xfc,0x78,0x3c,0x0f,0xfe,0x1f
30
-    ,0xc1,0xe0,0x1e,0x01,0xe3,0xff,0xf0,0x3f,0xfe,0x78,0x3c,0x1f,0xfe,0x0f
31
-    ,0xc1,0xe0,0x1e,0x01,0xe3,0xf3,0xf8,0x3f,0x3e,0x78,0x3c,0x3f,0x3f,0x07
32
-    ,0xc1,0xe0,0x1e,0x01,0xe7,0xe0,0xfc,0x7c,0x1f,0x78,0x3c,0x3e,0x1f,0x07
33
-    ,0xc1,0xe0,0x1e,0x01,0xe7,0xc0,0x7c,0x7c,0x0f,0x78,0x3c,0x3c,0x0f,0x03
34
-    ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x7c,0x78,0x0f,0x78,0x3c,0x3c,0x0f,0x03
35
-    ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
36
-    ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
37
-    ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
38
-    ,0xc1,0xe0,0x1e,0x01,0xe7,0xc0,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
39
-    ,0xc1,0xe0,0x1e,0x01,0xe3,0xe0,0x3c,0x78,0x00,0x7c,0x3c,0x3c,0x0f,0x03
40
-    ,0xc1,0xe0,0x1e,0x01,0xe3,0xff,0x3f,0xf8,0x00,0x7f,0xbc,0x3c,0x0f,0x03
41
-    ,0xc1,0xe0,0x1e,0x01,0xe1,0xff,0x3f,0xf8,0x00,0x3f,0xbf,0xfc,0x0f,0x03
42
-    ,0xc1,0xe0,0x1e,0x01,0xe0,0xff,0x3f,0xf8,0x00,0x1f,0xbf,0xfc,0x0f,0x03
43
-    ,0xc1,0xe0,0x1e,0x01,0xe0,0x7f,0x3f,0xf8,0x00,0x0f,0xbf,0xfc,0x0f,0x03
44
-    ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07
45
-    ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06
46
-    ,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e
47
-    ,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1c
48
-    ,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78
49
-    ,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
50
-    ,0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80 };
51
-#else
52
-  #define START_BMPWIDTH 	    56 
53
-  #define START_BMPHEIGHT 	  19
54
-  #define START_BMPBYTEWIDTH  7
55
-  #define START_BMPBYTES      133 // START_BMPWIDTH * START_BMPHEIGHT / 8
6
+#if ENABLED(SHOW_BOOTSCREEN)
7
+  #if ENABLED(START_BMPHIGH)
8
+    #define START_BMPWIDTH      112
9
+    #define START_BMPHEIGHT      38
10
+    #define START_BMPBYTEWIDTH   14
11
+    #define START_BMPBYTES      532 // START_BMPWIDTH * START_BMPHEIGHT / 8
12
+
13
+    const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
14
+       0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
15
+      ,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
16
+      ,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xff
17
+      ,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xff,0xff
18
+      ,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0xff
19
+      ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff
20
+      ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0xff
21
+      ,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x3f,0xff
22
+      ,0xc0,0x0f,0xc0,0xfc,0x00,0x00,0x00,0x00,0x00,0x78,0x18,0x00,0x1f,0xff
23
+      ,0xc0,0x3f,0xe1,0xff,0x00,0x00,0x00,0x00,0x00,0x78,0x3c,0x00,0x0f,0xff
24
+      ,0xc0,0x7f,0xf3,0xff,0x80,0x00,0x00,0x00,0x00,0x78,0x3c,0x00,0x07,0xff
25
+      ,0xc0,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x78,0x3c,0x00,0x03,0xff
26
+      ,0xc1,0xf8,0x7f,0x87,0xe0,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x01,0xff
27
+      ,0xc1,0xf0,0x3f,0x03,0xe0,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xff
28
+      ,0xc1,0xe0,0x1e,0x01,0xe0,0x1f,0x00,0x03,0xe0,0x78,0x3c,0x03,0xf0,0x7f
29
+      ,0xc1,0xe0,0x1e,0x01,0xe0,0x7f,0xc0,0x0f,0xf8,0x78,0x3c,0x07,0xfc,0x3f
30
+      ,0xc1,0xe0,0x1e,0x01,0xe1,0xff,0xe0,0x1f,0xfc,0x78,0x3c,0x0f,0xfe,0x1f
31
+      ,0xc1,0xe0,0x1e,0x01,0xe3,0xff,0xf0,0x3f,0xfe,0x78,0x3c,0x1f,0xfe,0x0f
32
+      ,0xc1,0xe0,0x1e,0x01,0xe3,0xf3,0xf8,0x3f,0x3e,0x78,0x3c,0x3f,0x3f,0x07
33
+      ,0xc1,0xe0,0x1e,0x01,0xe7,0xe0,0xfc,0x7c,0x1f,0x78,0x3c,0x3e,0x1f,0x07
34
+      ,0xc1,0xe0,0x1e,0x01,0xe7,0xc0,0x7c,0x7c,0x0f,0x78,0x3c,0x3c,0x0f,0x03
35
+      ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x7c,0x78,0x0f,0x78,0x3c,0x3c,0x0f,0x03
36
+      ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
37
+      ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
38
+      ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
39
+      ,0xc1,0xe0,0x1e,0x01,0xe7,0xc0,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
40
+      ,0xc1,0xe0,0x1e,0x01,0xe3,0xe0,0x3c,0x78,0x00,0x7c,0x3c,0x3c,0x0f,0x03
41
+      ,0xc1,0xe0,0x1e,0x01,0xe3,0xff,0x3f,0xf8,0x00,0x7f,0xbc,0x3c,0x0f,0x03
42
+      ,0xc1,0xe0,0x1e,0x01,0xe1,0xff,0x3f,0xf8,0x00,0x3f,0xbf,0xfc,0x0f,0x03
43
+      ,0xc1,0xe0,0x1e,0x01,0xe0,0xff,0x3f,0xf8,0x00,0x1f,0xbf,0xfc,0x0f,0x03
44
+      ,0xc1,0xe0,0x1e,0x01,0xe0,0x7f,0x3f,0xf8,0x00,0x0f,0xbf,0xfc,0x0f,0x03
45
+      ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07
46
+      ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06
47
+      ,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e
48
+      ,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1c
49
+      ,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78
50
+      ,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
51
+      ,0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80 };
52
+  #else
53
+    #define START_BMPWIDTH      56
54
+    #define START_BMPHEIGHT     19
55
+    #define START_BMPBYTEWIDTH  7
56
+    #define START_BMPBYTES      133 // START_BMPWIDTH * START_BMPHEIGHT / 8
56 57
 
57
-  const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
58
-     0x1f,0xff,0xff,0xff,0xff,0xff,0xff
59
-    ,0x60,0x00,0x00,0x00,0x00,0x01,0xff
60
-    ,0x40,0x00,0x00,0x00,0x00,0x00,0xff
61
-    ,0x80,0x00,0x00,0x00,0x00,0x00,0x7f
62
-    ,0x83,0xcf,0x00,0x00,0x0c,0x30,0x3f
63
-    ,0x87,0xff,0x80,0x00,0x0c,0x30,0x1f
64
-    ,0x86,0x79,0x80,0x00,0x0c,0x00,0x0f
65
-    ,0x8c,0x30,0xc7,0x83,0x8c,0x30,0xe7
66
-    ,0x8c,0x30,0xcf,0xc7,0xcc,0x31,0xf3
67
-    ,0x8c,0x30,0xdc,0xec,0xec,0x33,0xb9
68
-    ,0x8c,0x30,0xd8,0x6c,0x6c,0x33,0x19
69
-    ,0x8c,0x30,0xd0,0x6c,0x0c,0x33,0x19
70
-    ,0x8c,0x30,0xd8,0x6c,0x0c,0x33,0x19
71
-    ,0x8c,0x30,0xdc,0x6c,0x0e,0x3b,0x19
72
-    ,0x8c,0x30,0xcf,0x7c,0x07,0x9f,0x19
73
-    ,0x8c,0x30,0xc7,0x7c,0x03,0x8f,0x19
74
-    ,0x40,0x00,0x00,0x00,0x00,0x00,0x02
75
-    ,0x60,0x00,0x00,0x00,0x00,0x00,0x06
76
-    ,0x1f,0xff,0xff,0xff,0xff,0xff,0xf8 };
58
+    const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
59
+       0x1f,0xff,0xff,0xff,0xff,0xff,0xff
60
+      ,0x60,0x00,0x00,0x00,0x00,0x01,0xff
61
+      ,0x40,0x00,0x00,0x00,0x00,0x00,0xff
62
+      ,0x80,0x00,0x00,0x00,0x00,0x00,0x7f
63
+      ,0x83,0xcf,0x00,0x00,0x0c,0x30,0x3f
64
+      ,0x87,0xff,0x80,0x00,0x0c,0x30,0x1f
65
+      ,0x86,0x79,0x80,0x00,0x0c,0x00,0x0f
66
+      ,0x8c,0x30,0xc7,0x83,0x8c,0x30,0xe7
67
+      ,0x8c,0x30,0xcf,0xc7,0xcc,0x31,0xf3
68
+      ,0x8c,0x30,0xdc,0xec,0xec,0x33,0xb9
69
+      ,0x8c,0x30,0xd8,0x6c,0x6c,0x33,0x19
70
+      ,0x8c,0x30,0xd0,0x6c,0x0c,0x33,0x19
71
+      ,0x8c,0x30,0xd8,0x6c,0x0c,0x33,0x19
72
+      ,0x8c,0x30,0xdc,0x6c,0x0e,0x3b,0x19
73
+      ,0x8c,0x30,0xcf,0x7c,0x07,0x9f,0x19
74
+      ,0x8c,0x30,0xc7,0x7c,0x03,0x8f,0x19
75
+      ,0x40,0x00,0x00,0x00,0x00,0x00,0x02
76
+      ,0x60,0x00,0x00,0x00,0x00,0x00,0x06
77
+      ,0x1f,0xff,0xff,0xff,0xff,0xff,0xf8 };
78
+  #endif
77 79
 #endif
78 80
 
79 81
 // Here comes a compile-time operation to match the extruder symbols 

+ 37
- 30
Marlin/dogm_lcd_implementation.h View File

@@ -190,14 +190,16 @@ char lcd_printPGM(const char* str) {
190 190
   return n;
191 191
 }
192 192
 
193
-static bool show_splashscreen = true;
193
+#if ENABLED(SHOW_BOOTSCREEN)
194
+  static bool show_bootscreen = true;
195
+#endif
194 196
 
195 197
 /* Warning: This function is called from interrupt context */
196 198
 static void lcd_implementation_init() {
197 199
 
198 200
   #if ENABLED(LCD_PIN_BL) // Enable LCD backlight
199 201
     pinMode(LCD_PIN_BL, OUTPUT);
200
-	  digitalWrite(LCD_PIN_BL, HIGH);
202
+    digitalWrite(LCD_PIN_BL, HIGH);
201 203
   #endif
202 204
 
203 205
   #if ENABLED(LCD_PIN_RESET)
@@ -207,44 +209,49 @@ static void lcd_implementation_init() {
207 209
   #ifndef MINIPANEL//setContrast not working for Mini Panel
208 210
     u8g.setContrast(lcd_contrast);	
209 211
   #endif
210
-	// FIXME: remove this workaround
212
+  // FIXME: remove this workaround
211 213
   // Uncomment this if you have the first generation (V1.10) of STBs board
212
-  // pinMode(17, OUTPUT);	// Enable LCD backlight
214
+  // pinMode(17, OUTPUT); // Enable LCD backlight
213 215
   // digitalWrite(17, HIGH);
214 216
 
215 217
   #if ENABLED(LCD_SCREEN_ROT_90)
216 218
     u8g.setRot90();   // Rotate screen by 90°
217 219
   #elif ENABLED(LCD_SCREEN_ROT_180)
218
-    u8g.setRot180();	// Rotate screen by 180°
220
+    u8g.setRot180();  // Rotate screen by 180°
219 221
   #elif ENABLED(LCD_SCREEN_ROT_270)
220
-    u8g.setRot270();	// Rotate screen by 270°
221
-  #endif
222
-	
223
-  // Show splashscreen
224
-  int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
225
-  #if ENABLED(START_BMPHIGH)
226
-    int offy = 0;
227
-  #else
228
-    int offy = DOG_CHAR_HEIGHT;
222
+    u8g.setRot270();  // Rotate screen by 270°
229 223
   #endif
230 224
 
231
-  int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1)*DOG_CHAR_WIDTH) / 2;
232
-
233
-	u8g.firstPage();
234
-  do {
235
-    if (show_splashscreen) {
236
-      u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
237
-      lcd_setFont(FONT_MENU);
238
-      #ifndef STRING_SPLASH_LINE2
239
-        u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
240
-      #else
241
-        int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
242
-        u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
243
-        u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
244
-      #endif
225
+  #if ENABLED(SHOW_BOOTSCREEN)
226
+    int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
227
+    #if ENABLED(START_BMPHIGH)
228
+      int offy = 0;
229
+    #else
230
+      int offy = DOG_CHAR_HEIGHT;
231
+    #endif
232
+
233
+    int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1)*DOG_CHAR_WIDTH) / 2;
234
+
235
+    u8g.firstPage();
236
+    do {
237
+      if (show_bootscreen) {
238
+        u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
239
+        lcd_setFont(FONT_MENU);
240
+        #ifndef STRING_SPLASH_LINE2
241
+          u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
242
+        #else
243
+          int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
244
+          u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
245
+          u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
246
+        #endif
247
+      }
248
+    } while (u8g.nextPage());
249
+
250
+    if (show_bootscreen) {
251
+      delay(1000);
252
+      show_bootscreen = false;
245 253
     }
246
-  } while (u8g.nextPage());
247
-  show_splashscreen = false;
254
+  #endif
248 255
 }
249 256
 
250 257
 static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop

+ 1
- 0
Marlin/example_configurations/Felix/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/K8200/Configuration.h View File

@@ -53,6 +53,7 @@ Here are some standard links for getting your machine calibrated:
53 53
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
54 54
 // build by the user have been successfully uploaded into firmware.
55 55
 #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
56
+#define SHOW_BOOTSCREEN
56 57
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
57 58
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
58 59
 

+ 1
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -73,6 +73,7 @@ Here are some standard links for getting your machine calibrated:
73 73
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
74 74
 // build by the user have been successfully uploaded into firmware.
75 75
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
76
+#define SHOW_BOOTSCREEN
76 77
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
77 78
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
78 79
 

+ 1
- 0
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -52,6 +52,7 @@ Here are some standard links for getting your machine calibrated:
52 52
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
53 53
 // build by the user have been successfully uploaded into firmware.
54 54
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
55
+#define SHOW_BOOTSCREEN
55 56
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
56 57
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
57 58
 

+ 1
- 0
Marlin/example_configurations/makibox/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 1
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
48 48
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
49 49
 // build by the user have been successfully uploaded into firmware.
50 50
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
51
+#define SHOW_BOOTSCREEN
51 52
 #define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
52 53
 //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
53 54
 

+ 94
- 0
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

@@ -193,6 +193,11 @@
193 193
 
194 194
 #include "utf_mapper.h"
195 195
 
196
+#if ENABLED(SHOW_BOOTSCREEN)
197
+  static void bootscreen();
198
+  static bool show_bootscreen = true;
199
+#endif
200
+
196 201
 #if ENABLED(LCD_PROGRESS_BAR)
197 202
   static millis_t progress_bar_ms = 0;
198 203
   #if PROGRESS_MSG_EXPIRE > 0
@@ -377,6 +382,10 @@ static void lcd_implementation_init(
377 382
     lcd.begin(LCD_WIDTH, LCD_HEIGHT);
378 383
   #endif
379 384
 
385
+  #if ENABLED(SHOW_BOOTSCREEN)
386
+    if (show_bootscreen) bootscreen();
387
+  #endif
388
+
380 389
   lcd_set_custom_characters(
381 390
     #if ENABLED(LCD_PROGRESS_BAR)
382 391
       progress_bar_set
@@ -404,6 +413,91 @@ char lcd_print(char* str) {
404 413
 
405 414
 unsigned lcd_print(char c) { return charset_mapper(c); }
406 415
 
416
+#if ENABLED(SHOW_BOOTSCREEN)
417
+  void lcd_erase_line(int line) {
418
+    lcd.setCursor(0, 3);
419
+    for (int i=0; i < LCD_WIDTH; i++)
420
+      lcd_print(' ');
421
+  }
422
+
423
+  // scrol the PSTR'text' in a 'len' wide field for 'time' milliseconds at position col,line
424
+  void lcd_scroll(int col, int line, const char * text, int len, int time) {
425
+    char tmp[LCD_WIDTH+1] = {0};
426
+    int n = max(lcd_strlen_P(text) - len, 0);
427
+    for (int i = 0; i <= n; i++) {
428
+      strncpy_P(tmp, text+i, min(len, LCD_WIDTH));
429
+      lcd.setCursor(col, line);
430
+      lcd_print(tmp);
431
+      delay(time / max(n, 1));
432
+    }
433
+  }
434
+
435
+  static void bootscreen() {
436
+    show_bootscreen = false;
437
+    byte top_left[8] = {
438
+      B00000,
439
+      B00000,
440
+      B00000,
441
+      B00000,
442
+      B00001,
443
+      B00010,
444
+      B00100,
445
+      B00100
446
+    };
447
+    byte top_right[8] = {
448
+      B00000,
449
+      B00000,
450
+      B00000,
451
+      B11100,
452
+      B11100,
453
+      B01100,
454
+      B00100,
455
+      B00100
456
+    };
457
+    byte botom_left[8] = {
458
+      B00100,
459
+      B00010,
460
+      B00001,
461
+      B00000,
462
+      B00000,
463
+      B00000,
464
+      B00000,
465
+      B00000
466
+    };
467
+    byte botom_right[8] = {
468
+      B00100,
469
+      B01000,
470
+      B10000,
471
+      B00000,
472
+      B00000,
473
+      B00000,
474
+      B00000,
475
+      B00000
476
+    };
477
+    lcd.createChar(0, top_left);
478
+    lcd.createChar(1, top_right);
479
+    lcd.createChar(2, botom_left);
480
+    lcd.createChar(3, botom_right);
481
+
482
+    lcd.clear();
483
+
484
+    #define TEXT_SCREEN_LOGO_SHIFT ((LCD_WIDTH/2) - 4)
485
+    lcd.setCursor(TEXT_SCREEN_LOGO_SHIFT, 0); lcd.print('\x00'); lcd_printPGM(PSTR( "------" ));  lcd.print('\x01');
486
+    lcd.setCursor(TEXT_SCREEN_LOGO_SHIFT, 1);                    lcd_printPGM(PSTR("|Marlin|"));
487
+    lcd.setCursor(TEXT_SCREEN_LOGO_SHIFT, 2); lcd.print('\x02'); lcd_printPGM(PSTR( "------" ));  lcd.print('\x03');
488
+
489
+    lcd_scroll(0, 3, PSTR("www.marlinfirmware.org"), LCD_WIDTH, 3000);
490
+
491
+    #ifdef STRING_SPLASH_LINE1
492
+      lcd_erase_line(3);
493
+      lcd_scroll(0, 3, PSTR(STRING_SPLASH_LINE1), LCD_WIDTH, 1000);
494
+    #endif
495
+    #ifdef STRING_SPLASH_LINE2
496
+      lcd_erase_line(3);
497
+      lcd_scroll(0, 3, PSTR(STRING_SPLASH_LINE2), LCD_WIDTH, 1000);
498
+    #endif
499
+  }
500
+#endif // SHOW_BOOTSCREEN
407 501
 /*
408 502
 Possible status screens:
409 503
 16x2   |000/000 B000/000|

Loading…
Cancel
Save