No USE_M73_REMAINING_TIME without LCD_SET_PROGRESS_MANUALLY

This commit is contained in:
Scott Lahteine 2019-11-13 02:07:09 -06:00
parent fcfde7c2f5
commit 602ca5dea6
5 changed files with 5 additions and 5 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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
);

View File

@ -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

View File

@ -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; }