🔧 Update CLASSIC_JERK conditionals

This commit is contained in:
Scott Lahteine
2023-12-14 10:03:11 -06:00
parent 8bce9dec90
commit 75da3555ee
21 changed files with 83 additions and 93 deletions

View File

@@ -155,7 +155,7 @@ float Planner::mm_per_step[DISTINCT_AXES]; // (mm) Millimeters per step
#endif
#endif
#if HAS_CLASSIC_JERK
#if ENABLED(CLASSIC_JERK)
TERN(HAS_LINEAR_E_JERK, xyz_pos_t, xyze_pos_t) Planner::max_jerk;
#endif
@@ -1574,7 +1574,7 @@ void Planner::check_axes_activity() {
saved_motion_state.acceleration.z = settings.max_acceleration_mm_per_s2[Z_AXIS];
settings.max_acceleration_mm_per_s2[Z_AXIS] = 100;
#endif
#if HAS_CLASSIC_JERK
#if ENABLED(CLASSIC_JERK)
saved_motion_state.jerk_state = max_jerk;
max_jerk.set(0, 0 OPTARG(DELTA, 0));
#endif
@@ -1583,7 +1583,7 @@ void Planner::check_axes_activity() {
settings.max_acceleration_mm_per_s2[X_AXIS] = saved_motion_state.acceleration.x;
settings.max_acceleration_mm_per_s2[Y_AXIS] = saved_motion_state.acceleration.y;
TERN_(DELTA, settings.max_acceleration_mm_per_s2[Z_AXIS] = saved_motion_state.acceleration.z);
TERN_(HAS_CLASSIC_JERK, max_jerk = saved_motion_state.jerk_state);
TERN_(CLASSIC_JERK, max_jerk = saved_motion_state.jerk_state);
}
refresh_acceleration_rates();
}
@@ -2766,7 +2766,7 @@ bool Planner::_populate_block(
#endif
#if HAS_CLASSIC_JERK
#if ENABLED(CLASSIC_JERK)
/**
* Adapted from Průša MKS firmware
@@ -2863,7 +2863,7 @@ bool Planner::_populate_block(
vmax_junction_sqr = sq(vmax_junction); // Go up or down to the new speed
#endif
#endif // Classic Jerk Limiting
#endif // CLASSIC_JERK
// Max entry speed of this block equals the max exit speed of the previous block.
block->max_entry_speed_sqr = vmax_junction_sqr;
@@ -3398,7 +3398,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) {
settings.max_feedrate_mm_s[axis] = inMaxFeedrateMMS;
}
#if HAS_CLASSIC_JERK
#if ENABLED(CLASSIC_JERK)
/**
* For the specified 'axis' set the Maximum Jerk (instant change) to the given value (mm/s)