瀏覽代碼

Temperature updates for parity with 1.1.x

Scott Lahteine 7 年之前
父節點
當前提交
5e01ee8adf
共有 2 個檔案被更改,包括 126 行新增112 行删除
  1. 82
    84
      Marlin/src/module/temperature.cpp
  2. 44
    28
      Marlin/src/module/temperature.h

+ 82
- 84
Marlin/src/module/temperature.cpp 查看文件

@@ -244,11 +244,11 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS],
244 244
       ;
245 245
       const int8_t watch_temp_period =
246 246
         #if ENABLED(THERMAL_PROTECTION_BED) && ENABLED(PIDTEMPBED) && ENABLED(THERMAL_PROTECTION_HOTENDS) && ENABLED(PIDTEMP)
247
-          hotend < 0 ? THERMAL_PROTECTION_BED_PERIOD : THERMAL_PROTECTION_PERIOD
247
+          hotend < 0 ? WATCH_BED_TEMP_PERIOD : WATCH_TEMP_PERIOD
248 248
         #elif ENABLED(THERMAL_PROTECTION_BED) && ENABLED(PIDTEMPBED)
249
-          THERMAL_PROTECTION_BED_PERIOD
249
+          WATCH_BED_TEMP_PERIOD
250 250
         #else
251
-          THERMAL_PROTECTION_PERIOD
251
+          WATCH_TEMP_PERIOD
252 252
         #endif
253 253
       ;
254 254
       const int8_t watch_temp_increase =
@@ -437,7 +437,9 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS],
437 437
             next_watch_temp = input + watch_temp_increase;
438 438
             temp_change_ms = ms + watch_temp_period * 1000UL;
439 439
           }
440
-          else if ((!heated && ELAPSED(ms, temp_change_ms)) || (heated && input < temp - MAX_OVERSHOOT_PID_AUTOTUNE))
440
+          else if (!heated && ELAPSED(ms, temp_change_ms))
441
+            _temp_error(hotend, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD));
442
+          else if (heated && input < temp - MAX_OVERSHOOT_PID_AUTOTUNE)
441 443
             _temp_error(hotend, PSTR(MSG_T_THERMAL_RUNAWAY), PSTR(MSG_THERMAL_RUNAWAY));
442 444
         #endif
443 445
       } // every 2 seconds
