Add and apply REPEAT_1 macro
This commit is contained in:
@@ -114,8 +114,8 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||
PGM_P MarlinUI::get_preheat_label(const uint8_t m) {
|
||||
#define _PDEF(N) static PGMSTR(preheat_##N##_label, PREHEAT_##N##_LABEL);
|
||||
#define _PLBL(N) preheat_##N##_label,
|
||||
REPEAT_S(1, INCREMENT(PREHEAT_COUNT), _PDEF);
|
||||
static PGM_P const preheat_labels[PREHEAT_COUNT] PROGMEM = { REPEAT_S(1, INCREMENT(PREHEAT_COUNT), _PLBL) };
|
||||
REPEAT_1(PREHEAT_COUNT, _PDEF);
|
||||
static PGM_P const preheat_labels[PREHEAT_COUNT] PROGMEM = { REPEAT_1(PREHEAT_COUNT, _PLBL) };
|
||||
return (PGM_P)pgm_read_ptr(&preheat_labels[m]);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user