Skip to content

Commit

Permalink
🐛 Update H-bot / Core for 6-axis (MarlinFirmware#22600)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fjederhaek authored and AlexColello committed Jan 14, 2022
1 parent dc0d885 commit 5280003
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5280003

Please sign in to comment.