@@ -591,16 +591,17 @@ void ST7920_Lite_Status_Screen::draw_fan_speed(const uint8_t value) {
591591 write_byte (' %' );
592592}
593593
594- void ST7920_Lite_Status_Screen::draw_print_time (const duration_t &elapsed) {
594+ void ST7920_Lite_Status_Screen::draw_print_time (const duration_t &elapsed, char suffix ) {
595595 #if HOTENDS == 1
596596 set_ddram_address (DDRAM_LINE_3);
597597 #else
598598 set_ddram_address (DDRAM_LINE_3 + 5 );
599599 #endif
600600 char str[7 ];
601- str[elapsed.toDigital (str)] = ' ' ;
601+ int str_length = elapsed.toDigital (str);
602+ str[str_length++] = suffix;
602603 begin_data ();
603- write_str (str, 6 );
604+ write_str (str, str_length );
604605}
605606
606607void ST7920_Lite_Status_Screen::draw_feedrate_percentage (const uint16_t percentage) {
@@ -714,6 +715,7 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
714715 if (forceUpdate || indicators_changed ()) {
715716 const bool blink = ui.get_blink ();
716717 const duration_t elapsed = print_job_timer.duration ();
718+ duration_t remaining = TERN0 (USE_M73_REMAINING_TIME, ui.get_remaining_time ());
717719 const uint16_t feedrate_perc = feedrate_percentage;
718720 const int16_t extruder_1_temp = thermalManager.degHotend (0 ),
719721 extruder_1_target = thermalManager.degTargetHotend (0 );
@@ -738,7 +740,19 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
738740 #endif
739741
740742 draw_fan_speed (thermalManager.fanPercent (spd));
741- draw_print_time (elapsed);
743+
744+ // Draw elapsed/remaining time
745+ const bool show_remaining = ENABLED (SHOW_REMAINING_TIME) && (DISABLED (ROTATE_PROGRESS_DISPLAY) || blink);
746+ if (show_remaining && !remaining.second ()) {
747+ const auto progress = ui.get_progress_percent ();
748+ if (progress)
749+ remaining = elapsed.second () * (100 - progress) / progress;
750+ }
751+ if (show_remaining && remaining.second ())
752+ draw_print_time (remaining, ' R' );
753+ else
754+ draw_print_time (elapsed);
755+
742756 draw_feedrate_percentage (feedrate_perc);
743757
744758 // Update the fan and bed animations
0 commit comments