🐛 Fix SHOW_REMAINING_TIME compile (#23503)
This commit is contained in:
parent
7135c3b185
commit
242192d03d
|
@ -293,20 +293,20 @@ public:
|
||||||
static void set_progress(const progress_t p) { progress_override = _MIN(p, 100U * (PROGRESS_SCALE)); }
|
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 set_progress_done() { progress_override = (PROGRESS_MASK + 1U) + 100U * (PROGRESS_SCALE); }
|
||||||
static void progress_reset() { if (progress_override & (PROGRESS_MASK + 1U)) set_progress(0); }
|
static void progress_reset() { if (progress_override & (PROGRESS_MASK + 1U)) set_progress(0); }
|
||||||
#if ENABLED(SHOW_REMAINING_TIME)
|
#endif
|
||||||
static uint32_t _calculated_remaining_time() {
|
#if ENABLED(SHOW_REMAINING_TIME)
|
||||||
const duration_t elapsed = print_job_timer.duration();
|
static uint32_t _calculated_remaining_time() {
|
||||||
const progress_t progress = _get_progress();
|
const duration_t elapsed = print_job_timer.duration();
|
||||||
return progress ? elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress : 0;
|
const progress_t progress = _get_progress();
|
||||||
}
|
return progress ? elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress : 0;
|
||||||
#if ENABLED(USE_M73_REMAINING_TIME)
|
}
|
||||||
static uint32_t remaining_time;
|
#if ENABLED(USE_M73_REMAINING_TIME)
|
||||||
FORCE_INLINE static void set_remaining_time(const uint32_t r) { remaining_time = r; }
|
static uint32_t remaining_time;
|
||||||
FORCE_INLINE static uint32_t get_remaining_time() { return remaining_time ?: _calculated_remaining_time(); }
|
FORCE_INLINE static void set_remaining_time(const uint32_t r) { remaining_time = r; }
|
||||||
FORCE_INLINE static void reset_remaining_time() { set_remaining_time(0); }
|
FORCE_INLINE static uint32_t get_remaining_time() { return remaining_time ?: _calculated_remaining_time(); }
|
||||||
#else
|
FORCE_INLINE static void reset_remaining_time() { set_remaining_time(0); }
|
||||||
FORCE_INLINE static uint32_t get_remaining_time() { return _calculated_remaining_time(); }
|
#else
|
||||||
#endif
|
FORCE_INLINE static uint32_t get_remaining_time() { return _calculated_remaining_time(); }
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
static progress_t _get_progress();
|
static progress_t _get_progress();
|
||||||
|
|
Loading…
Reference in a new issue