Browse Source

Fix: const needed for operator* (#17443)

vanilla_fb_2.0.x
studiodyne 5 years ago
committed by GitHub
parent
commit
a1523d6419
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Marlin/src/module/planner.cpp

4
Marlin/src/module/planner.cpp

@ -2885,7 +2885,7 @@ void Planner::set_max_acceleration(const uint8_t axis, float targetValue) {
const xyze_float_t &max_acc_edit_scaled = max_accel_edit; const xyze_float_t &max_acc_edit_scaled = max_accel_edit;
#else #else
constexpr xyze_float_t max_accel_edit = DEFAULT_MAX_ACCELERATION; constexpr xyze_float_t max_accel_edit = DEFAULT_MAX_ACCELERATION;
constexpr xyze_float_t max_acc_edit_scaled = max_accel_edit * 2; const xyze_float_t max_acc_edit_scaled = max_accel_edit * 2;
#endif #endif
limit_and_warn(targetValue, axis, PSTR("Acceleration"), max_acc_edit_scaled); limit_and_warn(targetValue, axis, PSTR("Acceleration"), max_acc_edit_scaled);
#endif #endif
@ -2902,7 +2902,7 @@ void Planner::set_max_feedrate(const uint8_t axis, float targetValue) {
const xyze_float_t &max_fr_edit_scaled = max_fr_edit; const xyze_float_t &max_fr_edit_scaled = max_fr_edit;
#else #else
constexpr xyze_float_t max_fr_edit = DEFAULT_MAX_FEEDRATE; constexpr xyze_float_t max_fr_edit = DEFAULT_MAX_FEEDRATE;
constexpr xyze_float_t max_fr_edit_scaled = max_fr_edit * 2; const xyze_float_t max_fr_edit_scaled = max_fr_edit * 2;
#endif #endif
limit_and_warn(targetValue, axis, PSTR("Feedrate"), max_fr_edit_scaled); limit_and_warn(targetValue, axis, PSTR("Feedrate"), max_fr_edit_scaled);
#endif #endif

Loading…
Cancel
Save