Browse Source

pid_autotune parity with 2.0.x

Scott Lahteine 7 years ago
parent
commit
193a0e9273
No account linked to committer's email address
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      Marlin/temperature.cpp

+ 5
- 5
Marlin/temperature.cpp View File

220
     int cycles = 0;
220
     int cycles = 0;
221
     bool heating = true;
221
     bool heating = true;
222
 
222
 
223
-    millis_t temp_ms = millis(), t1 = temp_ms, t2 = temp_ms;
223
+    millis_t next_temp_ms = millis(), t1 = next_temp_ms, t2 = next_temp_ms;
224
     long t_high = 0, t_low = 0;
224
     long t_high = 0, t_low = 0;
225
 
225
 
226
     long bias, d;
226
     long bias, d;
256
           TEMP_HYSTERESIS
256
           TEMP_HYSTERESIS
257
         #endif
257
         #endif
258
       ;
258
       ;
259
-      millis_t temp_change_ms = temp_ms + watch_temp_period * 1000UL;
259
+      millis_t temp_change_ms = next_temp_ms + watch_temp_period * 1000UL;
260
       float next_watch_temp = 0.0;
260
       float next_watch_temp = 0.0;
261
       bool heated = false;
261
       bool heated = false;
262
     #endif
262
     #endif
263
 
263
 
264
     #if HAS_AUTO_FAN
264
     #if HAS_AUTO_FAN
265
-      next_auto_fan_check_ms = temp_ms + 2500UL;
265
+      next_auto_fan_check_ms = next_temp_ms + 2500UL;
266
     #endif
266
     #endif
267
 
267
 
268
     #if ENABLED(PIDTEMP)
268
     #if ENABLED(PIDTEMP)
419
         break;
419
         break;
420
       }
420
       }
421
       // Every 2 seconds...
421
       // Every 2 seconds...
422
-      if (ELAPSED(ms, temp_ms)) {
422
+      if (ELAPSED(ms, next_temp_ms)) {
423
         #if HAS_TEMP_HOTEND || HAS_TEMP_BED
423
         #if HAS_TEMP_HOTEND || HAS_TEMP_BED
424
           print_heaterstates();
424
           print_heaterstates();
425
           SERIAL_EOL();
425
           SERIAL_EOL();
426
         #endif
426
         #endif
427
 
427
 
428
-        temp_ms = ms + 2000UL;
428
+        next_temp_ms = ms + 2000UL;
429
 
429
 
430
         #if WATCH_THE_BED || WATCH_HOTENDS
430
         #if WATCH_THE_BED || WATCH_HOTENDS
431
           if (!heated && input > next_watch_temp) {
431
           if (!heated && input > next_watch_temp) {

Loading…
Cancel
Save