소스 검색

Compact MIN/MAXTEMP_ALL

Scott Lahteine 5 년 전
부모
커밋
51ae13fc8c
1개의 변경된 파일2개의 추가작업 그리고 19개의 파일을 삭제
  1. 2
    19
      Marlin/src/lcd/menu/menu_configuration.cpp

+ 2
- 19
Marlin/src/lcd/menu/menu_configuration.cpp 파일 보기

@@ -294,25 +294,8 @@ static void lcd_factory_settings() {
294 294
 #if DISABLED(SLIM_LCD_MENUS)
295 295
 
296 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 299
     START_MENU();
317 300
     BACK_ITEM(MSG_CONFIGURATION);
318 301
     EDIT_ITEM(percent, MSG_FAN_SPEED, &ui.preheat_fan_speed[material], 0, 255);

Loading…
취소
저장