🎨 Various multi-axis patches (#22823)

This commit is contained in:
Scott Lahteine
2021-09-23 10:01:37 -05:00
committed by Scott Lahteine
parent 3deb54d0fd
commit 2c30b75268
20 changed files with 174 additions and 127 deletions

View File

@ -1310,7 +1310,7 @@ void Planner::recalculate() {
*/
void Planner::check_axes_activity() {
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z , DISABLE_I , DISABLE_J , DISABLE_K, DISABLE_E)
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_E)
xyze_bool_t axis_active = { false };
#endif
@ -1913,7 +1913,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
#endif // PREVENT_COLD_EXTRUSION || PREVENT_LENGTHY_EXTRUDE
// Compute direction bit-mask for this block
uint8_t dm = 0;
axis_bits_t dm = 0;
#if CORE_IS_XY
if (da < 0) SBI(dm, X_HEAD); // Save the toolhead's true direction in X
if (db < 0) SBI(dm, Y_HEAD); // ...and Y
@ -2345,11 +2345,11 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
#ifdef XY_FREQUENCY_LIMIT
static uint8_t old_direction_bits; // = 0
static axis_bits_t old_direction_bits; // = 0
if (xy_freq_limit_hz) {
// Check and limit the xy direction change frequency
const uint8_t direction_change = block->direction_bits ^ old_direction_bits;
const axis_bits_t direction_change = block->direction_bits ^ old_direction_bits;
old_direction_bits = block->direction_bits;
segment_time_us = LROUND(float(segment_time_us) / speed_factor);