Browse Source

Add TRAVEL_EXTRA_XYJERK option

See #16949

Co-Authored-By: josedpedroso <josedpedroso@users.noreply.github.com>
Scott Lahteine 4 years ago
parent
commit
02cce7d4b4
2 changed files with 11 additions and 2 deletions
  1. 2
    0
      Marlin/Configuration.h
  2. 9
    2
      Marlin/src/module/planner.cpp

+ 2
- 0
Marlin/Configuration.h View File

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

+ 9
- 2
Marlin/src/module/planner.cpp View File

2397
       LOOP_XYZE(i)
2397
       LOOP_XYZE(i)
2398
     #endif
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
       if (jerk > maxj) {                          // cs > mj : New current speed too fast?
2409
       if (jerk > maxj) {                          // cs > mj : New current speed too fast?
2403
         if (limited) {                            // limited already?
2410
         if (limited) {                            // limited already?
2404
           const float mjerk = nominal_speed * maxj; // ns*mj
2411
           const float mjerk = nominal_speed * maxj; // ns*mj

Loading…
Cancel
Save