瀏覽代碼

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…
取消
儲存