Do not cancel wait-for-temperature loops in disable_heaters()
Partially revert previous change: cancelling a single loop would often advance the gcode stream to the next wait-for loop if executed at the beginning of an SD print, implicitly turning off the flag again. Cancel the loop directly in UnconditionalStop() which stops the command queue as well in an atomic way, handling this correctly.
This commit is contained in:
parent
32d8d892f5
commit
320835a1b7
@ -294,7 +294,7 @@ uint8_t newFanSpeed = 0;
|
||||
bool powersupply = true;
|
||||
#endif
|
||||
|
||||
bool cancel_heatup = false ;
|
||||
bool cancel_heatup = false;
|
||||
|
||||
int8_t busy_state = NOT_BUSY;
|
||||
static long prev_busy_signal_ms = -1;
|
||||
@ -10160,6 +10160,7 @@ void UnconditionalStop()
|
||||
|
||||
// Disable all heaters and unroll the temperature wait loop stack
|
||||
disable_heater();
|
||||
cancel_heatup = true;
|
||||
|
||||
// Clear any saved printing state
|
||||
cancel_saved_printing();
|
||||
|
@ -1416,7 +1416,6 @@ void temp_runaway_stop(bool isPreheat, bool isBed)
|
||||
|
||||
void disable_heater()
|
||||
{
|
||||
cancel_heatup = true;
|
||||
setAllTargetHotends(0);
|
||||
setTargetBed(0);
|
||||
#if defined(TEMP_0_PIN) && TEMP_0_PIN > -1
|
||||
|
@ -220,7 +220,7 @@ FORCE_INLINE bool isCoolingBed() {
|
||||
#define CHECK_ALL_HEATERS (checkAllHotends()||(target_temperature_bed!=0))
|
||||
|
||||
int getHeaterPower(int heater);
|
||||
void disable_heater(); // Disable all heaters and unroll the temperature wait loop stack
|
||||
void disable_heater(); // Disable all heaters
|
||||
void updatePID();
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user