Browse Source

Merge pull request #1348 from stv0g/LogoLCD

Adding new Marlin to splash screen
Bo Herrmannsen 10 years ago
parent
commit
1d4af46496

BIN
Documentation/Logo/Marlin Logo LCD High.png View File


BIN
Documentation/Logo/Marlin Logo LCD Low.png View File


+ 3
- 0
Marlin/Configuration.h View File

@@ -24,8 +24,11 @@
24 24
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
25 25
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
26 26
 // build by the user have been successfully uploaded into firmware.
27
+#define STRING_VERSION "v1.0.2"
28
+#define STRING_URL "reprap.org"
27 29
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
28 30
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
31
+#define STRING_SPLASH STRING_VERSION " - " STRING_URL // will be shown during bootup
29 32
 
30 33
 // SERIAL_PORT selects which serial port should be used for communication with the host.
31 34
 // This allows the connection of wireless adapters (for instance) to non-default port pins.

+ 75
- 25
Marlin/DOGMbitmaps.h View File

@@ -1,28 +1,78 @@
1
-#define START_BMPWIDTH 	60	//Width in pixels - http://www.digole.com/tools/PicturetoC_Hex_converter.php
2
-#define START_BMPHEIGHT 	64	//Height in pixels
3
-#define START_BMPBYTEWIDTH 	8	//Width in bytes
4
-const unsigned char start_bmp[574] PROGMEM = { //AVR-GCC, WinAVR
5
-0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
6
-0x30,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,
7
-0x40,0x00,0x00,0x00,0x00,0x00,0x1f,0xff,
8
-0xc0,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,
9
-0x80,0x83,0x00,0x00,0x01,0x80,0x07,0xff,
10
-0x83,0xef,0xc0,0x00,0x01,0x8c,0x03,0xff,
11
-0x87,0xff,0xe0,0x00,0x01,0x8c,0x01,0xff,
12
-0x8e,0x38,0x60,0x00,0x01,0x80,0x00,0xff,
13
-0x8c,0x18,0x67,0xe0,0xf9,0x8c,0x7e,0x7f,
14
-0x8c,0x18,0x6f,0xf1,0xfd,0x8c,0xfe,0x3f,
15
-0x8c,0x18,0x6e,0x31,0x8d,0x8c,0xc7,0x1f,
16
-0x8c,0x18,0x6c,0x39,0x8d,0x8c,0xc3,0x1f,
17
-0x8c,0x18,0x6c,0x19,0x81,0x8c,0xc3,0x1f,
18
-0x8c,0x18,0x6e,0x19,0x81,0x8c,0xc3,0x1f,
19
-0x8c,0x18,0x6f,0x9f,0x81,0xef,0xc3,0x1f,
20
-0x8c,0x18,0x67,0xdf,0x80,0xef,0xc3,0x1f,
21
-0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,
22
-0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,
23
-0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,
24
-0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0x8f
25
-};
1
+// BitMap for splashscreen
2
+// Generated with: http://www.digole.com/tools/PicturetoC_Hex_converter.php
3
+// Please note that using the high-res version takes about 0.5KB of 
4
+#ifdef START_BMPHIGH
5
+  #define START_BMPWIDTH      112
6
+  #define START_BMPHEIGHT      38
7
+  #define START_BMPBYTEWIDTH   14
8
+  #define START_BMPBYTES      532 // START_BMPWIDTH * START_BMPHEIGHT / 8
9
+  
10
+  const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
11
+     0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
12
+    ,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
13
+    ,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xff
14
+    ,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xff,0xff
15
+    ,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0xff
16
+    ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff
17
+    ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0xff
18
+    ,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x3f,0xff
19
+    ,0xc0,0x0f,0xc0,0xfc,0x00,0x00,0x00,0x00,0x00,0x78,0x18,0x00,0x1f,0xff
20
+    ,0xc0,0x3f,0xe1,0xff,0x00,0x00,0x00,0x00,0x00,0x78,0x3c,0x00,0x0f,0xff
21
+    ,0xc0,0x7f,0xf3,0xff,0x80,0x00,0x00,0x00,0x00,0x78,0x3c,0x00,0x07,0xff
22
+    ,0xc0,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x78,0x3c,0x00,0x03,0xff
23
+    ,0xc1,0xf8,0x7f,0x87,0xe0,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x01,0xff
24
+    ,0xc1,0xf0,0x3f,0x03,0xe0,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xff
25
+    ,0xc1,0xe0,0x1e,0x01,0xe0,0x1f,0x00,0x03,0xe0,0x78,0x3c,0x03,0xf0,0x7f
26
+    ,0xc1,0xe0,0x1e,0x01,0xe0,0x7f,0xc0,0x0f,0xf8,0x78,0x3c,0x07,0xfc,0x3f
27
+    ,0xc1,0xe0,0x1e,0x01,0xe1,0xff,0xe0,0x1f,0xfc,0x78,0x3c,0x0f,0xfe,0x1f
28
+    ,0xc1,0xe0,0x1e,0x01,0xe3,0xff,0xf0,0x3f,0xfe,0x78,0x3c,0x1f,0xfe,0x0f
29
+    ,0xc1,0xe0,0x1e,0x01,0xe3,0xf3,0xf8,0x3f,0x3e,0x78,0x3c,0x3f,0x3f,0x07
30
+    ,0xc1,0xe0,0x1e,0x01,0xe7,0xe0,0xfc,0x7c,0x1f,0x78,0x3c,0x3e,0x1f,0x07
31
+    ,0xc1,0xe0,0x1e,0x01,0xe7,0xc0,0x7c,0x7c,0x0f,0x78,0x3c,0x3c,0x0f,0x03
32
+    ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x7c,0x78,0x0f,0x78,0x3c,0x3c,0x0f,0x03
33
+    ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
34
+    ,0xc1,0xe0,0x1e,0x01,0xe7,0x80,0x3c,0x78,0x00,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,0xc0,0x3c,0x78,0x00,0x78,0x3c,0x3c,0x0f,0x03
37
+    ,0xc1,0xe0,0x1e,0x01,0xe3,0xe0,0x3c,0x78,0x00,0x7c,0x3c,0x3c,0x0f,0x03
38
+    ,0xc1,0xe0,0x1e,0x01,0xe3,0xff,0x3f,0xf8,0x00,0x7f,0xbc,0x3c,0x0f,0x03
39
+    ,0xc1,0xe0,0x1e,0x01,0xe1,0xff,0x3f,0xf8,0x00,0x3f,0xbf,0xfc,0x0f,0x03
40
+    ,0xc1,0xe0,0x1e,0x01,0xe0,0xff,0x3f,0xf8,0x00,0x1f,0xbf,0xfc,0x0f,0x03
41
+    ,0xc1,0xe0,0x1e,0x01,0xe0,0x7f,0x3f,0xf8,0x00,0x0f,0xbf,0xfc,0x0f,0x03
42
+    ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07
43
+    ,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06
44
+    ,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e
45
+    ,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1c
46
+    ,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78
47
+    ,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
48
+    ,0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80 };
49
+#else
50
+  #define START_BMPWIDTH 	    56 
51
+  #define START_BMPHEIGHT 	  19
52
+  #define START_BMPBYTEWIDTH  7
53
+  #define START_BMPBYTES      133 // START_BMPWIDTH * START_BMPHEIGHT / 8
54
+
55
+  const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
56
+     0x1f,0xff,0xff,0xff,0xff,0xff,0xff
57
+    ,0x60,0x00,0x00,0x00,0x00,0x01,0xff
58
+    ,0x40,0x00,0x00,0x00,0x00,0x00,0xff
59
+    ,0x80,0x00,0x00,0x00,0x00,0x00,0x7f
60
+    ,0x83,0xcf,0x00,0x00,0x0c,0x30,0x3f
61
+    ,0x87,0xff,0x80,0x00,0x0c,0x30,0x1f
62
+    ,0x86,0x79,0x80,0x00,0x0c,0x00,0x0f
63
+    ,0x8c,0x30,0xc7,0x83,0x8c,0x30,0xe7
64
+    ,0x8c,0x30,0xcf,0xc7,0xcc,0x31,0xf3
65
+    ,0x8c,0x30,0xdc,0xec,0xec,0x33,0xb9
66
+    ,0x8c,0x30,0xd8,0x6c,0x6c,0x33,0x19
67
+    ,0x8c,0x30,0xd0,0x6c,0x0c,0x33,0x19
68
+    ,0x8c,0x30,0xd8,0x6c,0x0c,0x33,0x19
69
+    ,0x8c,0x30,0xdc,0x6c,0x0e,0x3b,0x19
70
+    ,0x8c,0x30,0xcf,0x7c,0x07,0x9f,0x19
71
+    ,0x8c,0x30,0xc7,0x7c,0x03,0x8f,0x19
72
+    ,0x40,0x00,0x00,0x00,0x00,0x00,0x02
73
+    ,0x60,0x00,0x00,0x00,0x00,0x00,0x06
74
+    ,0x1f,0xff,0xff,0xff,0xff,0xff,0xf8 };
75
+#endif
26 76
 
