Browse Source

Compact MIN/MAXTEMP_ALL

Scott Lahteine 5 years ago
parent
commit
51ae13fc8c
1 changed files with 2 additions and 19 deletions
  1. 2
    19
      Marlin/src/lcd/menu/menu_configuration.cpp

+ 2
- 19
Marlin/src/lcd/menu/menu_configuration.cpp View File

294
 #if DISABLED(SLIM_LCD_MENUS)
294
 #if DISABLED(SLIM_LCD_MENUS)
295
 
295
 
296
   void _menu_configuration_preheat_settings(const uint8_t material) {
296
   void _menu_configuration_preheat_settings(const uint8_t material) {
297
-    #if HOTENDS > 5
298
-      #define MINTEMP_ALL _MIN(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP, HEATER_4_MINTEMP, HEATER_5_MINTEMP)
299
-      #define MAXTEMP_ALL _MAX(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP)
300
-    #elif HOTENDS > 4
301
-      #define MINTEMP_ALL _MIN(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP, HEATER_4_MINTEMP)
302
-      #define MAXTEMP_ALL _MAX(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP)
303
-    #elif HOTENDS > 3
304
-      #define MINTEMP_ALL _MIN(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP)
305
-      #define MAXTEMP_ALL _MAX(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP)
306
-    #elif HOTENDS > 2
307
-      #define MINTEMP_ALL _MIN(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP)
308
-      #define MAXTEMP_ALL _MAX(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP)
309
-    #elif HOTENDS > 1
310
-      #define MINTEMP_ALL _MIN(HEATER_0_MINTEMP, HEATER_1_MINTEMP)
311
-      #define MAXTEMP_ALL _MAX(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP)
312
-    #else
313
-      #define MINTEMP_ALL HEATER_0_MINTEMP
314
-      #define MAXTEMP_ALL HEATER_0_MAXTEMP
315
-    #endif
297
+    #define MINTEMP_ALL _MIN(LIST_N(HOTENDS, HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP, HEATER_4_MINTEMP, HEATER_5_MINTEMP), 999)
298
+    #define MAXTEMP_ALL _MAX(LIST_N(HOTENDS, HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP), 0)
316
     START_MENU();
299
     START_MENU();
317
     BACK_ITEM(MSG_CONFIGURATION);
300
     BACK_ITEM(MSG_CONFIGURATION);
318
     EDIT_ITEM(percent, MSG_FAN_SPEED, &ui.preheat_fan_speed[material], 0, 255);
301
     EDIT_ITEM(percent, MSG_FAN_SPEED, &ui.preheat_fan_speed[material], 0, 255);

Loading…
Cancel
Save