Fix bug in wait-for-heatup (#13290)
This commit is contained in:
parent
b0553d2d97
commit
05c2f80826
@ -2887,9 +2887,11 @@ void Temperature::isr() {
|
|||||||
|
|
||||||
if (!residency_start_ms) {
|
if (!residency_start_ms) {
|
||||||
// Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time.
|
// Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time.
|
||||||
if (temp_diff < TEMP_BED_WINDOW) residency_start_ms = now;
|
if (temp_diff < TEMP_BED_WINDOW) {
|
||||||
|
residency_start_ms = now;
|
||||||
if (first_loop) residency_start_ms += (TEMP_BED_RESIDENCY_TIME) * 1000UL;
|
if (first_loop) residency_start_ms += (TEMP_BED_RESIDENCY_TIME) * 1000UL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (temp_diff > TEMP_BED_HYSTERESIS) {
|
else if (temp_diff > TEMP_BED_HYSTERESIS) {
|
||||||
// Restart the timer whenever the temperature falls outside the hysteresis.
|
// Restart the timer whenever the temperature falls outside the hysteresis.
|
||||||
residency_start_ms = now;
|
residency_start_ms = now;
|
||||||
|
Loading…
Reference in New Issue
Block a user