Quellcode durchsuchen

🐛 Fix AUTOTEMP bug (thermal runaway) (#23025)

Regression from 9823a37
woisy00 vor 3 Jahren
Ursprung
Commit
9338b7f06e
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 1
    1
      Marlin/Configuration_adv.h
  2. 1
    1
      Marlin/src/module/planner.cpp

+ 1
- 1
Marlin/Configuration_adv.h Datei anzeigen

414
  */
414
  */
415
 #define AUTOTEMP
415
 #define AUTOTEMP
416
 #if ENABLED(AUTOTEMP)
416
 #if ENABLED(AUTOTEMP)
417
-  #define AUTOTEMP_OLDWEIGHT    0.98
417
+  #define AUTOTEMP_OLDWEIGHT    0.98  // Factor used to weight previous readings (0.0 < value < 1.0)
418
   // Turn on AUTOTEMP on M104/M109 by default using proportions set here
418
   // Turn on AUTOTEMP on M104/M109 by default using proportions set here
419
   //#define AUTOTEMP_PROPORTIONAL
419
   //#define AUTOTEMP_PROPORTIONAL
420
   #if ENABLED(AUTOTEMP_PROPORTIONAL)
420
   #if ENABLED(AUTOTEMP_PROPORTIONAL)

+ 1
- 1
Marlin/src/module/planner.cpp Datei anzeigen

1457
 
1457
 
1458
     float t = autotemp_min + high * autotemp_factor;
1458
     float t = autotemp_min + high * autotemp_factor;
1459
     LIMIT(t, autotemp_min, autotemp_max);
1459
     LIMIT(t, autotemp_min, autotemp_max);
1460
-    if (t < oldt) t *= (1.0f - (AUTOTEMP_OLDWEIGHT)) + oldt * (AUTOTEMP_OLDWEIGHT);
1460
+    if (t < oldt) t = t * (1.0f - (AUTOTEMP_OLDWEIGHT)) + oldt * (AUTOTEMP_OLDWEIGHT);
1461
     oldt = t;
1461
     oldt = t;
1462
     thermalManager.setTargetHotend(t, active_extruder);
1462
     thermalManager.setTargetHotend(t, active_extruder);
1463
   }
1463
   }

Laden…
Abbrechen
Speichern