Browse Source

Remaining Time followup (#20199)

ellensp 3 years ago
parent
commit
c059ea0ea0
No account linked to committer's email address
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/src/lcd/HD44780/marlinui_HD44780.cpp

+ 4
- 4
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp View File

707
  *  |01234567890123456789|
707
  *  |01234567890123456789|
708
  */
708
  */
709
 
709
 
710
-inline uint8_t draw_elapsed_or_remaining_time(uint8_t timepos) {
710
+inline uint8_t draw_elapsed_or_remaining_time(uint8_t timepos, const bool blink) {
711
   char buffer[14];
711
   char buffer[14];
712
 
712
 
713
   #if ENABLED(SHOW_REMAINING_TIME)
713
   #if ENABLED(SHOW_REMAINING_TIME)
716
       #if ENABLED(USE_M73_REMAINING_TIME)
716
       #if ENABLED(USE_M73_REMAINING_TIME)
717
         duration_t remaining = get_remaining_time();
717
         duration_t remaining = get_remaining_time();
718
       #else
718
       #else
719
-        uint8_t progress = get_progress_percent();
719
+        uint8_t progress = ui.get_progress_percent();
720
         uint32_t elapsed = print_job_timer.duration();
720
         uint32_t elapsed = print_job_timer.duration();
721
         duration_t remaining = (progress > 0) ? ((elapsed * 25600 / progress) >> 8) - elapsed : 0;
721
         duration_t remaining = (progress > 0) ? ((elapsed * 25600 / progress) >> 8) - elapsed : 0;
722
       #endif
722
       #endif
874
       lcd_put_u8str(i16tostr3rj(feedrate_percentage));
874
       lcd_put_u8str(i16tostr3rj(feedrate_percentage));
875
       lcd_put_wchar('%');
875
       lcd_put_wchar('%');
876
 
876
 
877
-      const uint8_t timepos = draw_elapsed_or_remaining_time(LCD_WIDTH - 1);
877
+      const uint8_t timepos = draw_elapsed_or_remaining_time(LCD_WIDTH - 1, blink);
878
 
878
 
879
       #if LCD_WIDTH >= 20
879
       #if LCD_WIDTH >= 20
880
         lcd_moveto(timepos - 7, 2);
880
         lcd_moveto(timepos - 7, 2);
973
 
973
 
974
     #else
974
     #else
975
 
975
 
976
-      (void)draw_elapsed_or_remaining_time(LCD_WIDTH - 4);
976
+      (void)draw_elapsed_or_remaining_time(LCD_WIDTH - 4, blink);
977
 
977
 
978
     #endif
978
     #endif
979
 
979
 

Loading…
Cancel
Save