Merge Bootscreen Text (PR#24)
This commit is contained in:
commit
e66ab97a3c
21 changed files with 219 additions and 100 deletions
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -666,7 +666,6 @@ void setup() {
|
||||||
Config_RetrieveSettings();
|
Config_RetrieveSettings();
|
||||||
|
|
||||||
lcd_init();
|
lcd_init();
|
||||||
_delay_ms(1000); // wait 1sec to display the splash screen
|
|
||||||
|
|
||||||
tp_init(); // Initialize temperature loop
|
tp_init(); // Initialize temperature loop
|
||||||
plan_init(); // Initialize planner;
|
plan_init(); // Initialize planner;
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// Please note that using the high-res version takes 402Bytes of PROGMEM.
|
// Please note that using the high-res version takes 402Bytes of PROGMEM.
|
||||||
//#define START_BMPHIGH
|
//#define START_BMPHIGH
|
||||||
|
|
||||||
|
#if ENABLED(SHOW_BOOTSCREEN)
|
||||||
#if ENABLED(START_BMPHIGH)
|
#if ENABLED(START_BMPHIGH)
|
||||||
#define START_BMPWIDTH 112
|
#define START_BMPWIDTH 112
|
||||||
#define START_BMPHEIGHT 38
|
#define START_BMPHEIGHT 38
|
||||||
|
@ -75,6 +76,7 @@
|
||||||
,0x60,0x00,0x00,0x00,0x00,0x00,0x06
|
,0x60,0x00,0x00,0x00,0x00,0x00,0x06
|
||||||
,0x1f,0xff,0xff,0xff,0xff,0xff,0xf8 };
|
,0x1f,0xff,0xff,0xff,0xff,0xff,0xf8 };
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Here comes a compile-time operation to match the extruder symbols
|
// Here comes a compile-time operation to match the extruder symbols
|
||||||
// on the info screen to the set number of extruders in configuration.h
|
// on the info screen to the set number of extruders in configuration.h
|
||||||
|
|
|
@ -190,7 +190,9 @@ char lcd_printPGM(const char* str) {
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool show_splashscreen = true;
|
#if ENABLED(SHOW_BOOTSCREEN)
|
||||||
|
static bool show_bootscreen = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Warning: This function is called from interrupt context */
|
/* Warning: This function is called from interrupt context */
|
||||||
static void lcd_implementation_init() {
|
static void lcd_implementation_init() {
|
||||||
|
@ -220,7 +222,7 @@ static void lcd_implementation_init() {
|
||||||
u8g.setRot270(); // Rotate screen by 270°
|
u8g.setRot270(); // Rotate screen by 270°
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Show splashscreen
|
#if ENABLED(SHOW_BOOTSCREEN)
|
||||||
int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
|
int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
|
||||||
#if ENABLED(START_BMPHIGH)
|
#if ENABLED(START_BMPHIGH)
|
||||||
int offy = 0;
|
int offy = 0;
|
||||||
|
@ -232,7 +234,7 @@ static void lcd_implementation_init() {
|
||||||
|
|
||||||
u8g.firstPage();
|
u8g.firstPage();
|
||||||
do {
|
do {
|
||||||
if (show_splashscreen) {
|
if (show_bootscreen) {
|
||||||
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
|
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
|
||||||
lcd_setFont(FONT_MENU);
|
lcd_setFont(FONT_MENU);
|
||||||
#ifndef STRING_SPLASH_LINE2
|
#ifndef STRING_SPLASH_LINE2
|
||||||
|
@ -244,7 +246,12 @@ static void lcd_implementation_init() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} while (u8g.nextPage());
|
} while (u8g.nextPage());
|
||||||
show_splashscreen = false;
|
|
||||||
|
if (show_bootscreen) {
|
||||||
|
delay(1000);
|
||||||
|
show_bootscreen = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
|
static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ Here are some standard links for getting your machine calibrated:
|
||||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||||
// build by the user have been successfully uploaded into firmware.
|
// build by the user have been successfully uploaded into firmware.
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||||
|
#define SHOW_BOOTSCREEN
|
||||||
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
|
||||||
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
|
||||||
|
|
||||||
|
|
|
@ -193,6 +193,11 @@
|
||||||
|
|
||||||
#include "utf_mapper.h"
|
#include "utf_mapper.h"
|
||||||
|
|
||||||
|
#if ENABLED(SHOW_BOOTSCREEN)
|
||||||
|
static void bootscreen();
|
||||||
|
static bool show_bootscreen = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(LCD_PROGRESS_BAR)
|
#if ENABLED(LCD_PROGRESS_BAR)
|
||||||
static millis_t progress_bar_ms = 0;
|
static millis_t progress_bar_ms = 0;
|
||||||
#if PROGRESS_MSG_EXPIRE > 0
|
#if PROGRESS_MSG_EXPIRE > 0
|
||||||
|
@ -377,6 +382,10 @@ static void lcd_implementation_init(
|
||||||
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(SHOW_BOOTSCREEN)
|
||||||
|
if (show_bootscreen) bootscreen();
|
||||||
|
#endif
|
||||||
|
|
||||||
lcd_set_custom_characters(
|
lcd_set_custom_characters(
|
||||||
#if ENABLED(LCD_PROGRESS_BAR)
|
#if ENABLED(LCD_PROGRESS_BAR)
|
||||||
progress_bar_set
|
progress_bar_set
|
||||||
|
@ -404,6 +413,91 @@ char lcd_print(char* str) {
|
||||||
|
|
||||||
unsigned lcd_print(char c) { return charset_mapper(c); }
|
unsigned lcd_print(char c) { return charset_mapper(c); }
|
||||||
|
|
||||||
|
#if ENABLED(SHOW_BOOTSCREEN)
|
||||||
|
void lcd_erase_line(int line) {
|
||||||
|
lcd.setCursor(0, 3);
|
||||||
|
for (int i=0; i < LCD_WIDTH; i++)
|
||||||
|
lcd_print(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
// scrol the PSTR'text' in a 'len' wide field for 'time' milliseconds at position col,line
|
||||||
|
void lcd_scroll(int col, int line, const char * text, int len, int time) {
|
||||||
|
char tmp[LCD_WIDTH+1] = {0};
|
||||||
|
int n = max(lcd_strlen_P(text) - len, 0);
|
||||||
|
for (int i = 0; i <= n; i++) {
|
||||||
|
strncpy_P(tmp, text+i, min(len, LCD_WIDTH));
|
||||||
|
lcd.setCursor(col, line);
|
||||||
|
lcd_print(tmp);
|
||||||
|
delay(time / max(n, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bootscreen() {
|
||||||
|
show_bootscreen = false;
|
||||||
|
byte top_left[8] = {
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00001,
|
||||||
|
B00010,
|
||||||
|
B00100,
|
||||||
|
B00100
|
||||||
|
};
|
||||||
|
byte top_right[8] = {
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B11100,
|
||||||
|
B11100,
|
||||||
|
B01100,
|
||||||
|
B00100,
|
||||||
|
B00100
|
||||||
|
};
|
||||||
|
byte botom_left[8] = {
|
||||||
|
B00100,
|
||||||
|
B00010,
|
||||||
|
B00001,
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00000
|
||||||
|
};
|
||||||
|
byte botom_right[8] = {
|
||||||
|
B00100,
|
||||||
|
B01000,
|
||||||
|
B10000,
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00000,
|
||||||
|
B00000
|
||||||
|
};
|
||||||
|
lcd.createChar(0, top_left);
|
||||||
|
lcd.createChar(1, top_right);
|
||||||
|
lcd.createChar(2, botom_left);
|
||||||
|
lcd.createChar(3, botom_right);
|
||||||
|
|
||||||
|
lcd.clear();
|
||||||
|
|
||||||
|
#define TEXT_SCREEN_LOGO_SHIFT ((LCD_WIDTH/2) - 4)
|
||||||
|
lcd.setCursor(TEXT_SCREEN_LOGO_SHIFT, 0); lcd.print('\x00'); lcd_printPGM(PSTR( "------" )); lcd.print('\x01');
|
||||||
|
lcd.setCursor(TEXT_SCREEN_LOGO_SHIFT, 1); lcd_printPGM(PSTR("|Marlin|"));
|
||||||
|
lcd.setCursor(TEXT_SCREEN_LOGO_SHIFT, 2); lcd.print('\x02'); lcd_printPGM(PSTR( "------" )); lcd.print('\x03');
|
||||||
|
|
||||||
|
lcd_scroll(0, 3, PSTR("www.marlinfirmware.org"), LCD_WIDTH, 3000);
|
||||||
|
|
||||||
|
#ifdef STRING_SPLASH_LINE1
|
||||||
|
lcd_erase_line(3);
|
||||||
|
lcd_scroll(0, 3, PSTR(STRING_SPLASH_LINE1), LCD_WIDTH, 1000);
|
||||||
|
#endif
|
||||||
|
#ifdef STRING_SPLASH_LINE2
|
||||||
|
lcd_erase_line(3);
|
||||||
|
lcd_scroll(0, 3, PSTR(STRING_SPLASH_LINE2), LCD_WIDTH, 1000);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif // SHOW_BOOTSCREEN
|
||||||
/*
|
/*
|
||||||
Possible status screens:
|
Possible status screens:
|
||||||
16x2 |000/000 B000/000|
|
16x2 |000/000 B000/000|
|
||||||
|
|
Reference in a new issue