|
@@ -20,7 +20,7 @@
|
20
|
20
|
*
|
21
|
21
|
*/
|
22
|
22
|
|
23
|
|
-#include "../inc/MarlinConfigPre.h"
|
|
23
|
+#include "../inc/MarlinConfig.h"
|
24
|
24
|
|
25
|
25
|
#ifdef LED_BACKLIGHT_TIMEOUT
|
26
|
26
|
#include "../feature/leds/leds.h"
|
|
@@ -86,6 +86,32 @@ MarlinUI ui;
|
86
|
86
|
}
|
87
|
87
|
#endif
|
88
|
88
|
|
|
89
|
+#if PREHEAT_COUNT
|
|
90
|
+ preheat_t MarlinUI::material_preset[PREHEAT_COUNT]; // Initialized by settings.load()
|
|
91
|
+ PGM_P MarlinUI::get_preheat_label(const uint8_t m) {
|
|
92
|
+ #ifdef PREHEAT_1_LABEL
|
|
93
|
+ static PGMSTR(preheat_0_label, PREHEAT_1_LABEL);
|
|
94
|
+ #endif
|
|
95
|
+ #ifdef PREHEAT_2_LABEL
|
|
96
|
+ static PGMSTR(preheat_1_label, PREHEAT_2_LABEL);
|
|
97
|
+ #endif
|
|
98
|
+ #ifdef PREHEAT_3_LABEL
|
|
99
|
+ static PGMSTR(preheat_2_label, PREHEAT_3_LABEL);
|
|
100
|
+ #endif
|
|
101
|
+ #ifdef PREHEAT_4_LABEL
|
|
102
|
+ static PGMSTR(preheat_3_label, PREHEAT_4_LABEL);
|
|
103
|
+ #endif
|
|
104
|
+ #ifdef PREHEAT_5_LABEL
|
|
105
|
+ static PGMSTR(preheat_4_label, PREHEAT_5_LABEL);
|
|
106
|
+ #endif
|
|
107
|
+
|
|
108
|
+ #define _PLBL(N) preheat_##N##_label,
|
|
109
|
+ static PGM_P const preheat_labels[PREHEAT_COUNT] PROGMEM = { REPEAT(PREHEAT_COUNT, _PLBL) };
|
|
110
|
+
|
|
111
|
+ return (PGM_P)pgm_read_ptr(&preheat_labels[m]);
|
|
112
|
+ }
|
|
113
|
+#endif
|
|
114
|
+
|
89
|
115
|
#if HAS_SPI_LCD
|
90
|
116
|
|
91
|
117
|
#if HAS_GRAPHICAL_LCD
|
|
@@ -149,33 +175,6 @@ millis_t MarlinUI::next_button_update_ms; // = 0
|
149
|
175
|
volatile int8_t encoderDiff; // Updated in update_buttons, added to encoderPosition every LCD update
|
150
|
176
|
#endif
|
151
|
177
|
|
152
|
|
-#if PREHEAT_COUNT
|
153
|
|
- preheat_t MarlinUI::material_preset[PREHEAT_COUNT]; // Initialized by settings.load()
|
154
|
|
-
|
155
|
|
- PGM_P MarlinUI::get_preheat_label(const uint8_t m) {
|
156
|
|
- #ifdef PREHEAT_1_LABEL
|
157
|
|
- static PGMSTR(preheat_0_label, PREHEAT_1_LABEL);
|
158
|
|
- #endif
|
159
|
|
- #ifdef PREHEAT_2_LABEL
|
160
|
|
- static PGMSTR(preheat_1_label, PREHEAT_2_LABEL);
|
161
|
|
- #endif
|
162
|
|
- #ifdef PREHEAT_3_LABEL
|
163
|
|
- static PGMSTR(preheat_2_label, PREHEAT_3_LABEL);
|
164
|
|
- #endif
|
165
|
|
- #ifdef PREHEAT_4_LABEL
|
166
|
|
- static PGMSTR(preheat_3_label, PREHEAT_4_LABEL);
|
167
|
|
- #endif
|
168
|
|
- #ifdef PREHEAT_5_LABEL
|
169
|
|
- static PGMSTR(preheat_4_label, PREHEAT_5_LABEL);
|
170
|
|
- #endif
|
171
|
|
-
|
172
|
|
- #define _PLBL(N) preheat_##N##_label,
|
173
|
|
- static PGM_P const preheat_labels[PREHEAT_COUNT] PROGMEM = { REPEAT(PREHEAT_COUNT, _PLBL) };
|
174
|
|
-
|
175
|
|
- return (PGM_P)pgm_read_ptr(&preheat_labels[m]);
|
176
|
|
- }
|
177
|
|
-#endif
|
178
|
|
-
|
179
|
178
|
#if ENABLED(SDSUPPORT)
|
180
|
179
|
|
181
|
180
|
#include "../sd/cardreader.h"
|