|
|
|
@ -1946,13 +1946,15 @@ void process_commands()
|
|
|
|
|
/* See if we are heating up or cooling down */
|
|
|
|
|
target_direction = isHeatingHotend(tmp_extruder); // true if heating, false if cooling
|
|
|
|
|
|
|
|
|
|
forced_heating_stop = true;
|
|
|
|
|
|
|
|
|
|
#ifdef TEMP_RESIDENCY_TIME
|
|
|
|
|
long residencyStart;
|
|
|
|
|
residencyStart = -1;
|
|
|
|
|
/* continue to loop until we have reached the target temp
|
|
|
|
|
_and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
|
|
|
|
|
while((residencyStart == -1) ||
|
|
|
|
|
(residencyStart >= 0 && (((unsigned int) (millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL))) ) {
|
|
|
|
|
while((forced_heating_stop == true)&&((residencyStart == -1) ||
|
|
|
|
|
(residencyStart >= 0 && (((unsigned int) (millis() - residencyStart)) < (TEMP_RESIDENCY_TIME * 1000UL)))) ) {
|
|
|
|
|
#else
|
|
|
|
|
while ( target_direction ? (isHeatingHotend(tmp_extruder)) : (isCoolingHotend(tmp_extruder)&&(CooldownNoWait==false)) ) {
|
|
|
|
|
#endif //TEMP_RESIDENCY_TIME
|
|
|
|
|