Parcourir la source

Followup to planner cleanup

Scott Lahteine il y a 4 ans
Parent
révision
ad907a51e2
2 fichiers modifiés avec 8 ajouts et 8 suppressions
  1. 5
    5
      Marlin/src/module/planner.cpp
  2. 3
    3
      Marlin/src/module/planner.h

+ 5
- 5
Marlin/src/module/planner.cpp Voir le fichier

3029
  *
3029
  *
3030
  * This hard limit is applied as a block is being added to the planner queue.
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
   #if ENABLED(LIMITED_MAX_ACCEL_EDITING)
3033
   #if ENABLED(LIMITED_MAX_ACCEL_EDITING)
3034
     #ifdef MAX_ACCEL_EDIT_VALUES
3034
     #ifdef MAX_ACCEL_EDIT_VALUES
3035
       constexpr xyze_float_t max_accel_edit = MAX_ACCEL_EDIT_VALUES;
3035
       constexpr xyze_float_t max_accel_edit = MAX_ACCEL_EDIT_VALUES;
3052
  *
3052
  *
3053
  * This hard limit is applied as a block is being added to the planner queue.
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
   #if ENABLED(LIMITED_MAX_FR_EDITING)
3056
   #if ENABLED(LIMITED_MAX_FR_EDITING)
3057
     #ifdef MAX_FEEDRATE_EDIT_VALUES
3057
     #ifdef MAX_FEEDRATE_EDIT_VALUES
3058
       constexpr xyze_float_t max_fr_edit = MAX_FEEDRATE_EDIT_VALUES;
3058
       constexpr xyze_float_t max_fr_edit = MAX_FEEDRATE_EDIT_VALUES;
3074
    *
3074
    *
3075
    * This hard limit is applied (to the block start speed) as the block is being added to the planner queue.
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
     #if ENABLED(LIMITED_JERK_EDITING)
3078
     #if ENABLED(LIMITED_JERK_EDITING)
3079
       constexpr xyze_float_t max_jerk_edit =
3079
       constexpr xyze_float_t max_jerk_edit =
3080
         #ifdef MAX_JERK_EDIT_VALUES
3080
         #ifdef MAX_JERK_EDIT_VALUES
3084
             (DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 }
3084
             (DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 }
3085
         #endif
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
     #endif
3088
     #endif
3089
-    max_jerk[axis] = targetValue;
3089
+    max_jerk[axis] = inMaxJerkMMS;
3090
   }
3090
   }
3091
 
3091
 
3092
 #endif
3092
 #endif

+ 3
- 3
Marlin/src/module/planner.h Voir le fichier

470
     static void refresh_positioning();
470
     static void refresh_positioning();
471
 
471
 
472
     // For an axis set the Maximum Acceleration in mm/s^2
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
     // For an axis set the Maximum Feedrate in mm/s
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
     // For an axis set the Maximum Jerk (instant change) in mm/s
478
     // For an axis set the Maximum Jerk (instant change) in mm/s
479
     #if HAS_CLASSIC_JERK
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
     #else
481
     #else
482
       static inline void set_max_jerk(const AxisEnum, const float&) {}
482
       static inline void set_max_jerk(const AxisEnum, const float&) {}
483
     #endif
483
     #endif

Chargement…
Annuler
Enregistrer