Skip to content

Commit

Permalink
⛙ Merge w/Marlin
Browse files Browse the repository at this point in the history
  • Loading branch information
classicrocker883 committed Jan 16, 2024
2 parents 44b6249 + 76dce41 commit 04025ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2024-01-15"
//#define STRING_DISTRIBUTION_DATE "2024-01-16"

#define STRING_DISTRIBUTION_DATE __DATE__
#define STRING_DISTRIBUTION_TIME __TIME__
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2024-01-15"
#define STRING_DISTRIBUTION_DATE "2024-01-16"
#endif

/**
Expand Down
22 changes: 9 additions & 13 deletions Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1908,13 +1908,13 @@ bool Planner::_populate_block(
SERIAL_ECHOLNPGM(
" _populate_block FR:", fr_mm_s,
#if HAS_X_AXIS
" A:", target.a, " (", dist.a, " steps)"
" " STR_A ":", target.a, " (", dist.a, " steps)"
#endif
#if HAS_Y_AXIS
" B:", target.b, " (", dist.b, " steps)"
" " STR_B ":", target.b, " (", dist.b, " steps)"
#endif
#if HAS_Z_AXIS
" C:", target.c, " (", dist.c, " steps)"
" " STR_C ":", target.c, " (", dist.c, " steps)"
#endif
#if HAS_I_AXIS
" " STR_I ":", target.i, " (", dist.i, " steps)"
Expand Down Expand Up @@ -3323,16 +3323,12 @@ void Planner::refresh_positioning() {
}

// Apply limits to a variable and give a warning if the value was out of range
inline void limit_and_warn(float &val, const AxisEnum axis, PGM_P const setting_name, const xyze_float_t &max_limit) {
inline void limit_and_warn(float &val, const AxisEnum axis, FSTR_P const setting_name, const xyze_float_t &max_limit) {
const uint8_t lim_axis = TERN_(HAS_EXTRUDERS, axis > E_AXIS ? E_AXIS :) axis;
const float before = val;
LIMIT(val, 0.1f, max_limit[lim_axis]);
if (before != val) {
SERIAL_CHAR(AXIS_CHAR(lim_axis));
SERIAL_ECHOPGM(" Max ");
SERIAL_ECHOPGM_P(setting_name);
SERIAL_ECHOLNPGM(" limited to ", val);
}
if (before != val)
SERIAL_ECHOLN(C(AXIS_CHAR(lim_axis)), F(" Max "), setting_name, F(" limited to "), val);
}

/**
Expand All @@ -3351,7 +3347,7 @@ void Planner::set_max_acceleration(const AxisEnum axis, float inMaxAccelMMS2) {
constexpr xyze_float_t max_accel_edit = DEFAULT_MAX_ACCELERATION;
const xyze_float_t max_acc_edit_scaled = max_accel_edit * 2;
#endif
limit_and_warn(inMaxAccelMMS2, axis, PSTR("Acceleration"), max_acc_edit_scaled);
limit_and_warn(inMaxAccelMMS2, axis, F("Acceleration"), max_acc_edit_scaled);
#endif
settings.max_acceleration_mm_per_s2[axis] = inMaxAccelMMS2;

Expand All @@ -3374,7 +3370,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) {
constexpr xyze_float_t max_fr_edit = DEFAULT_MAX_FEEDRATE;
const xyze_float_t max_fr_edit_scaled = max_fr_edit * 2;
#endif
limit_and_warn(inMaxFeedrateMMS, axis, PSTR("Feedrate"), max_fr_edit_scaled);
limit_and_warn(inMaxFeedrateMMS, axis, F("Feedrate"), max_fr_edit_scaled);
#endif
settings.max_feedrate_mm_s[axis] = inMaxFeedrateMMS;
}
Expand All @@ -3397,7 +3393,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) {
(DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 }
#endif
;
limit_and_warn(inMaxJerkMMS, axis, PSTR("Jerk"), max_jerk_edit);
limit_and_warn(inMaxJerkMMS, axis, F("Jerk"), max_jerk_edit);
#endif
max_jerk[axis] = inMaxJerkMMS;
}
Expand Down

0 comments on commit 04025ac

Please sign in to comment.