From 52800035fd84291893d3b60bca1f5569ee2e31f2 Mon Sep 17 00:00:00 2001 From: Fjederhaek Date: Sat, 21 Aug 2021 00:45:05 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Update=20H-bot=20/=20Core=20for?= =?UTF-8?q?=206-axis=20(#22600)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #19112 --- Marlin/src/module/planner.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 7bf672a85d609..e4649b9410f4e 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -2002,15 +2002,15 @@ bool Planner::_populate_block(block_t * const block, bool split_move, // Number of steps for each axis // See https://www.corexy.com/theory.html #if CORE_IS_XY - block->steps.set(ABS(da + db), ABS(da - db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da + db), ABS(da - db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #elif CORE_IS_XZ - block->steps.set(ABS(da + dc), ABS(db), ABS(da - dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da + dc), ABS(db), ABS(da - dc), ABS(di), ABS(dj), ABS(dk))); #elif CORE_IS_YZ - block->steps.set(ABS(da), ABS(db + dc), ABS(db - dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da), ABS(db + dc), ABS(db - dc), ABS(di), ABS(dj), ABS(dk))); #elif ENABLED(MARKFORGED_XY) - block->steps.set(ABS(da + db), ABS(db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da + db), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #elif IS_SCARA - block->steps.set(ABS(da), ABS(db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #else // default non-h-bot planning block->steps.set(LINEAR_AXIS_LIST(ABS(da), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); @@ -2208,6 +2208,17 @@ bool Planner::_populate_block(block_t * const block, bool split_move, if (block->steps.k) ENABLE_AXIS_K() ); #endif + #if EITHER(IS_CORE, MARKFORGED_XY) + #if LINEAR_AXES >= 4 + if (block->steps.i) ENABLE_AXIS_I(); + #endif + #if LINEAR_AXES >= 5 + if (block->steps.j) ENABLE_AXIS_J(); + #endif + #if LINEAR_AXES >= 6 + if (block->steps.k) ENABLE_AXIS_K(); + #endif + #endif // Enable extruder(s) #if HAS_EXTRUDERS