-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add SHOW_CUSTOM_BOOTSCREEN support to HD44780 #26793
add SHOW_CUSTOM_BOOTSCREEN support to HD44780 #26793
Conversation
We have an "AnimationExample" folder in the Configurations repo, so one could be added for this. |
There should probably be a _Bootscreen.h page in the documentation, that documents all the current 128x64 options and the new 20x4 options |
Presumably the call to TERN_(HAS_CUSTOM_BOOT_CHAR_0, createChar_P(0x0, customBootChar0)); …so you'll want to adjust your example custom boot screen to match these updated names. |
Updated _Bootscreen.h example _Bootscreen.zip |
I've adjusted the code to just use the single array customBootChars/**
* Up to 8 custom characters of 5 x 8 pixels
* Use an online editor such as https://maxpromer.github.io/LCD-Character-Creator/
*/
const static PROGMEM byte customBootChars[][8] = {
{ // '\x00'
B00100,
B01110,
B11011,
B01110,
B10101,
B01110,
B00100,
B00100
}, { // '\x01'
B00001,
B00001,
B00011,
B00010,
B00110,
B10100,
B11100,
B01000
}, { // '\x02'
B00000,
B00000,
B00011,
B00100,
B01000,
B01000,
B10001,
B10001
}, { // '\x03'
B00000,
B11111,
B00000,
B00000,
B00000,
B00000,
B10001,
B10001
}, { // '\x04'
B00000,
B00000,
B11000,
B00100,
B00010,
B00010,
B10001,
B10001
}, { // '\x05'
B10000,
B10000,
B10000,
B01000,
B01000,
B00100,
B00011,
B00000
}, { // '\x06'
B00000,
B00000,
B00000,
B10001,
B01110,
B00000,
B00000,
B11111
}, { // '\x07'
B00001,
B00001,
B00001,
B00010,
B00010,
B00100,
B11000,
B00000
}
}; I'm also thinking the boot screen string may be better defined with strings instead of char arrays (PROGMEM strings stored as a PROGMEM array of string pointers): #define CHR0 "\x00"
#define CHR1 "\x01"
#define CHR2 "\x02"
#define CHR3 "\x03"
#define CHR4 "\x04"
#define CHR5 "\x05"
#define CHR6 "\x06"
#define CHR7 "\x07"
const char * const custom_boot_lines[] PROGMEM = {
PSTR(CHR0 " CUSTOM BOOT " CHR2 CHR3 CHR4),
PSTR(CHR1 " SCREEN TEST " CHR5 CHR6 CHR7)
}; So PGM_P const pstr = (PGM_P)pgm_read_ptr(&custom_boot_lines[i]);
const lchar_t c = (lchar_t)pgm_read_byte(&pstr[i]); |
I used char arrays for ease of design. With chars you can easily see in code where each char will be on the display, with strings you have to count spaces to align data to where you want it. But perhaps its not as bad as I imagined ... |
Although Here's the updated _Bootscreen.h that works with the applied changes. |
Another minor update. Of course character 0 has to be treated specially because it's a string terminator. So I just redefined |
link to _Bootscreen.h is a 404 error for me. |
If using
Works on sim, but will not build on 8 bit AVR Marlin/src/lcd/HD44780/../../../_Bootscreen.h:49:3: error: statement-expressions are not allowed outside functions nor in template-argument lists |
The current _Bootscreen and code is fine. Those errors are from an earlier iteration. The link to the file works for me, so perhaps refresh the page. |
MarlinFirmware/Marlin#26793 Co-Authored-By: ellensp <530024+ellensp@users.noreply.github.com>
ini/native.ini
Outdated
@@ -113,7 +113,7 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags} | |||
[simulator_macos] | |||
build_unflags = -lGL -fstack-protector-strong | |||
build_flags = | |||
-DHAS_LIBBSD | |||
-DHAS_LIBBSD -DGLM_ENABLE_EXPERIMENTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this flag known also known be needed for macOS? I know we just added it for Windows. Maybe some Linux need it too…?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On current bugfix-2.1.x
/ without this PR, both simulator_macos_debug
and simulator_macos_release
environments build the default Simulator config fine on my Intel-based Mac.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required on Ubuntu 22.04.4 LTS or Ubuntu 24.04 LTS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes macOS needs it, and probably it's ok to use the flag on Linux, or does it complain?
The example _bootscreen link is now working.. At the time I refreshed and even vpned out to another country and tried the link from there,, it was broken. |
This works as expected. |
Description
Adds SHOW_CUSTOM_BOOTSCREEN to text LCD's (HD44780)
The custom boot screen can include up to 8 custom 5*8 pixel characters
Eg
Requirements
A Text based LCD display, SHOW_CUSTOM_BOOTSCREEN, and a properly configured _Bootscreen.h
Benefits
Adds SHOW_CUSTOM_BOOTSCREEN to text LCD's
Configurations
EG Configuration files for RAMPS + REPRAP_DISCOUNT_SMART_CONTROLLER and _Bootscreen.h
Related Issues
I'm sure this has been asked for a number of times, but cannot quickly locate an issues for it
NOTES:
Need somewhere to put the example _Bootscreen.h for users to find and base theirs on.
Stock Configuration_adv.h needs updated to allow setting SHOW_CUSTOM_BOOTSCREEN with HAS_MARLINUI_HD44780