Browse Source

Shorter LCD remaining time to prevent overlap (#17181)

Pascal de Bruijn 4 years ago
parent
commit
2fc0df1b39
No account linked to committer's email address
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp

+ 3
- 4
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

@@ -448,10 +448,10 @@ void MarlinUI::draw_status_screen() {
448 448
         #endif
449 449
       }
450 450
 
451
+      constexpr bool can_show_days = DISABLED(DOGM_SD_PERCENT) || ENABLED(ROTATE_PROGRESS_DISPLAY);
451 452
       if (ev != lastElapsed) {
452 453
         lastElapsed = ev;
453
-        const bool has_days = (elapsed.value >= 60*60*24L);
454
-        const uint8_t len = elapsed.toDigital(elapsed_string, has_days);
454
+        const uint8_t len = elapsed.toDigital(elapsed_string, can_show_days && elapsed.value >= 60*60*24L);
455 455
         elapsed_x_pos = _SD_INFO_X(len);
456 456
 
457 457
         #if ENABLED(SHOW_REMAINING_TIME)
@@ -468,8 +468,7 @@ void MarlinUI::draw_status_screen() {
468 468
             }
469 469
             else {
470 470
               duration_t estimation = timeval;
471
-              const bool has_days = (estimation.value >= 60*60*24L);
472
-              const uint8_t len = estimation.toDigital(estimation_string, has_days);
471
+              const uint8_t len = estimation.toDigital(estimation_string, can_show_days && estimation.value >= 60*60*24L);
473 472
               estimation_x_pos = _SD_INFO_X(len
474 473
                 #if !BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY)
475 474
                   + 1

Loading…
Cancel
Save