More "zero extruders" changes (#15213)
This commit is contained in:
@ -168,7 +168,7 @@ namespace ExtUI {
|
||||
}
|
||||
|
||||
void enableHeater(const extruder_t extruder) {
|
||||
#if HEATER_IDLE_HANDLER
|
||||
#if HOTENDS && HEATER_IDLE_HANDLER
|
||||
thermalManager.reset_heater_idle_timer(extruder - E0);
|
||||
#endif
|
||||
}
|
||||
@ -184,14 +184,18 @@ namespace ExtUI {
|
||||
#if HAS_HEATED_CHAMBER
|
||||
case CHAMBER: return; // Chamber has no idle timer
|
||||
#endif
|
||||
default: thermalManager.reset_heater_idle_timer(heater - H0);
|
||||
default:
|
||||
#if HOTENDS
|
||||
thermalManager.reset_heater_idle_timer(heater - H0);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isHeaterIdle(const extruder_t extruder) {
|
||||
return false
|
||||
#if HEATER_IDLE_HANDLER
|
||||
#if HOTENDS && HEATER_IDLE_HANDLER
|
||||
|| thermalManager.hotend_idle[extruder - E0].timed_out
|
||||
#endif
|
||||
;
|
||||
@ -206,7 +210,12 @@ namespace ExtUI {
|
||||
#if HAS_HEATED_CHAMBER
|
||||
case CHAMBER: return false; // Chamber has no idle timer
|
||||
#endif
|
||||
default: return thermalManager.hotend_idle[heater - H0].timed_out;
|
||||
default:
|
||||
#if HOTENDS
|
||||
return thermalManager.hotend_idle[heater - H0].timed_out;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
return false;
|
||||
@ -841,22 +850,28 @@ namespace ExtUI {
|
||||
}
|
||||
|
||||
void setTargetTemp_celsius(float value, const heater_t heater) {
|
||||
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
|
||||
const int16_t e = heater - H0;
|
||||
enableHeater(heater);
|
||||
#if HAS_HEATED_BED
|
||||
if (heater == BED)
|
||||
thermalManager.setTargetBed(clamp(value, 0, BED_MAXTEMP - 10));
|
||||
else
|
||||
#endif
|
||||
thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e);
|
||||
{
|
||||
#if HOTENDS
|
||||
static constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
|
||||
const int16_t e = heater - H0;
|
||||
thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void setTargetTemp_celsius(float value, const extruder_t extruder) {
|
||||
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
|
||||
const int16_t e = extruder - E0;
|
||||
enableHeater(extruder);
|
||||
thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e);
|
||||
#if HOTENDS
|
||||
constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
|
||||
const int16_t e = extruder - E0;
|
||||
enableHeater(extruder);
|
||||
thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e);
|
||||
#endif
|
||||
}
|
||||
|
||||
void setTargetFan_percent(const float value, const fan_t fan) {
|
||||
|
Reference in New Issue
Block a user