From 069993e880637dcbf2f795daa598b6d025bcedcb Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon, 10 Aug 2020 03:48:57 +0200 Subject: [PATCH] Fix DISABLE_[XYZE] code (#18970) Co-authored-by: Scott Lahteine --- Marlin/src/module/planner.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index c2a9e6ac7..931daa332 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1281,7 +1281,7 @@ void Planner::recalculate() { void Planner::check_axes_activity() { #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E) - xyze_bool_t axis_active = { true, true, true, true }; + xyze_bool_t axis_active = { false }; #endif #if HAS_FAN @@ -1316,10 +1316,10 @@ void Planner::check_axes_activity() { #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E) for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { block_t *block = &block_buffer[b]; - if (ENABLED(DISABLE_X) && block->steps[X_AXIS]) axis_active[X_AXIS] = true; - if (ENABLED(DISABLE_Y) && block->steps[Y_AXIS]) axis_active[Y_AXIS] = true; - if (ENABLED(DISABLE_Z) && block->steps[Z_AXIS]) axis_active[Z_AXIS] = true; - if (ENABLED(DISABLE_E) && block->steps[E_AXIS]) axis_active[E_AXIS] = true; + if (ENABLED(DISABLE_X) && block->steps.x) axis_active.x = true; + if (ENABLED(DISABLE_Y) && block->steps.y) axis_active.y = true; + if (ENABLED(DISABLE_Z) && block->steps.z) axis_active.z = true; + if (ENABLED(DISABLE_E) && block->steps.e) axis_active.e = true; } #endif }