@@ -302,10 +302,16 @@ class MarlinUI {
302
302
static void set_progress (const progress_t p) { progress_override = _MIN (p, 100U * (PROGRESS_SCALE)); }
303
303
static void set_progress_done () { progress_override = (PROGRESS_MASK + 1U ) + 100U * (PROGRESS_SCALE); }
304
304
static void progress_reset () { if (progress_override & (PROGRESS_MASK + 1U )) set_progress (0 ); }
305
+ #if ENABLED(USE_M73_REMAINING_TIME)
306
+ static uint32_t remaining_time;
307
+ FORCE_INLINE static void set_remaining_time (const uint32_t r) { remaining_time = r; }
308
+ FORCE_INLINE static uint32_t get_remaining_time () { return remaining_time; }
309
+ FORCE_INLINE static void reset_remaining_time () { set_remaining_time (0 ); }
310
+ #endif
305
311
#endif
306
312
static progress_t _get_progress ();
307
313
#if HAS_PRINT_PROGRESS_PERMYRIAD
308
- static uint16_t get_progress_permyriad () { return _get_progress (); }
314
+ FORCE_INLINE static uint16_t get_progress_permyriad () { return _get_progress (); }
309
315
#endif
310
316
static uint8_t get_progress_percent () { return uint8_t (_get_progress () / (PROGRESS_SCALE)); }
311
317
#else
@@ -319,9 +325,9 @@ class MarlinUI {
319
325
static bool detected ();
320
326
321
327
static LCDViewAction lcdDrawUpdate;
322
- static inline bool should_draw () { return bool (lcdDrawUpdate); }
323
- static inline void refresh (const LCDViewAction type) { lcdDrawUpdate = type; }
324
- static inline void refresh () { refresh (LCDVIEW_CLEAR_CALL_REDRAW); }
328
+ FORCE_INLINE static bool should_draw () { return bool (lcdDrawUpdate); }
329
+ FORCE_INLINE static void refresh (const LCDViewAction type) { lcdDrawUpdate = type; }
330
+ FORCE_INLINE static void refresh () { refresh (LCDVIEW_CLEAR_CALL_REDRAW); }
325
331
326
332
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
327
333
static void draw_custom_bootscreen (const uint8_t frame=0 );
@@ -351,7 +357,7 @@ class MarlinUI {
351
357
static void draw_progress_bar (const uint8_t percent);
352
358
#if PROGRESS_MSG_EXPIRE > 0
353
359
static millis_t expire_status_ms; // = 0
354
- static inline void reset_progress_bar_timeout () { expire_status_ms = 0 ; }
360
+ FORCE_INLINE static void reset_progress_bar_timeout () { expire_status_ms = 0 ; }
355
361
#endif
356
362
#endif
357
363
@@ -362,7 +368,7 @@ class MarlinUI {
362
368
#if HAS_LCD_CONTRAST
363
369
static int16_t contrast;
364
370
static void set_contrast (const int16_t value);
365
- static inline void refresh_contrast () { set_contrast (contrast); }
371
+ FORCE_INLINE static void refresh_contrast () { set_contrast (contrast); }
366
372
#endif
367
373
368
374
#if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
@@ -470,18 +476,18 @@ class MarlinUI {
470
476
#if ENABLED(TURBO_BACK_MENU_ITEM)
471
477
// Various menu items require a "void (*)()" to point to
472
478
// this function so a default argument *won't* work
473
- static inline void goto_previous_screen () { goto_previous_screen (false ); }
479
+ FORCE_INLINE static void goto_previous_screen () { goto_previous_screen (false ); }
474
480
#endif
475
481
476
482
static void return_to_status ();
477
483
static inline bool on_status_screen () { return currentScreen == status_screen; }
478
- static inline void run_current_screen () { (*currentScreen)(); }
484
+ FORCE_INLINE static void run_current_screen () { (*currentScreen)(); }
479
485
480
486
#if ENABLED(LIGHTWEIGHT_UI)
481
487
static void lcd_in_status (const bool inStatus);
482
488
#endif
483
489
484
- static inline void defer_status_screen (const bool defer=true ) {
490
+ FORCE_INLINE static void defer_status_screen (const bool defer=true ) {
485
491
#if LCD_TIMEOUT_TO_STATUS
486
492
defer_return_to_status = defer;
487
493
#else
@@ -499,7 +505,7 @@ class MarlinUI {
499
505
#endif
500
506
501
507
#if ENABLED(G26_MESH_VALIDATION)
502
- static inline void chirp () {
508
+ FORCE_INLINE static void chirp () {
503
509
#if HAS_BUZZER
504
510
buzz (LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
505
511
#endif
@@ -516,7 +522,7 @@ class MarlinUI {
516
522
517
523
static constexpr bool lcd_clicked = false ;
518
524
static constexpr bool on_status_screen () { return true ; }
519
- static inline void run_current_screen () { status_screen (); }
525
+ FORCE_INLINE static void run_current_screen () { status_screen (); }
520
526
521
527
#endif
522
528
@@ -562,22 +568,27 @@ class MarlinUI {
562
568
563
569
#if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION)
564
570
static int8_t encoderDirection;
565
- static inline void encoder_direction_normal () { encoderDirection = ENCODERBASE; }
566
571
#else
567
572
static constexpr int8_t encoderDirection = ENCODERBASE;
568
- static inline void encoder_direction_normal () {}
569
573
#endif
570
574
571
- #if ENABLED(REVERSE_MENU_DIRECTION)
572
- static inline void encoder_direction_menus () { encoderDirection = -(ENCODERBASE); }
573
- #else
574
- static inline void encoder_direction_menus () {}
575
- #endif
576
- #if ENABLED(REVERSE_SELECT_DIRECTION)
577
- static inline void encoder_direction_select () { encoderDirection = -(ENCODERBASE); }
578
- #else
579
- static inline void encoder_direction_select () {}
580
- #endif
575
+ FORCE_INLINE static void encoder_direction_normal () {
576
+ #if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION)
577
+ encoderDirection = ENCODERBASE;
578
+ #endif
579
+ }
580
+
581
+ FORCE_INLINE static void encoder_direction_menus () {
582
+ #if ENABLED(REVERSE_MENU_DIRECTION)
583
+ encoderDirection = -(ENCODERBASE);
584
+ #endif
585
+ }
586
+
587
+ FORCE_INLINE static void encoder_direction_select () {
588
+ #if ENABLED(REVERSE_SELECT_DIRECTION)
589
+ encoderDirection = -(ENCODERBASE);
590
+ #endif
591
+ }
581
592
582
593
#else
583
594
0 commit comments