Browse Source

Fix bug in wait-for-heatup (#13290)

kAdonis 6 years ago
parent
commit
05c2f80826
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      Marlin/src/module/temperature.cpp

+ 4
- 2
Marlin/src/module/temperature.cpp View File

@@ -2887,8 +2887,10 @@ void Temperature::isr() {
2887 2887
 
2888 2888
           if (!residency_start_ms) {
2889 2889
             // Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time.
2890
-            if (temp_diff < TEMP_BED_WINDOW) residency_start_ms = now;
2891
-            if (first_loop) residency_start_ms += (TEMP_BED_RESIDENCY_TIME) * 1000UL;
2890
+            if (temp_diff < TEMP_BED_WINDOW) {
2891
+              residency_start_ms = now;
2892
+              if (first_loop) residency_start_ms += (TEMP_BED_RESIDENCY_TIME) * 1000UL;
2893
+            }
2892 2894
           }
2893 2895
           else if (temp_diff > TEMP_BED_HYSTERESIS) {
2894 2896
             // Restart the timer whenever the temperature falls outside the hysteresis.

Loading…
Cancel
Save