Browse Source

Followup to planner cleanup

Scott Lahteine 3 years ago
parent
commit
ad907a51e2
2 changed files with 8 additions and 8 deletions
  1. 5
    5
      Marlin/src/module/planner.cpp
  2. 3
    3
      Marlin/src/module/planner.h

+ 5
- 5
Marlin/src/module/planner.cpp View File

@@ -3029,7 +3029,7 @@ inline void limit_and_warn(float &val, const uint8_t axis, PGM_P const setting_n
3029 3029
  *
3030 3030
  * This hard limit is applied as a block is being added to the planner queue.
3031 3031
  */
3032
-void Planner::set_max_acceleration(const uint8_t axis, const float &inMaxAccelMMS2) {
3032
+void Planner::set_max_acceleration(const uint8_t axis, float inMaxAccelMMS2) {
3033 3033
   #if ENABLED(LIMITED_MAX_ACCEL_EDITING)
3034 3034
     #ifdef MAX_ACCEL_EDIT_VALUES
3035 3035
       constexpr xyze_float_t max_accel_edit = MAX_ACCEL_EDIT_VALUES;
@@ -3052,7 +3052,7 @@ void Planner::set_max_acceleration(const uint8_t axis, const float &inMaxAccelMM
3052 3052
  *
3053 3053
  * This hard limit is applied as a block is being added to the planner queue.
3054 3054
  */
3055
-void Planner::set_max_feedrate(const uint8_t axis, const float &inMaxFeedrateMMS) {
3055
+void Planner::set_max_feedrate(const uint8_t axis, float inMaxFeedrateMMS) {
3056 3056
   #if ENABLED(LIMITED_MAX_FR_EDITING)
3057 3057
     #ifdef MAX_FEEDRATE_EDIT_VALUES
3058 3058
       constexpr xyze_float_t max_fr_edit = MAX_FEEDRATE_EDIT_VALUES;
@@ -3074,7 +3074,7 @@ void Planner::set_max_feedrate(const uint8_t axis, const float &inMaxFeedrateMMS
3074 3074
    *
3075 3075
    * This hard limit is applied (to the block start speed) as the block is being added to the planner queue.
3076 3076
    */
3077
-  void Planner::set_max_jerk(const AxisEnum axis, const float &targetValue) {
3077
+  void Planner::set_max_jerk(const AxisEnum axis, float inMaxJerkMMS) {
3078 3078
     #if ENABLED(LIMITED_JERK_EDITING)
3079 3079
       constexpr xyze_float_t max_jerk_edit =
3080 3080
         #ifdef MAX_JERK_EDIT_VALUES
@@ -3084,9 +3084,9 @@ void Planner::set_max_feedrate(const uint8_t axis, const float &inMaxFeedrateMMS
3084 3084
             (DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 }
3085 3085
         #endif
3086 3086
       ;
3087
-      limit_and_warn(targetValue, axis, PSTR("Jerk"), max_jerk_edit);
3087
+      limit_and_warn(inMaxJerkMMS, axis, PSTR("Jerk"), max_jerk_edit);
3088 3088
     #endif
3089
-    max_jerk[axis] = targetValue;
3089
+    max_jerk[axis] = inMaxJerkMMS;
3090 3090
   }
3091 3091
 
3092 3092
 #endif

+ 3
- 3
Marlin/src/module/planner.h View File

@@ -470,14 +470,14 @@ class Planner {
470 470
     static void refresh_positioning();
471 471
 
472 472
     // For an axis set the Maximum Acceleration in mm/s^2
473
-    static void set_max_acceleration(const uint8_t axis, const float &inMaxAccelMMS2);
473
+    static void set_max_acceleration(const uint8_t axis, float inMaxAccelMMS2);
474 474
 
475 475
     // For an axis set the Maximum Feedrate in mm/s
476
-    static void set_max_feedrate(const uint8_t axis, const float &inMaxFeedrateMMS);
476
+    static void set_max_feedrate(const uint8_t axis, float inMaxFeedrateMMS);
477 477
 
478 478
     // For an axis set the Maximum Jerk (instant change) in mm/s
479 479
     #if HAS_CLASSIC_JERK
480
-      static void set_max_jerk(const AxisEnum axis, const float &inMaxJerkMMS);
480
+      static void set_max_jerk(const AxisEnum axis, float inMaxJerkMMS);
481 481
     #else
482 482
       static inline void set_max_jerk(const AxisEnum, const float&) {}
483 483
     #endif

Loading…
Cancel
Save