27 77
 // Here comes a compile-time operation to match the extruder symbols 
28 78
 // on the info screen to the set number of extruders in configuration.h

+ 43
- 36
Marlin/dogm_lcd_implementation.h View File

@@ -86,46 +86,53 @@ U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
86 86
 U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
87 87
 #endif
88 88
 
89
-static void lcd_implementation_init() {
90
-  #ifdef LCD_PIN_BL
91
-    pinMode(LCD_PIN_BL, OUTPUT);  // Enable LCD backlight
92
-    digitalWrite(LCD_PIN_BL, HIGH);
89
+static void lcd_implementation_init()
90
+{
91
+  #ifdef LCD_PIN_BL // Enable LCD backlight
92
+    pinMode(LCD_PIN_BL, OUTPUT);
93
+	  digitalWrite(LCD_PIN_BL, HIGH);
93 94
   #endif
94 95
 
95
-  u8g.setContrast(lcd_contrast);
96
-
97
-  /*
98
-    // Uncomment this if you have the first generation (V1.10) of STBs board
99
-
100
-    pinMode(17, OUTPUT);  // Enable LCD backlight
101
-    digitalWrite(17, HIGH);
102
-
103
-  //*/
104
-
105
-  u8g.firstPage();
106
-  do {
107
-    u8g.setFont(u8g_font_6x10_marlin);
108
-    u8g.setColorIndex(1);
109
-    u8g.drawBox (0, 0, u8g.getWidth(), u8g.getHeight());
110
-    u8g.setColorIndex(1);
111
-  } while( u8g.nextPage() );
112
-
113
-  #if defined(LCD_SCREEN_ROT_90)
114
-    u8g.setRot90();  // Rotate screen by  90°
115
-  #elif defined(LCD_SCREEN_ROT_180)
116
-    u8g.setRot180(); // Rotate screen by 180°
117
-  #elif defined(LCD_SCREEN_ROT_270)
118
-    u8g.setRot270(); // Rotate screen by 270°
119
-  #endif
120
-
121
-  u8g.firstPage();
96
+  u8g.setContrast(lcd_contrast);	
97
+	// FIXME: remove this workaround
98
+  // Uncomment this if you have the first generation (V1.10) of STBs board
99
+	// pinMode(17, OUTPUT);	// Enable LCD backlight
100
+	// digitalWrite(17, HIGH);
101
+  
102
+#ifdef LCD_SCREEN_ROT_90
103
+	u8g.setRot90();   // Rotate screen by 90°
104
+#elif defined(LCD_SCREEN_ROT_180)
105
+	u8g.setRot180();	// Rotate screen by 180°
106
+#elif defined(LCD_SCREEN_ROT_270)
107
+	u8g.setRot270();	// Rotate screen by 270°
108
+#endif
109
+	
110
+  // FIXME: whats the purpose of the box? Maybe clear screen?
111
+	u8g.firstPage();
122 112
   do {
123
-    // RepRap init bmp
124
-    u8g.drawBitmapP(7,7,START_BMPBYTEWIDTH,START_BMPHEIGHT,start_bmp);
125
-    // Welcome message
113
+		u8g.setFont(u8g_font_6x10_marlin);
114
+		u8g.setColorIndex(1);
115
+		u8g.drawBox (0, 0, u8g.getWidth(), u8g.getHeight());
116
+		u8g.setColorIndex(1);
117
+	} while(u8g.nextPage());
118
+
119
+  // Show splashscreen
120
+  int off = (u8g.getWidth() - START_BMPWIDTH) / 2;
121
+  int txtX = (u8g.getWidth() - sizeof(STRING_SPLASH) - 1) / 2;
122
+  int txtY = u8g.getHeight() - 10;
123
+	u8g.firstPage();
124
+	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
132
+			
126 133
     u8g.setFont(u8g_font_5x8);
127
-    u8g.drawStr(7, 51, "V" MARLIN_VERSION " - marlin.reprap.org");
128
-  } while( u8g.nextPage() );
134
+		u8g.drawStr(txtX, txtY, STRING_SPLASH);
135
+	} while(u8g.nextPage());
129 136
 }
130 137
 
131 138
 static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop

Loading…
Cancel
Save