Fix some Power Loss Recovery behaviors (#18558)
This commit is contained in:
@@ -2026,33 +2026,29 @@ void Temperature::disable_all_heaters() {
|
||||
|
||||
TERN_(AUTOTEMP, planner.autotemp_enabled = false);
|
||||
|
||||
#if HAS_HOTEND
|
||||
HOTEND_LOOP() setTargetHotend(0, e);
|
||||
#endif
|
||||
TERN_(HAS_HEATED_BED, setTargetBed(0));
|
||||
TERN_(HAS_HEATED_CHAMBER, setTargetChamber(0));
|
||||
|
||||
// Unpause and reset everything
|
||||
TERN_(PROBING_HEATERS_OFF, pause(false));
|
||||
|
||||
#define DISABLE_HEATER(N) { \
|
||||
setTargetHotend(0, N); \
|
||||
temp_hotend[N].soft_pwm_amount = 0; \
|
||||
WRITE_HEATER_##N(LOW); \
|
||||
}
|
||||
#if HAS_HOTEND
|
||||
HOTEND_LOOP() {
|
||||
setTargetHotend(0, e);
|
||||
temp_hotend[e].soft_pwm_amount = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_TEMP_HOTEND
|
||||
#define DISABLE_HEATER(N) WRITE_HEATER_##N(LOW)
|
||||
REPEAT(HOTENDS, DISABLE_HEATER);
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
temp_bed.target = 0;
|
||||
setTargetBed(0);
|
||||
temp_bed.soft_pwm_amount = 0;
|
||||
WRITE_HEATER_BED(LOW);
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_CHAMBER
|
||||
temp_chamber.target = 0;
|
||||
setTargetChamber(0);
|
||||
temp_chamber.soft_pwm_amount = 0;
|
||||
WRITE_HEATER_CHAMBER(LOW);
|
||||
#endif
|
||||
|
@@ -576,7 +576,7 @@ class Temperature {
|
||||
else if (temp_hotend[ee].target == 0)
|
||||
start_preheat_time(ee);
|
||||
#endif
|
||||
TERN_(AUTO_POWER_CONTROL, powerManager.power_on());
|
||||
TERN_(AUTO_POWER_CONTROL, if (celsius) powerManager.power_on());
|
||||
temp_hotend[ee].target = _MIN(celsius, temp_range[ee].maxtemp - HOTEND_OVERSHOOT);
|
||||
start_watching_hotend(ee);
|
||||
}
|
||||
@@ -624,7 +624,7 @@ class Temperature {
|
||||
#endif
|
||||
|
||||
static void setTargetBed(const int16_t celsius) {
|
||||
TERN_(AUTO_POWER_CONTROL, powerManager.power_on());
|
||||
TERN_(AUTO_POWER_CONTROL, if (celsius) powerManager.power_on());
|
||||
temp_bed.target =
|
||||
#ifdef BED_MAX_TARGET
|
||||
_MIN(celsius, BED_MAX_TARGET)
|
||||
|
Reference in New Issue
Block a user