Add TRAVEL_EXTRA_XYJERK option

See #16949

Co-Authored-By: josedpedroso <josedpedroso@users.noreply.github.com>
This commit is contained in:
Scott Lahteine
2020-02-26 06:39:29 -06:00
parent 0a7e7a6fa5
commit 02cce7d4b4
2 changed files with 11 additions and 2 deletions

View File

@ -2397,8 +2397,15 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
LOOP_XYZE(i)
#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
const float jerk = ABS(current_speed[i]); // cs : Starting from zero, change in speed for this axis
float maxj = max_jerk[i]; // mj : The max jerk setting for this axis
#ifdef TRAVEL_EXTRA_XYJERK
if ((TRAVEL_EXTRA_XYJERK) && !de <= 0 && (i == X_AXIS || i == Y_AXIS))
maxj += TRAVEL_EXTRA_XYJERK; // Extra jerk allowance for travel moves
#endif
if (jerk > maxj) { // cs > mj : New current speed too fast?
if (limited) { // limited already?
const float mjerk = nominal_speed * maxj; // ns*mj