From d92f69f137eec0efe794a747b7fe076359bbc13d Mon Sep 17 00:00:00 2001 From: ellensp Date: Thu, 19 Nov 2020 19:09:51 +1300 Subject: [PATCH] Remaining Time followup (#20199) --- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index b85d5adf2a..00968f4ba0 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -707,7 +707,7 @@ void MarlinUI::draw_status_message(const bool blink) { * |01234567890123456789| */ -inline uint8_t draw_elapsed_or_remaining_time(uint8_t timepos) { +inline uint8_t draw_elapsed_or_remaining_time(uint8_t timepos, const bool blink) { char buffer[14]; #if ENABLED(SHOW_REMAINING_TIME) @@ -716,7 +716,7 @@ inline uint8_t draw_elapsed_or_remaining_time(uint8_t timepos) { #if ENABLED(USE_M73_REMAINING_TIME) duration_t remaining = get_remaining_time(); #else - uint8_t progress = get_progress_percent(); + uint8_t progress = ui.get_progress_percent(); uint32_t elapsed = print_job_timer.duration(); duration_t remaining = (progress > 0) ? ((elapsed * 25600 / progress) >> 8) - elapsed : 0; #endif @@ -874,7 +874,7 @@ void MarlinUI::draw_status_screen() { lcd_put_u8str(i16tostr3rj(feedrate_percentage)); lcd_put_wchar('%'); - const uint8_t timepos = draw_elapsed_or_remaining_time(LCD_WIDTH - 1); + const uint8_t timepos = draw_elapsed_or_remaining_time(LCD_WIDTH - 1, blink); #if LCD_WIDTH >= 20 lcd_moveto(timepos - 7, 2); @@ -973,7 +973,7 @@ void MarlinUI::draw_status_screen() { #else - (void)draw_elapsed_or_remaining_time(LCD_WIDTH - 4); + (void)draw_elapsed_or_remaining_time(LCD_WIDTH - 4, blink); #endif