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

Shorter LCD remaining time to prevent overlap #17181

Merged
merged 2 commits into from
Mar 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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