diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 4f8a149ba4..d7fc9910ce 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -378,7 +378,7 @@ void startOrResumeJob() { #if ENABLED(LCD_SHOW_E_TOTAL) e_move_accumulator = 0; #endif - #if ENABLED(USE_M73_REMAINING_TIME) + #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) ui.reset_remaining_time(); #endif } diff --git a/Marlin/src/gcode/lcd/M73.cpp b/Marlin/src/gcode/lcd/M73.cpp index 48610494b3..14d4d63813 100644 --- a/Marlin/src/gcode/lcd/M73.cpp +++ b/Marlin/src/gcode/lcd/M73.cpp @@ -43,7 +43,7 @@ void GcodeSuite::M73() { ? parser.value_float() * (PROGRESS_SCALE) : parser.value_byte() ); - #if ENABLED(USE_M73_REMAINING_TIME) + #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) if (parser.seen('R')) ui.set_remaining_time(60 * parser.value_ulong()); #endif } diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 4211e86ca1..22511d06b2 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -456,7 +456,7 @@ void MarlinUI::draw_status_screen() { #if ENABLED(SHOW_REMAINING_TIME) if (!(ev & 0x3)) { uint32_t timeval = (0 - #if ENABLED(USE_M73_REMAINING_TIME) + #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) + get_remaining_time() #endif ); diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index d21c3649e5..43e58e7ffa 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -59,7 +59,7 @@ #if ENABLED(LCD_SET_PROGRESS_MANUALLY) MarlinUI::progress_t MarlinUI::progress_override; // = 0 - #if ENABLED(USE_M73_REMAINING_TIME) + #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) uint32_t MarlinUI::remaining_time; #endif #endif diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index 48bfe3500d..752fd1642d 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -304,7 +304,7 @@ public: static void set_progress(const progress_t p) { progress_override = _MIN(p, 100U * (PROGRESS_SCALE)); } static void set_progress_done() { progress_override = (PROGRESS_MASK + 1U) + 100U * (PROGRESS_SCALE); } static void progress_reset() { if (progress_override & (PROGRESS_MASK + 1U)) set_progress(0); } - #if ENABLED(USE_M73_REMAINING_TIME) + #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) static uint32_t remaining_time; FORCE_INLINE static void set_remaining_time(const uint32_t r) { remaining_time = r; } FORCE_INLINE static uint32_t get_remaining_time() { return remaining_time; }