mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
Clean up use of extra_xyjerk
This commit is contained in:
parent
ac93df43cd
commit
362c9ae79a
@ -2404,12 +2404,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
#endif
|
||||
{
|
||||
const float jerk = ABS(current_speed[i]), // cs : Starting from zero, change in speed for this axis
|
||||
maxj = (max_jerk[i] // mj : The max jerk setting for this axis
|
||||
#ifdef TRAVEL_EXTRA_XYJERK
|
||||
+ (i == X_AXIS || i == Y_AXIS ? extra_xyjerk : 0)
|
||||
#endif
|
||||
);
|
||||
|
||||
maxj = (max_jerk[i] + (i == X_AXIS || i == Y_AXIS ? extra_xyjerk : 0.0f)); // mj : The max jerk setting for this axis
|
||||
if (jerk > maxj) { // cs > mj : New current speed too fast?
|
||||
if (limited) { // limited already?
|
||||
const float mjerk = nominal_speed * maxj; // ns*mj
|
||||
@ -2461,11 +2456,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
: // v_exit <= v_entry coasting axis reversal
|
||||
( (v_entry < 0 || v_exit > 0) ? (v_entry - v_exit) : _MAX(-v_exit, v_entry) );
|
||||
|
||||
const float maxj = (max_jerk[axis]
|
||||
#ifdef TRAVEL_EXTRA_XYJERK
|
||||
+ (axis == X_AXIS || axis == Y_AXIS ? extra_xyjerk : 0)
|
||||
#endif
|
||||
);
|
||||
const float maxj = (max_jerk[axis] + (axis == X_AXIS || axis == Y_AXIS ? extra_xyjerk : 0.0f));
|
||||
|
||||
if (jerk > maxj) {
|
||||
v_factor *= maxj / jerk;
|
||||
|
Loading…
Reference in New Issue
Block a user