Browse Source

Added dualline version.

AnHardt 9 years ago
parent
commit
65642592ee
2 changed files with 13 additions and 6 deletions
  1. 2
    1
      Marlin/Configuration.h
  2. 11
    5
      Marlin/dogm_lcd_implementation.h

+ 2
- 1
Marlin/Configuration.h View File

42
 #define STRING_URL "reprap.org"
42
 #define STRING_URL "reprap.org"
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
44
 #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
45
-#define STRING_SPLASH "v" STRING_VERSION // will be shown during bootup
45
+#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
46
+//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2
46
 
47
 
47
 // SERIAL_PORT selects which serial port should be used for communication with the host.
48
 // SERIAL_PORT selects which serial port should be used for communication with the host.
48
 // This allows the connection of wireless adapters (for instance) to non-default port pins.
49
 // This allows the connection of wireless adapters (for instance) to non-default port pins.

+ 11
- 5
Marlin/dogm_lcd_implementation.h View File

114
   #else
114
   #else
115
     int offy = DOG_CHAR_HEIGHT;
115
     int offy = DOG_CHAR_HEIGHT;
116
   #endif
116
   #endif
117
-  int txtX = (u8g.getWidth() - (sizeof(STRING_SPLASH) - 1)*DOG_CHAR_WIDTH) / 2;
118
-  int txtY = u8g.getHeight() - DOG_CHAR_HEIGHT;
117
+
118
+  int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1)*DOG_CHAR_WIDTH) / 2;
119
+
119
 	u8g.firstPage();
120
 	u8g.firstPage();
120
 	do {
121
 	do {
121
-	  u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
122
-			
122
+    u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
123
     u8g.setFont(u8g_font_6x10_marlin);
123
     u8g.setFont(u8g_font_6x10_marlin);
124
-		u8g.drawStr(txtX, txtY, STRING_SPLASH);
124
+    #ifndef STRING_SPLASH_LINE2
125
+      u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
126
+    #else
127
+      int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
128
+      u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
129
+      u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
130
+    #endif
125
 	} while(u8g.nextPage());
131
 	} while(u8g.nextPage());
126
 }
132
 }
127
 
133
 

Loading…
Cancel
Save