@@ -834,10 +836,8 @@ void Temperature::manage_heater() {
834 836
     #endif
835 837
 
836 838
     #if HEATER_IDLE_HANDLER
837
-      if (bed_idle_timeout_exceeded)
838
-      {
839
+      if (bed_idle_timeout_exceeded) {
839 840
         soft_pwm_amount_bed = 0;
840
-
841 841
         #if DISABLED(PIDTEMPBED)
842 842
           WRITE_HEATER_BED(LOW);
843 843
         #endif
@@ -847,23 +847,17 @@ void Temperature::manage_heater() {
847 847
     {
848 848
       #if ENABLED(PIDTEMPBED)
849 849
         soft_pwm_amount_bed = WITHIN(current_temperature_bed, BED_MINTEMP, BED_MAXTEMP) ? (int)get_pid_output_bed() >> 1 : 0;
850
-
851
-      #elif ENABLED(BED_LIMIT_SWITCHING)
850
+      #else
852 851
         // Check if temperature is within the correct band
853 852
         if (WITHIN(current_temperature_bed, BED_MINTEMP, BED_MAXTEMP)) {
854
-          if (current_temperature_bed >= target_temperature_bed + BED_HYSTERESIS)
855
-            soft_pwm_amount_bed = 0;
856
-          else if (current_temperature_bed <= target_temperature_bed - (BED_HYSTERESIS))
857
-            soft_pwm_amount_bed = MAX_BED_POWER >> 1;
858
-        }
859
-        else {
860
-          soft_pwm_amount_bed = 0;
861
-          WRITE_HEATER_BED(LOW);
862
-        }
863
-      #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING
864
-        // Check if temperature is within the correct range
865
-        if (WITHIN(current_temperature_bed, BED_MINTEMP, BED_MAXTEMP)) {
866
-          soft_pwm_amount_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0;
853
+          #if ENABLED(BED_LIMIT_SWITCHING)
854
+            if (current_temperature_bed >= target_temperature_bed + BED_HYSTERESIS)
855
+              soft_pwm_amount_bed = 0;
856
+            else if (current_temperature_bed <= target_temperature_bed - (BED_HYSTERESIS))
857
+              soft_pwm_amount_bed = MAX_BED_POWER >> 1;
858
+          #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING
859
+            soft_pwm_amount_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0;
860
+          #endif
867 861
         }
868 862
         else {
869 863
           soft_pwm_amount_bed = 0;
@@ -878,7 +872,7 @@ void Temperature::manage_heater() {
878 872
 
879 873
 // Derived from RepRap FiveD extruder::getTemperature()
880 874
 // For hot end temperature measurement.
881
-float Temperature::analog2temp(int raw, uint8_t e) {
875
+float Temperature::analog2temp(const int raw, const uint8_t e) {
882 876
   #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
883 877
     if (e > HOTENDS)
884 878
   #else
@@ -919,39 +913,41 @@ float Temperature::analog2temp(int raw, uint8_t e) {
919 913
   return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET;
920 914
 }
921 915
 
922
-// Derived from RepRap FiveD extruder::getTemperature()
923
-// For bed temperature measurement.
924
-float Temperature::analog2tempBed(const int raw) {
925
-  #if ENABLED(BED_USES_THERMISTOR)
926
-    float celsius = 0;
927
-    byte i;
928
-
929
-    for (i = 1; i < BEDTEMPTABLE_LEN; i++) {
930
-      if (PGM_RD_W(BEDTEMPTABLE[i][0]) > raw) {
931
-        celsius  = PGM_RD_W(BEDTEMPTABLE[i - 1][1]) +
932
-                   (raw - PGM_RD_W(BEDTEMPTABLE[i - 1][0])) *
933
-                   (float)(PGM_RD_W(BEDTEMPTABLE[i][1]) - PGM_RD_W(BEDTEMPTABLE[i - 1][1])) /
934
-                   (float)(PGM_RD_W(BEDTEMPTABLE[i][0]) - PGM_RD_W(BEDTEMPTABLE[i - 1][0]));
935
-        break;
916
+#if HAS_TEMP_BED
917
+  // Derived from RepRap FiveD extruder::getTemperature()
918
+  // For bed temperature measurement.
919
+  float Temperature::analog2tempBed(const int raw) {
920
+    #if ENABLED(BED_USES_THERMISTOR)
921
+      float celsius = 0;
922
+      byte i;
923
+
924
+      for (i = 1; i < BEDTEMPTABLE_LEN; i++) {
925
+        if (PGM_RD_W(BEDTEMPTABLE[i][0]) > raw) {
926
+          celsius  = PGM_RD_W(BEDTEMPTABLE[i - 1][1]) +
927
+                     (raw - PGM_RD_W(BEDTEMPTABLE[i - 1][0])) *
928
+                     (float)(PGM_RD_W(BEDTEMPTABLE[i][1]) - PGM_RD_W(BEDTEMPTABLE[i - 1][1])) /
929
+                     (float)(PGM_RD_W(BEDTEMPTABLE[i][0]) - PGM_RD_W(BEDTEMPTABLE[i - 1][0]));
930
+          break;
931
+        }
936 932
       }
937
-    }
938 933
 
939
-    // Overflow: Set to last value in the table
940
-    if (i == BEDTEMPTABLE_LEN) celsius = PGM_RD_W(BEDTEMPTABLE[i - 1][1]);
934
+      // Overflow: Set to last value in the table
935
+      if (i == BEDTEMPTABLE_LEN) celsius = PGM_RD_W(BEDTEMPTABLE[i - 1][1]);
941 936
 
942
-    return celsius;
937
+      return celsius;
943 938
 
944
-  #elif defined(BED_USES_AD595)
939
+    #elif defined(BED_USES_AD595)
945 940
 
946
-    return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET;
941
+      return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET;
947 942
 
948
-  #else
943
+    #else
949 944
 
950
-    UNUSED(raw);
951
-    return 0;
945
+      UNUSED(raw);
946
+      return 0;
952 947
 
953
-  #endif
954
-}
948
+    #endif
949
+  }
950
+#endif // HAS_TEMP_BED
955 951
 
956 952
 /**
957 953
  * Get the raw values into the actual temperatures.
@@ -1236,24 +1232,26 @@ void Temperature::init() {
1236 1232
     #endif // HOTENDS > 2
1237 1233
   #endif // HOTENDS > 1
1238 1234
 
1239
-  #ifdef BED_MINTEMP
1240
-    while (analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
1241
-      #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
1242
-        bed_minttemp_raw += OVERSAMPLENR;
1243
-      #else
1244
-        bed_minttemp_raw -= OVERSAMPLENR;
1245
-      #endif
1246
-    }
1247
-  #endif // BED_MINTEMP
1248
-  #ifdef BED_MAXTEMP
1249
-    while (analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) {
1250
-      #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
1251
-        bed_maxttemp_raw -= OVERSAMPLENR;
1252
-      #else
1253
-        bed_maxttemp_raw += OVERSAMPLENR;
1254
-      #endif
1255
-    }
1256
-  #endif // BED_MAXTEMP
1235
+  #if HAS_TEMP_BED
1236
+    #ifdef BED_MINTEMP
1237
+      while (analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
1238
+        #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
1239
+          bed_minttemp_raw += OVERSAMPLENR;
1240
+        #else
1241
+          bed_minttemp_raw -= OVERSAMPLENR;
1242
+        #endif
1243
+      }
1244
+    #endif // BED_MINTEMP
1245
+    #ifdef BED_MAXTEMP
1246
+      while (analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) {
1247
+        #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
1248
+          bed_maxttemp_raw -= OVERSAMPLENR;
1249
+        #else
1250
+          bed_maxttemp_raw += OVERSAMPLENR;
1251
+        #endif
1252
+      }
1253
+    #endif // BED_MAXTEMP
1254
+  #endif // HAS_TEMP_BED
1257 1255
 
1258 1256
   #if ENABLED(PROBING_HEATERS_OFF)
1259 1257
     paused = false;
@@ -1348,7 +1346,7 @@ void Temperature::init() {
1348 1346
     millis_t Temperature::thermal_runaway_bed_timer;
1349 1347
   #endif
1350 1348
 
1351
-  void Temperature::thermal_runaway_protection(Temperature::TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc) {
1349
+  void Temperature::thermal_runaway_protection(Temperature::TRState * const state, millis_t * const timer, const float &current, const float &target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc) {
1352 1350
 
1353 1351
     static float tr_target_temperature[HOTENDS + 1] = { 0.0 };
1354 1352
 
@@ -1371,22 +1369,22 @@ void Temperature::init() {
1371 1369
 
1372 1370
     #if HEATER_IDLE_HANDLER
1373 1371
       // If the heater idle timeout expires, restart
1374
-      if (heater_id >= 0 && heater_idle_timeout_exceeded[heater_id]) {
1372
+      if ((heater_id >= 0 && heater_idle_timeout_exceeded[heater_id])
1373
+        #if HAS_TEMP_BED
1374
+          || (heater_id < 0 && bed_idle_timeout_exceeded)
1375
+        #endif
1376
+      ) {
1375 1377
         *state = TRInactive;
1376 1378
         tr_target_temperature[heater_index] = 0;
1377 1379
       }
1378
-      #if HAS_TEMP_BED
1379
-        else if (heater_id < 0 && bed_idle_timeout_exceeded) {
1380
-          *state = TRInactive;
1381
-          tr_target_temperature[heater_index] = 0;
1382
-        }
1383
-      #endif
1384 1380
       else
1385 1381
     #endif
1386
-    // If the target temperature changes, restart
1387
-    if (tr_target_temperature[heater_index] != target) {
1388
-      tr_target_temperature[heater_index] = target;
1389
-      *state = target > 0 ? TRFirstHeating : TRInactive;
1382
+    {
1383
+      // If the target temperature changes, restart
1384
+      if (tr_target_temperature[heater_index] != target) {
1385
+        tr_target_temperature[heater_index] = target;
1386
+        *state = target > 0 ? TRFirstHeating : TRInactive;
1387
+      }
1390 1388
     }
1391 1389
 
1392 1390
     switch (*state) {
@@ -2172,19 +2170,19 @@ void Temperature::isr() {
2172 2170
       );
2173 2171
     #endif
2174 2172
     #if HAS_TEMP_BED
2175
-      print_heater_state(degBed(), degTargetBed(),
2173
+      print_heater_state(degBed(), degTargetBed()
2176 2174
         #if ENABLED(SHOW_TEMP_ADC_VALUES)
2177
-          rawBedTemp(),
2175
+          , rawBedTemp()
2178 2176
         #endif
2179
-        -1 // BED
2177
+        , -1 // BED
2180 2178
       );
2181 2179
     #endif
2182 2180
     #if HOTENDS > 1
2183
-      HOTEND_LOOP() print_heater_state(degHotend(e), degTargetHotend(e),
2181
+      HOTEND_LOOP() print_heater_state(degHotend(e), degTargetHotend(e)
2184 2182
         #if ENABLED(SHOW_TEMP_ADC_VALUES)
2185
-          rawHotendTemp(e),
2183
+          , rawHotendTemp(e)
2186 2184
         #endif
2187
-        e
2185
+        , e
2188 2186
       );
2189 2187
     #endif
2190 2188
     SERIAL_PROTOCOLPGM(" @:");

+ 44
- 28
Marlin/src/module/temperature.h 查看文件

@@ -170,14 +170,22 @@ class Temperature {
170 170
     #if ENABLED(PREVENT_COLD_EXTRUSION)
171 171
       static bool allow_cold_extrude;
172 172
       static int16_t extrude_min_temp;
173
-      static bool tooColdToExtrude(uint8_t e) {
173
+      FORCE_INLINE static bool tooCold(const int16_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp; }
174
+      FORCE_INLINE static bool tooColdToExtrude(const uint8_t e) {
174 175
         #if HOTENDS == 1
175 176
           UNUSED(e);
176 177
         #endif
177
-        return allow_cold_extrude ? false : degHotend(HOTEND_INDEX) < extrude_min_temp;
178
+        return tooCold(degHotend(HOTEND_INDEX));
179
+      }
180
+      FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t e) {
181
+        #if HOTENDS == 1
182
+          UNUSED(e);
183
+        #endif
184
+        return tooCold(degTargetHotend(HOTEND_INDEX));
178 185
       }
179 186
     #else
180
-      static bool tooColdToExtrude(uint8_t e) { UNUSED(e); return false; }
187
+      FORCE_INLINE static bool tooColdToExtrude(const uint8_t e) { UNUSED(e); return false; }
188
+      FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t e) { UNUSED(e); return false; }
181 189
     #endif
182 190
 
183 191
   private:
@@ -285,8 +293,11 @@ class Temperature {
285 293
     /**
286 294
      * Static (class) methods
287 295
      */
288
-    static float analog2temp(int raw, uint8_t e);
289
-    static float analog2tempBed(int raw);
296
+    static float analog2temp(const int raw, const uint8_t e);
297
+
298
+    #if HAS_TEMP_BED
299
+      static float analog2tempBed(const int raw);
300
+    #endif
290 301
 
291 302
     /**
292 303
      * Called from the Temperature ISR
@@ -302,19 +313,19 @@ class Temperature {
302 313
      * Preheating hotends
303 314
      */
304 315
     #ifdef MILLISECONDS_PREHEAT_TIME
305
-      static bool is_preheating(uint8_t e) {
316
+      static bool is_preheating(const uint8_t e) {
306 317
         #if HOTENDS == 1
307 318
           UNUSED(e);
308 319
         #endif
309 320
         return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]);
310 321
       }
311
-      static void start_preheat_time(uint8_t e) {
322
+      static void start_preheat_time(const uint8_t e) {
312 323
         #if HOTENDS == 1
313 324
           UNUSED(e);
314 325
         #endif
315 326
         preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
316 327
       }
317
-      static void reset_preheat_time(uint8_t e) {
328
+      static void reset_preheat_time(const uint8_t e) {
318 329
         #if HOTENDS == 1
319 330
           UNUSED(e);
320 331
         #endif
@@ -329,36 +340,37 @@ class Temperature {
329 340
       static int8_t widthFil_to_size_ratio(); // Convert Filament Width (mm) to an extrusion ratio
330 341
     #endif
331 342
 
343
+
332 344
     //high level conversion routines, for use outside of temperature.cpp
333 345
     //inline so that there is no performance decrease.
334 346
     //deg=degreeCelsius
335 347
 
336
-    static float degHotend(uint8_t e) {
348
+    FORCE_INLINE static float degHotend(const uint8_t e) {
337 349
       #if HOTENDS == 1
338 350
         UNUSED(e);
339 351
       #endif
340 352
       return current_temperature[HOTEND_INDEX];
341 353
     }
342
-    static float degBed() { return current_temperature_bed; }
354
+    FORCE_INLINE static float degBed() { return current_temperature_bed; }
343 355
 
344 356
     #if ENABLED(SHOW_TEMP_ADC_VALUES)
345
-      static int16_t rawHotendTemp(uint8_t e) {
357
+      FORCE_INLINE static int16_t rawHotendTemp(const uint8_t e) {
346 358
         #if HOTENDS == 1
347 359
           UNUSED(e);
348 360
         #endif
349 361
         return current_temperature_raw[HOTEND_INDEX];
350 362
       }
351
-      static int16_t rawBedTemp() { return current_temperature_bed_raw; }
363
+      FORCE_INLINE static int16_t rawBedTemp() { return current_temperature_bed_raw; }
352 364
     #endif
353 365
 
354
-    static int16_t degTargetHotend(uint8_t e) {
366
+    FORCE_INLINE static int16_t degTargetHotend(const uint8_t e) {
355 367
       #if HOTENDS == 1
356 368
         UNUSED(e);
357 369
       #endif
358 370
       return target_temperature[HOTEND_INDEX];
359 371
     }
360 372
 
361
-    static int16_t degTargetBed() { return target_temperature_bed; }
373
+    FORCE_INLINE static int16_t degTargetBed() { return target_temperature_bed; }
362 374
 
363 375
     #if WATCH_HOTENDS
364 376
       static void start_watching_heater(const uint8_t e = 0);
@@ -399,21 +411,25 @@ class Temperature {
399 411
       #endif
400 412
     }
401 413
 
402
-    static bool isHeatingHotend(uint8_t e) {
414
+    FORCE_INLINE static bool isHeatingHotend(const uint8_t e) {
403 415
       #if HOTENDS == 1
404 416
         UNUSED(e);
405 417
       #endif
406 418
       return target_temperature[HOTEND_INDEX] > current_temperature[HOTEND_INDEX];
407 419
     }
408
-    static bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; }
420
+    FORCE_INLINE static bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; }
409 421
 
410
-    static bool isCoolingHotend(uint8_t e) {
422
+    FORCE_INLINE static bool isCoolingHotend(const uint8_t e) {
411 423
       #if HOTENDS == 1
412 424
         UNUSED(e);
413 425
       #endif
414 426
       return target_temperature[HOTEND_INDEX] < current_temperature[HOTEND_INDEX];
415 427
     }
416
-    static bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; }
428
+    FORCE_INLINE static bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; }
429
+
430
+    FORCE_INLINE static bool wait_for_heating(const uint8_t e) {
431
+      return degTargetHotend(e) > TEMP_HYSTERESIS && abs(degHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS;
432
+    }
417 433
 
418 434
     /**
419 435
      * The software PWM power for a heater
@@ -480,11 +496,12 @@ class Temperature {
480 496
 
481 497
     #if ENABLED(PROBING_HEATERS_OFF)
482 498
       static void pause(const bool p);
483
-      static bool is_paused() { return paused; }
499
+      FORCE_INLINE static bool is_paused() { return paused; }
484 500
     #endif
485 501
 
486 502
     #if HEATER_IDLE_HANDLER
487
-      static void start_heater_idle_timer(uint8_t e, millis_t timeout_ms) {
503
+
504
+      static void start_heater_idle_timer(const uint8_t e, const millis_t timeout_ms) {
488 505
         #if HOTENDS == 1
489 506
           UNUSED(e);
490 507
         #endif
@@ -492,7 +509,7 @@ class Temperature {
492 509
         heater_idle_timeout_exceeded[HOTEND_INDEX] = false;
493 510
       }
494 511
 
495
-      static void reset_heater_idle_timer(uint8_t e) {
512
+      static void reset_heater_idle_timer(const uint8_t e) {
496 513
         #if HOTENDS == 1
497 514
           UNUSED(e);
498 515
         #endif
@@ -503,7 +520,7 @@ class Temperature {
503 520
         #endif
504 521
       }
505 522
 
506
-      static bool is_heater_idle(uint8_t e) {
523
+      FORCE_INLINE static bool is_heater_idle(const uint8_t e) {
507 524
         #if HOTENDS == 1
508 525
           UNUSED(e);
509 526
         #endif
@@ -511,7 +528,7 @@ class Temperature {
511 528
       }
512 529
 
513 530
       #if HAS_TEMP_BED
514
-        static void start_bed_idle_timer(millis_t timeout_ms) {
531
+        static void start_bed_idle_timer(const millis_t timeout_ms) {
515 532
           bed_idle_timeout_ms = millis() + timeout_ms;
516 533
           bed_idle_timeout_exceeded = false;
517 534
         }
@@ -524,11 +541,10 @@ class Temperature {
524 541
           #endif
525 542
         }
526 543
 
527
-        static bool is_bed_idle() {
528
-          return bed_idle_timeout_exceeded;
529
-        }
544
+        FORCE_INLINE static bool is_bed_idle() { return bed_idle_timeout_exceeded; }
530 545
       #endif
531
-    #endif
546
+
547
+    #endif // HEATER_IDLE_HANDLER
532 548
 
533 549
     #if HAS_TEMP_HOTEND || HAS_TEMP_BED
534 550
       static void print_heaterstates();
@@ -574,7 +590,7 @@ class Temperature {
574 590
 
575 591
       typedef enum TRState { TRInactive, TRFirstHeating, TRStable, TRRunaway } TRstate;
576 592
 
577
-      static void thermal_runaway_protection(TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
593
+      static void thermal_runaway_protection(TRState * const state, millis_t * const timer, const float &current, const float &target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
578 594
 
579 595
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
580 596
         static TRState thermal_runaway_state_machine[HOTENDS];

Loading…
取消
儲存