-
-
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
Remaining Time for Prusa-style LCD layout #20148
Remaining Time for Prusa-style LCD layout #20148
Conversation
Prusa style LCD for marlin didn't have conditional statements for SHOW_REMAINING_TIME nor USE_M73_REMAINING_TIME I modified the specific block from the classic screen and adjusted the "timepos = LCD_WIDTH - 4 - len;" to keep it aligned.
01f33d1
to
b6bb4fa
Compare
Before this PR, I could compile with Now it errors out when trying either of those using the latest Error output:
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp: In function 'uint8_t draw_elapsed_or_remaining_time(uint8_t)':
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp:714:61: error: 'blink' was not declared in this scope
714 | const bool show_remain = TERN1(ROTATE_PROGRESS_DISPLAY, blink) && (printingIsActive() || marlin_state == MF_SD_COMPLETE);
| ^~~~~
Marlin/src/lcd/HD44780/../../inc/../core/macros.h:419:26: note: in definition of macro 'THIRD'
419 | #define THIRD(a,b,c,...) c
| ^
Marlin/src/lcd/HD44780/../../inc/../core/macros.h:196:29: note: in expansion of macro '___TERN'
196 | #define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
| ^~~~~~~
Marlin/src/lcd/HD44780/../../inc/../core/macros.h:195:29: note: in expansion of macro '__TERN'
195 | #define _TERN(E,V...) __TERN(_CAT(T_,E),V) // Prepend 'T_' to get 'T_0' or 'T_1'
| ^~~~~~
Marlin/src/lcd/HD44780/../../inc/../core/macros.h:193:29: note: in expansion of macro '_TERN'
193 | #define TERN1(O,A) _TERN(_ENA_1(O),1,A) // OPTION converted to A or '1'
| ^~~~~
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp:714:30: note: in expansion of macro 'TERN1'
714 | const bool show_remain = TERN1(ROTATE_PROGRESS_DISPLAY, blink) && (printingIsActive() || marlin_state == MF_SD_COMPLETE);
| ^~~~~
Compiling .pio/build/BIGTREE_BTT002/src/src/libs/buzzer.cpp.o
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp:719:28: error: 'get_progress_percent' was not declared in this scope
719 | uint8_t progress = get_progress_percent();
| ^~~~~~~~~~~~~~~~~~~~
Compiling .pio/build/BIGTREE_BTT002/src/src/libs/crc16.cpp.o
Compiling .pio/build/BIGTREE_BTT002/src/src/libs/heatshrink/heatshrink_decoder.cpp.o
Compiling .pio/build/BIGTREE_BTT002/src/src/libs/nozzle.cpp.o
*** [.pio/build/BIGTREE_BTT002/src/src/lcd/HD44780/marlinui_HD44780.cpp.o] Error 1 |
@thinkyhead: Reverting "Reduce, reuse, recycle" (b6bb4fa) allows for a successful compile again. Edit: I've submitted issue #20195 |
PR #20199 fixes it. |
Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Requirements
Description
Prusa style LCD for marlin didn't have conditional statements for SHOW_REMAINING_TIME nor USE_M73_REMAINING_TIME
I modified the specific block from the classic screen and adjusted the "timepos = LCD_WIDTH - 4 - len;" to keep it aligned.
Benefits
This is to bring features for show remaining time and use m73 for those who prefer using the Prusa Screen layout. There weren't conditional statements set to enable this, but it's already part of the classic screen
Configurations
depending on your setup, just enable
SHOW_REMAINING_TIME
USE_M73_REMAINING_TIME
Related Issues
none at the moment, since the section of the code is copied from the stable classic mode