@@ -317,7 +317,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
317
317
318
318
#if HAS_HOTEND
319
319
hotend_info_t Temperature::temp_hotend[HOTENDS];
320
- const celsius_t Temperature::hotend_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP) ;
320
+ constexpr celsius_t Temperature::hotend_maxtemp[HOTENDS];
321
321
322
322
// Sanity-check max readable temperatures
323
323
#define CHECK_MAXTEMP_ (N,M,S ) static_assert ( \
@@ -328,12 +328,41 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
328
328
329
329
#if HAS_PREHEAT
330
330
#define CHECK_PREHEAT__ (N,P,T,M ) static_assert (T <= M - HOTEND_OVERSHOOT, " PREHEAT_" STRINGIFY(P) " _TEMP_HOTEND (" STRINGIFY(T) " ) must be less than HEATER_" STRINGIFY(N) " _MAXTEMP (" STRINGIFY(M) " ) - " STRINGIFY(HOTEND_OVERSHOOT) " ." );
331
- #define CHECK_PREHEAT_ (N,P ) CHECK_PREHEAT__(N, P, PREHEAT_##P##_TEMP_HOTEND, HEATER_##N##_MAXTEMP);
332
- #define CHECK_PREHEAT (P ) REPEAT2(HOTENDS, CHECK_PREHEAT_, P);
333
- RREPEAT_1 (PREHEAT_COUNT, CHECK_PREHEAT)
334
- #endif
331
+ #define CHECK_PREHEAT_ (N,P ) CHECK_PREHEAT__(N, P, PREHEAT_##P##_TEMP_HOTEND, HEATER_##N##_MAXTEMP)
332
+ #define CHECK_PREHEAT (P ) REPEAT2(HOTENDS, CHECK_PREHEAT_, P)
333
+ #if PREHEAT_COUNT >= 1
334
+ CHECK_PREHEAT (1 )
335
+ #endif
336
+ #if PREHEAT_COUNT >= 2
337
+ CHECK_PREHEAT (2 )
338
+ #endif
339
+ #if PREHEAT_COUNT >= 3
340
+ CHECK_PREHEAT (3 )
341
+ #endif
342
+ #if PREHEAT_COUNT >= 4
343
+ CHECK_PREHEAT (4 )
344
+ #endif
345
+ #if PREHEAT_COUNT >= 5
346
+ CHECK_PREHEAT (5 )
347
+ #endif
348
+ #if PREHEAT_COUNT >= 6
349
+ CHECK_PREHEAT (6 )
350
+ #endif
351
+ #if PREHEAT_COUNT >= 7
352
+ CHECK_PREHEAT (7 )
353
+ #endif
354
+ #if PREHEAT_COUNT >= 8
355
+ CHECK_PREHEAT (8 )
356
+ #endif
357
+ #if PREHEAT_COUNT >= 9
358
+ CHECK_PREHEAT (9 )
359
+ #endif
360
+ #if PREHEAT_COUNT >= 10
361
+ CHECK_PREHEAT (10 )
362
+ #endif
363
+ #endif // HAS_PREHEAT
335
364
336
- #endif
365
+ #endif // HAS_HOTEND
337
366
338
367
#if HAS_TEMP_REDUNDANT
339
368
redundant_info_t Temperature::temp_redundant;
0 commit comments