瀏覽代碼

Add TRAVEL_EXTRA_XYJERK option

See #16949

Co-Authored-By: josedpedroso <josedpedroso@users.noreply.github.com>
Scott Lahteine 4 年之前
父節點
當前提交
02cce7d4b4
共有 2 個檔案被更改,包括 11 行新增2 行删除
  1. 2
    0
      Marlin/Configuration.h
  2. 9
    2
      Marlin/src/module/planner.cpp

+ 2
- 0
Marlin/Configuration.h 查看文件

@@ -784,6 +784,8 @@
784 784
   #define DEFAULT_YJERK 10.0
785 785
   #define DEFAULT_ZJERK  0.3
786 786
 
787
+  //#define TRAVEL_EXTRA_XYJERK 0.0     // Additional jerk allowance for all travel moves
788
+
787 789
   //#define LIMITED_JERK_EDITING        // Limit edit via M205 or LCD to DEFAULT_aJERK * 2
788 790
   #if ENABLED(LIMITED_JERK_EDITING)
789 791
     #define MAX_JERK_EDIT_VALUES { 20, 20, 0.6, 10 } // ...or, set your own edit limits

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

@@ -2397,8 +2397,15 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
2397 2397
       LOOP_XYZE(i)
2398 2398
     #endif
2399 2399
     {
2400
-      const float jerk = ABS(current_speed[i]),   // cs : Starting from zero, change in speed for this axis
2401
-                  maxj = max_jerk[i];             // mj : The max jerk setting for this axis
2400
+      const float jerk = ABS(current_speed[i]);   // cs : Starting from zero, change in speed for this axis
2401
+
2402
+      float maxj = max_jerk[i];                   // mj : The max jerk setting for this axis
2403
+
2404
+      #ifdef TRAVEL_EXTRA_XYJERK
2405
+        if ((TRAVEL_EXTRA_XYJERK) && !de <= 0 && (i == X_AXIS || i == Y_AXIS))
2406
+          maxj += TRAVEL_EXTRA_XYJERK;            // Extra jerk allowance for travel moves
2407
+      #endif
2408
+
2402 2409
       if (jerk > maxj) {                          // cs > mj : New current speed too fast?
2403 2410
         if (limited) {                            // limited already?
2404 2411
           const float mjerk = nominal_speed * maxj; // ns*mj

Loading…
取消
儲存