diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 6f8d238b3..770c86eb1 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -42,7 +42,8 @@ Here are some standard links for getting your machine calibrated: #define STRING_URL "reprap.org" #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define STRING_SPLASH "v" STRING_VERSION " - " STRING_URL // will be shown during bootup +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 // SERIAL_PORT selects which serial port should be used for communication with the host. // This allows the connection of wireless adapters (for instance) to non-default port pins. diff --git a/Marlin/DOGMbitmaps.h b/Marlin/DOGMbitmaps.h index b735477e3..8c8356785 100644 --- a/Marlin/DOGMbitmaps.h +++ b/Marlin/DOGMbitmaps.h @@ -1,6 +1,8 @@ // BitMap for splashscreen // Generated with: http://www.digole.com/tools/PicturetoC_Hex_converter.php -// Please note that using the high-res version takes about 0.5KB of +// Please note that using the high-res version takes 402Bytes of PROGMEM. +//#define START_BMPHIGH + #ifdef START_BMPHIGH #define START_BMPWIDTH 112 #define START_BMPHEIGHT 38 diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index ffc323c5a..6350684fc 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -51,11 +51,24 @@ #endif */ +#define USE_BIG_EDIT_FONT +#define FONT_STATUSMENU u8g_font_6x9 +#define FONT_MENU u8g_font_6x10_marlin + // DOGM parameters (size in pixels) #define DOG_CHAR_WIDTH 6 #define DOG_CHAR_HEIGHT 12 -#define DOG_CHAR_WIDTH_LARGE 9 -#define DOG_CHAR_HEIGHT_LARGE 18 +#ifdef USE_BIG_EDIT_FONT + #define FONT_MENU_EDIT u8g_font_9x18 + #define DOG_CHAR_WIDTH_EDIT 9 + #define DOG_CHAR_HEIGHT_EDIT 18 + #define LCD_WIDTH_EDIT 14 +#else + #define FONT_MENU_EDIT u8g_font_6x10_marlin + #define DOG_CHAR_WIDTH_EDIT 6 + #define DOG_CHAR_HEIGHT_EDIT 12 + #define LCD_WIDTH_EDIT 22 +#endif #define START_ROW 0 @@ -70,8 +83,6 @@ #define LCD_STR_BEDTEMP "\xFE" #define LCD_STR_THERMOMETER "\xFF" -#define FONT_STATUSMENU u8g_font_6x9 - int lcd_contrast; // LCD selection @@ -107,26 +118,27 @@ static void lcd_implementation_init() u8g.setRot270(); // Rotate screen by 270° #endif - // FIXME: whats the purpose of the box? Maybe clear screen? - u8g.firstPage(); - do { - u8g.setFont(u8g_font_6x10_marlin); - u8g.setColorIndex(1); - u8g.drawBox (0, 0, u8g.getWidth(), u8g.getHeight()); - u8g.setColorIndex(1); - } while(u8g.nextPage()); - // Show splashscreen int offx = (u8g.getWidth() - START_BMPWIDTH) / 2; - int offy = (u8g.getHeight() - 18 - START_BMPHEIGHT) / 2; - int txtX = (u8g.getWidth() - (sizeof(STRING_SPLASH) - 1)*5) / 2; // 5 is fontwidth in pixel - int txtY = u8g.getHeight() - 10; + #ifdef START_BMPHIGH + int offy = 0; + #else + int offy = DOG_CHAR_HEIGHT; + #endif + + int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1)*DOG_CHAR_WIDTH) / 2; + u8g.firstPage(); do { - u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp); - - u8g.setFont(u8g_font_5x8); - u8g.drawStr(txtX, txtY, STRING_SPLASH); + u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp); + u8g.setFont(FONT_MENU); + #ifndef STRING_SPLASH_LINE2 + u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1); + #else + int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2; + u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1); + u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2); + #endif } while(u8g.nextPage()); } @@ -244,7 +256,7 @@ static void lcd_implementation_status_screen() { u8g.setColorIndex(1); // black on white // Feedrate - u8g.setFont(u8g_font_6x10_marlin); + u8g.setFont(FONT_MENU); u8g.setPrintPos(3,49); u8g.print(LCD_STR_FEEDRATE[0]); u8g.setFont(FONT_STATUSMENU); @@ -363,11 +375,11 @@ static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char p #define lcd_implementation_drawmenu_setting_edit_callback_bool(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) void lcd_implementation_drawedit(const char* pstr, char* value) { - u8g.setPrintPos(0 * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW ); - u8g.setFont(u8g_font_9x18); + u8g.setPrintPos(0 * DOG_CHAR_WIDTH_EDIT, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_EDIT) - (1 * DOG_CHAR_HEIGHT_EDIT) - START_ROW ); + u8g.setFont(FONT_MENU_EDIT); lcd_printPGM(pstr); u8g.print(':'); - u8g.setPrintPos((14 - strlen(value)) * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW ); + u8g.setPrintPos((14 - strlen(value)) * DOG_CHAR_WIDTH_EDIT, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_EDIT) - (1 * DOG_CHAR_HEIGHT_EDIT) - START_ROW ); u8g.print(value); } diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 2bf435fb0..2823f2d95 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -42,7 +42,8 @@ Here are some standard links for getting your machine calibrated: #define STRING_URL "reprap.org" #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_CONFIG_H_AUTHOR "(bq Hephestos)" // Who made the changes. -#define STRING_SPLASH "v" STRING_VERSION " - " STRING_URL // will be shown during bootup +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 // SERIAL_PORT selects which serial port should be used for communication with the host. // This allows the connection of wireless adapters (for instance) to non-default port pins. diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index d6cc80c81..7c61944a7 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -43,7 +43,8 @@ Here are some standard links for getting your machine calibrated: #define STRING_URL "reprap.org" #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes. -#define STRING_SPLASH "v" STRING_VERSION " - " STRING_URL // will be shown during bootup +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 // SERIAL_PORT selects which serial port should be used for communication with the host. // This allows the connection of wireless adapters (for instance) to non-default port pins. diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 4ee789e93..8bc4eb70e 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -62,7 +62,8 @@ Here are some standard links for getting your machine calibrated: #define STRING_URL "reprap.org" #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define STRING_SPLASH "v" STRING_VERSION " - " STRING_URL // will be shown during bootup +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 // SERIAL_PORT selects which serial port should be used for communication with the host. // This allows the connection of wireless adapters (for instance) to non-default port pins. diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index d5d20fd44..4a12bda51 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -44,7 +44,8 @@ Here are some standard links for getting your machine calibrated: #define STRING_URL "reprap.org" #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes. -#define STRING_SPLASH "v" STRING_VERSION " - " STRING_URL // will be shown during bootup +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 // SERIAL_PORT selects which serial port should be used for communication with the host. // This allows the connection of wireless adapters (for instance) to non-default port pins. diff --git a/Marlin/example_configurations/delta/Configuration.h b/Marlin/example_configurations/delta/Configuration.h index 267ea304a..3eb268041 100644 --- a/Marlin/example_configurations/delta/Configuration.h +++ b/Marlin/example_configurations/delta/Configuration.h @@ -37,7 +37,8 @@ Here are some standard links for getting your machine calibrated: #define STRING_URL "reprap.org" #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define STRING_SPLASH "v" STRING_VERSION " - " STRING_URL // will be shown during bootup +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 // SERIAL_PORT selects which serial port should be used for communication with the host. // This allows the connection of wireless adapters (for instance) to non-default port pins. diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index cd22cc9c0..99feceba8 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -46,7 +46,8 @@ Here are some standard links for getting your machine calibrated: #define STRING_URL "reprap.org" #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define STRING_SPLASH "v" STRING_VERSION " - " STRING_URL // will be shown during bootup +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 // SERIAL_PORT selects which serial port should be used for communication with the host. // This allows the connection of wireless adapters (for instance) to non-default port pins. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index d6098b515..4ca415d8f 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -45,7 +45,8 @@ Here are some standard links for getting your machine calibrated: #define STRING_URL "reprap.org" #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define STRING_SPLASH "v" STRING_VERSION " - " STRING_URL // will be shown during bootup +#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1 +//#define STRING_SPLASH_LINE2 STRING_VERSION_CONFIG_H // will be shown during bootup in line2 // SERIAL_PORT selects which serial port should be used for communication with the host. // This allows the connection of wireless adapters (for instance) to non-default port pins. diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 3335b9aa9..cd7380886 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1323,7 +1323,7 @@ void lcd_update() u8g.firstPage(); do { - u8g.setFont(u8g_font_6x10_marlin); + u8g.setFont(FONT_MENU); u8g.setPrintPos(125,0); if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot u8g.drawPixel(127,63); // draw alive dot