Browse Source

🐛 Fix SHOW_REMAINING_TIME compile (#23503)

Jim Watson 2 years ago
parent
commit
e16813d713
No account linked to committer's email address
1 changed files with 14 additions and 14 deletions
  1. 14
    14
      Marlin/src/lcd/marlinui.h

+ 14
- 14
Marlin/src/lcd/marlinui.h View File

@@ -293,20 +293,20 @@ public:
293 293
       static void set_progress(const progress_t p) { progress_override = _MIN(p, 100U * (PROGRESS_SCALE)); }
294 294
       static void set_progress_done() { progress_override = (PROGRESS_MASK + 1U) + 100U * (PROGRESS_SCALE); }
295 295
       static void progress_reset() { if (progress_override & (PROGRESS_MASK + 1U)) set_progress(0); }
296
-      #if ENABLED(SHOW_REMAINING_TIME)
297
-        static uint32_t _calculated_remaining_time() {
298
-          const duration_t elapsed = print_job_timer.duration();
299
-          const progress_t progress = _get_progress();
300
-          return progress ? elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress : 0;
301
-        }
302
-        #if ENABLED(USE_M73_REMAINING_TIME)
303
-          static uint32_t remaining_time;
304
-          FORCE_INLINE static void set_remaining_time(const uint32_t r) { remaining_time = r; }
305
-          FORCE_INLINE static uint32_t get_remaining_time() { return remaining_time ?: _calculated_remaining_time(); }
306
-          FORCE_INLINE static void reset_remaining_time() { set_remaining_time(0); }
307
-        #else
308
-          FORCE_INLINE static uint32_t get_remaining_time() { return _calculated_remaining_time(); }
309
-        #endif
296
+    #endif
297
+    #if ENABLED(SHOW_REMAINING_TIME)
298
+      static uint32_t _calculated_remaining_time() {
299
+        const duration_t elapsed = print_job_timer.duration();
300
+        const progress_t progress = _get_progress();
301
+        return progress ? elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress : 0;
302
+      }
303
+      #if ENABLED(USE_M73_REMAINING_TIME)
304
+        static uint32_t remaining_time;
305
+        FORCE_INLINE static void set_remaining_time(const uint32_t r) { remaining_time = r; }
306
+        FORCE_INLINE static uint32_t get_remaining_time() { return remaining_time ?: _calculated_remaining_time(); }
307
+        FORCE_INLINE static void reset_remaining_time() { set_remaining_time(0); }
308
+      #else
309
+        FORCE_INLINE static uint32_t get_remaining_time() { return _calculated_remaining_time(); }
310 310
       #endif
311 311
     #endif
312 312
     static progress_t _get_progress();

Loading…
Cancel
Save