Skip to content

Commit

Permalink
Shorter LCD remaining time to prevent overlap (MarlinFirmware#17181)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmjdebruijn authored and mathom committed Apr 16, 2020
1 parent b4caa89 commit c370c13
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Marlin/src/lcd/dogm/status_screen_DOGM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@ void MarlinUI::draw_status_screen() {
#endif
}

constexpr bool can_show_days = DISABLED(DOGM_SD_PERCENT) || ENABLED(ROTATE_PROGRESS_DISPLAY);
if (ev != lastElapsed) {
lastElapsed = ev;
const bool has_days = (elapsed.value >= 60*60*24L);
const uint8_t len = elapsed.toDigital(elapsed_string, has_days);
const uint8_t len = elapsed.toDigital(elapsed_string, can_show_days && elapsed.value >= 60*60*24L);
elapsed_x_pos = _SD_INFO_X(len);

#if ENABLED(SHOW_REMAINING_TIME)
Expand All @@ -468,8 +468,7 @@ void MarlinUI::draw_status_screen() {
}
else {
duration_t estimation = timeval;
const bool has_days = (estimation.value >= 60*60*24L);
const uint8_t len = estimation.toDigital(estimation_string, has_days);
const uint8_t len = estimation.toDigital(estimation_string, can_show_days && estimation.value >= 60*60*24L);
estimation_x_pos = _SD_INFO_X(len
#if !BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY)
+ 1
Expand Down

0 comments on commit c370c13

Please sign in to comment.