Skip to content
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

Conversation

niccoreyes
Copy link
Contributor

Requirements

  • Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.

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

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.
@thinkyhead thinkyhead changed the title Updated Prusa Style LCD for show remaining time Remaining Time for Prusa-style LCD layout Nov 18, 2020
@thinkyhead thinkyhead force-pushed the Added-SHOW_REMAINING_TIME-&-USE_M73_REMAINING_TIME-for-Prusa-type-screen branch from 01f33d1 to b6bb4fa Compare November 18, 2020 05:30
@thinkyhead thinkyhead merged commit 04a3ece into MarlinFirmware:bugfix-2.0.x Nov 18, 2020
@thisiskeithb
Copy link
Member

thisiskeithb commented Nov 18, 2020

Before this PR, I could compile with LCD_INFO_SCREEN_STYLE set to 0 or 1 on my BTT002 / REPRAP_DISCOUNT_SMART_CONTROLLER config and ROTATE_PROGRESS_DISPLAY.

Now it errors out when trying either of those using the latest bugfix-2.0.x (11b8118) & ROTATE_PROGRESS_DISPLAY:

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

@thisiskeithb
Copy link
Member

thisiskeithb commented Nov 18, 2020

@thinkyhead: Reverting "Reduce, reuse, recycle" (b6bb4fa) allows for a successful compile again.

Edit: I've submitted issue #20195

@ellensp
Copy link
Contributor

ellensp commented Nov 19, 2020

PR #20199 fixes it.

FhlostonParadise pushed a commit to FhlostonParadise/Marlin that referenced this pull request Nov 21, 2020
Kannix2005 pushed a commit to Kannix2005/Marlin-1 that referenced this pull request Dec 7, 2020
vgadreau pushed a commit to vgadreau/Marlin that referenced this pull request Dec 9, 2020
tharts pushed a commit to tharts/Marlin that referenced this pull request Jan 6, 2021
dpreed pushed a commit to dpreed/Marlin_2.0.x that referenced this pull request Feb 5, 2021
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead added a commit to thinkyhead/Marlin that referenced this pull request Apr 28, 2021
thinkyhead added a commit to thinkyhead/Marlin that referenced this pull request Apr 29, 2021
thinkyhead added a commit that referenced this pull request Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants