Add HAS_HOTEND, etc.
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
extern int8_t encoderLine, encoderTopLine, screen_items;
|
||||
|
||||
#if HOTENDS
|
||||
#if HAS_HOTEND
|
||||
constexpr int16_t heater_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);
|
||||
#endif
|
||||
|
||||
|
@@ -233,9 +233,9 @@ void menu_cancelobject();
|
||||
#define DEFINE_PIDTEMP_FUNCS(N) _DEFINE_PIDTEMP_BASE_FUNCS(N);
|
||||
#endif
|
||||
|
||||
#if HOTENDS
|
||||
#if HAS_HOTEND
|
||||
DEFINE_PIDTEMP_FUNCS(0);
|
||||
#if HOTENDS > 1 && ENABLED(PID_PARAMS_PER_HOTEND)
|
||||
#if HAS_MULTI_HOTEND && ENABLED(PID_PARAMS_PER_HOTEND)
|
||||
REPEAT_S(1, HOTENDS, DEFINE_PIDTEMP_FUNCS)
|
||||
#endif
|
||||
#endif
|
||||
@@ -308,7 +308,7 @@ void menu_cancelobject();
|
||||
#endif
|
||||
|
||||
PID_EDIT_MENU_ITEMS(0);
|
||||
#if HOTENDS > 1 && ENABLED(PID_PARAMS_PER_HOTEND)
|
||||
#if HAS_MULTI_HOTEND && ENABLED(PID_PARAMS_PER_HOTEND)
|
||||
REPEAT_S(1, HOTENDS, PID_EDIT_MENU_ITEMS)
|
||||
#endif
|
||||
|
||||
|
@@ -48,7 +48,7 @@ uint8_t MarlinUI::preheat_fan_speed[2];
|
||||
//
|
||||
|
||||
void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb, const uint8_t fan) {
|
||||
#if HOTENDS
|
||||
#if HAS_HOTEND
|
||||
if (temph > 0) thermalManager.setTargetHotend(_MIN(heater_maxtemp[endnum] - 15, temph), endnum);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
@@ -107,7 +107,7 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
|
||||
#else
|
||||
ACTION_ITEM(MSG_PREHEAT_1, []{ _preheat_end(0, 0); });
|
||||
#endif
|
||||
#elif HOTENDS > 1
|
||||
#elif HAS_MULTI_HOTEND
|
||||
#if HAS_HEATED_BED
|
||||
_PREHEAT_ITEMS(1,0);
|
||||
#endif
|
||||
@@ -118,7 +118,7 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
|
||||
#endif
|
||||
HOTEND_LOOP() thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], e);
|
||||
});
|
||||
#endif // HOTENDS > 1
|
||||
#endif // HAS_MULTI_HOTEND
|
||||
#if HAS_HEATED_BED
|
||||
ACTION_ITEM(MSG_PREHEAT_1_BEDONLY, []{ _preheat_bed(0); });
|
||||
#endif
|
||||
@@ -135,7 +135,7 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
|
||||
#else
|
||||
ACTION_ITEM(MSG_PREHEAT_2, []{ _preheat_end(1, 0); });
|
||||
#endif
|
||||
#elif HOTENDS > 1
|
||||
#elif HAS_MULTI_HOTEND
|
||||
#if HAS_HEATED_BED
|
||||
_PREHEAT_ITEMS(2,0);
|
||||
#endif
|
||||
@@ -146,7 +146,7 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
|
||||
#endif
|
||||
HOTEND_LOOP() thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], e);
|
||||
});
|
||||
#endif // HOTENDS > 1
|
||||
#endif // HAS_MULTI_HOTEND
|
||||
#if HAS_HEATED_BED
|
||||
ACTION_ITEM(MSG_PREHEAT_2_BEDONLY, []{ _preheat_bed(1); });
|
||||
#endif
|
||||
@@ -171,7 +171,7 @@ void menu_temperature() {
|
||||
//
|
||||
#if HOTENDS == 1
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); });
|
||||
#elif HOTENDS > 1
|
||||
#elif HAS_MULTI_HOTEND
|
||||
HOTEND_LOOP()
|
||||
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, heater_maxtemp[e] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
#endif
|
||||
|
@@ -127,7 +127,7 @@ void menu_tune() {
|
||||
//
|
||||
#if HOTENDS == 1
|
||||
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, []{ thermalManager.start_watching_hotend(0); });
|
||||
#elif HOTENDS > 1
|
||||
#elif HAS_MULTI_HOTEND
|
||||
HOTEND_LOOP()
|
||||
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, heater_maxtemp[e] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user