|
@@ -591,16 +591,17 @@ void ST7920_Lite_Status_Screen::draw_fan_speed(const uint8_t value) {
|
591
|
591
|
write_byte('%');
|
592
|
592
|
}
|
593
|
593
|
|
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) {
|
595
|
595
|
#if HOTENDS == 1
|
596
|
596
|
set_ddram_address(DDRAM_LINE_3);
|
597
|
597
|
#else
|
598
|
598
|
set_ddram_address(DDRAM_LINE_3 + 5);
|
599
|
599
|
#endif
|
600
|
600
|
char str[7];
|
601
|
|
- str[elapsed.toDigital(str)] = ' ';
|
|
601
|
+ int str_length = elapsed.toDigital(str);
|
|
602
|
+ str[str_length++] = suffix;
|
602
|
603
|
begin_data();
|
603
|
|
- write_str(str, 6);
|
|
604
|
+ write_str(str, str_length);
|
604
|
605
|
}
|
605
|
606
|
|
606
|
607
|
void 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) {
|
714
|
715
|
if (forceUpdate || indicators_changed()) {
|
715
|
716
|
const bool blink = ui.get_blink();
|
716
|
717
|
const duration_t elapsed = print_job_timer.duration();
|
|
718
|
+ duration_t remaining = TERN0(USE_M73_REMAINING_TIME, ui.get_remaining_time());
|
717
|
719
|
const uint16_t feedrate_perc = feedrate_percentage;
|
718
|
720
|
const int16_t extruder_1_temp = thermalManager.degHotend(0),
|
719
|
721
|
extruder_1_target = thermalManager.degTargetHotend(0);
|
|
@@ -738,7 +740,19 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
|
738
|
740
|
#endif
|
739
|
741
|
|
740
|
742
|
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
|
+
|
742
|
756
|
draw_feedrate_percentage(feedrate_perc);
|
743
|
757
|
|
744
|
758
|
// Update the fan and bed animations
|