Browse Source

Merge pull request #2137 from thinkyhead/tweak_swh

Move millis call in start_watching_heater
AnHardt 9 years ago
parent
commit
94dff5b36a
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      Marlin/temperature.cpp

+ 1
- 2
Marlin/temperature.cpp View File

@@ -1004,10 +1004,9 @@ void tp_init() {
1004 1004
    * This is called when the temperature is set. (M104, M109)
1005 1005
    */
1006 1006
   void start_watching_heater(int e) {
1007
-    millis_t ms = millis() + WATCH_TEMP_PERIOD * 1000;
1008 1007
     if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) {
1009 1008
       watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE;
1010
-      watch_heater_next_ms[e] = ms;
1009
+      watch_heater_next_ms[e] = millis() + WATCH_TEMP_PERIOD * 1000;;
1011 1010
     }
1012 1011
     else
1013 1012
       watch_heater_next_ms[e] = 0;

Loading…
Cancel
Save