Skip to content

Commit af553d5

Browse files
committed
🔨 Solve a linker error
Fixes #27864
1 parent 3cd945a commit af553d5

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Marlin/src/lcd/marlinui.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ MarlinUI ui;
6262
#include "../module/printcounter.h"
6363
#endif
6464

65+
#if HAS_WIRED_LCD || HAS_PREHEAT
66+
#include "../module/temperature.h"
67+
#endif
68+
6569
#if LCD_HAS_WAIT_FOR_MOVE
6670
bool MarlinUI::wait_for_move; // = false
6771
#endif
@@ -136,8 +140,6 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
136140
#endif
137141

138142
#if HAS_PREHEAT
139-
#include "../module/temperature.h"
140-
141143
preheat_t MarlinUI::material_preset[PREHEAT_COUNT]; // Initialized by settings.load
142144

143145
void MarlinUI::reset_material_presets() {
@@ -331,7 +333,6 @@ void MarlinUI::init() {
331333

332334
#include "lcdprint.h"
333335

334-
#include "../module/temperature.h"
335336
#include "../module/planner.h"
336337
#include "../module/motion.h"
337338

@@ -1883,7 +1884,7 @@ uint8_t expand_u8str_P(char * const outstr, PGM_P const ptpl, const int8_t ind,
18831884
);
18841885
}
18851886

1886-
#if LCD_WITH_BLINK && HAS_EXTRA_PROGRESS
1887+
#if HAS_ROTATE_PROGRESS
18871888

18881889
// Renew and redraw all enabled progress strings
18891890
void MarlinUI::rotate_progress() {
@@ -1903,7 +1904,7 @@ uint8_t expand_u8str_P(char * const outstr, PGM_P const ptpl, const int8_t ind,
19031904
}
19041905
}
19051906

1906-
#endif // LCD_WITH_BLINK && HAS_EXTRA_PROGRESS
1907+
#endif // HAS_ROTATE_PROGRESS
19071908

19081909
#endif // HAS_PRINT_PROGRESS
19091910

Marlin/src/lcd/marlinui.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ typedef bool (*statusResetFunc_t)();
9595
#define LCD_UPDATE_INTERVAL DIV_TERN(DOUBLE_LCD_FRAMERATE, TERN(HAS_TOUCH_BUTTONS, 50, 100), 2)
9696
#endif
9797

98+
#if LCD_WITH_BLINK && HAS_EXTRA_PROGRESS && !IS_DWIN_MARLINUI
99+
#define HAS_ROTATE_PROGRESS 1
100+
#endif
101+
98102
#if HAS_MARLINUI_U8GLIB
99103
enum MarlinFont : uint8_t {
100104
FONT_STATUSMENU = 1,
@@ -347,7 +351,7 @@ class MarlinUI {
347351
FORCE_INLINE static uint16_t get_progress_permyriad() { return _get_progress(); }
348352
#endif
349353
static uint8_t get_progress_percent() { return uint8_t(_get_progress() / (PROGRESS_SCALE)); }
350-
#if LCD_WITH_BLINK && HAS_EXTRA_PROGRESS
354+
#if HAS_ROTATE_PROGRESS
351355
#if ENABLED(SHOW_PROGRESS_PERCENT)
352356
static void drawPercent();
353357
#endif

0 commit comments

Comments
 (0)