瀏覽代碼

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

Regression from 9823a37
woisy00 3 年之前
父節點
當前提交
9338b7f06e
沒有連結到貢獻者的電子郵件帳戶。
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. 1
    1
      Marlin/Configuration_adv.h
  2. 1
    1
      Marlin/src/module/planner.cpp

+ 1
- 1
Marlin/Configuration_adv.h 查看文件

@@ -414,7 +414,7 @@
414 414
  */
415 415
 #define AUTOTEMP
416 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 418
   // Turn on AUTOTEMP on M104/M109 by default using proportions set here
419 419
   //#define AUTOTEMP_PROPORTIONAL
420 420
   #if ENABLED(AUTOTEMP_PROPORTIONAL)

+ 1
- 1
Marlin/src/module/planner.cpp 查看文件

@@ -1457,7 +1457,7 @@ void Planner::check_axes_activity() {
1457 1457
 
1458 1458
     float t = autotemp_min + high * autotemp_factor;
1459 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 1461
     oldt = t;
1462 1462
     thermalManager.setTargetHotend(t, active_extruder);
1463 1463
   }

Loading…
取消
儲存