|
|
@ -2912,6 +2912,7 @@ void Temperature::tick() { |
|
|
|
) { |
|
|
|
#if TEMP_RESIDENCY_TIME > 0 |
|
|
|
millis_t residency_start_ms = 0; |
|
|
|
bool first_loop = true; |
|
|
|
// Loop until the temperature has stabilized
|
|
|
|
#define TEMP_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + (TEMP_RESIDENCY_TIME) * 1000UL)) |
|
|
|
#else |
|
|
@ -2929,7 +2930,7 @@ void Temperature::tick() { |
|
|
|
#endif |
|
|
|
|
|
|
|
float target_temp = -1.0, old_temp = 9999.0; |
|
|
|
bool wants_to_cool = false, first_loop = true; |
|
|
|
bool wants_to_cool = false; |
|
|
|
wait_for_heatup = true; |
|
|
|
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; |
|
|
|
do { |
|
|
@ -2982,6 +2983,8 @@ void Temperature::tick() { |
|
|
|
residency_start_ms = now; |
|
|
|
} |
|
|
|
|
|
|
|
first_loop = false; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
// Prevent a wait-forever situation if R is misused i.e. M109 R0
|
|
|
@ -3002,8 +3005,6 @@ void Temperature::tick() { |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
first_loop = false; |
|
|
|
|
|
|
|
} while (wait_for_heatup && TEMP_CONDITIONS); |
|
|
|
|
|
|
|
if (wait_for_heatup) { |
|
|
@ -3151,6 +3152,7 @@ void Temperature::tick() { |
|
|
|
bool Temperature::wait_for_chamber(const bool no_wait_for_cooling/*=true*/) { |
|
|
|
#if TEMP_CHAMBER_RESIDENCY_TIME > 0 |
|
|
|
millis_t residency_start_ms = 0; |
|
|
|
bool first_loop = true; |
|
|
|
// Loop until the temperature has stabilized
|
|
|
|
#define TEMP_CHAMBER_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + (TEMP_CHAMBER_RESIDENCY_TIME) * 1000UL)) |
|
|
|
#else |
|
|
@ -3159,7 +3161,7 @@ void Temperature::tick() { |
|
|
|
#endif |
|
|
|
|
|
|
|
float target_temp = -1, old_temp = 9999; |
|
|
|
bool wants_to_cool = false, first_loop = true; |
|
|
|
bool wants_to_cool = false; |
|
|
|
wait_for_heatup = true; |
|
|
|
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; |
|
|
|
|
|
|
@ -3212,6 +3214,7 @@ void Temperature::tick() { |
|
|
|
residency_start_ms = now; |
|
|
|
} |
|
|
|
|
|
|
|
first_loop = false; |
|
|
|
#endif // TEMP_CHAMBER_RESIDENCY_TIME > 0
|
|
|
|
|
|
|
|
// Prevent a wait-forever situation if R is misused i.e. M191 R0
|
|
|
@ -3224,9 +3227,6 @@ void Temperature::tick() { |
|
|
|
old_temp = temp; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
first_loop = false; |
|
|
|
|
|
|
|
} while (wait_for_heatup && TEMP_CHAMBER_CONDITIONS); |
|
|
|
|
|
|
|
if (wait_for_heatup) ui.reset_status(); |
|
|
|