mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-31 14:12:52 +00:00
🎨 Minimize block->steps.set
This commit is contained in:
parent
aca0d3dba5
commit
a0d28f1770
1 changed files with 18 additions and 16 deletions
|
@ -2005,22 +2005,24 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||||
|
|
||||||
// Number of steps for each axis
|
// Number of steps for each axis
|
||||||
// See https://www.corexy.com/theory.html
|
// See https://www.corexy.com/theory.html
|
||||||
|
block->steps.set(NUM_AXIS_LIST(
|
||||||
#if CORE_IS_XY
|
#if CORE_IS_XY
|
||||||
block->steps.set(NUM_AXIS_LIST(ABS(da + db), ABS(da - db), ABS(dc), ABS(di), ABS(dj), ABS(dk), ABS(du), ABS(dv), ABS(dw)));
|
ABS(da + db), ABS(da - db), ABS(dc)
|
||||||
#elif CORE_IS_XZ
|
#elif CORE_IS_XZ
|
||||||
block->steps.set(NUM_AXIS_LIST(ABS(da + dc), ABS(db), ABS(da - dc), ABS(di), ABS(dj), ABS(dk), ABS(du), ABS(dv), ABS(dw)));
|
ABS(da + dc), ABS(db), ABS(da - dc)
|
||||||
#elif CORE_IS_YZ
|
#elif CORE_IS_YZ
|
||||||
block->steps.set(NUM_AXIS_LIST(ABS(da), ABS(db + dc), ABS(db - dc), ABS(di), ABS(dj), ABS(dk), ABS(du), ABS(dv), ABS(dw)));
|
ABS(da), ABS(db + dc), ABS(db - dc)
|
||||||
#elif ENABLED(MARKFORGED_XY)
|
#elif ENABLED(MARKFORGED_XY)
|
||||||
block->steps.set(NUM_AXIS_LIST(ABS(da + db), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk), ABS(du), ABS(dv), ABS(dw)));
|
ABS(da + db), ABS(db), ABS(dc)
|
||||||
#elif ENABLED(MARKFORGED_YX)
|
#elif ENABLED(MARKFORGED_YX)
|
||||||
block->steps.set(NUM_AXIS_LIST(ABS(da), ABS(db + da), ABS(dc), ABS(di), ABS(dj), ABS(dk), ABS(du), ABS(dv), ABS(dw)));
|
ABS(da), ABS(db + da), ABS(dc)
|
||||||
#elif IS_SCARA
|
#elif IS_SCARA
|
||||||
block->steps.set(NUM_AXIS_LIST(ABS(da), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk), ABS(du), ABS(dv), ABS(dw)));
|
ABS(da), ABS(db), ABS(dc)
|
||||||
#else
|
#else // default non-h-bot planning
|
||||||
// default non-h-bot planning
|
ABS(da), ABS(db), ABS(dc)
|
||||||
block->steps.set(NUM_AXIS_LIST(ABS(da), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk), ABS(du), ABS(dv), ABS(dw)));
|
|
||||||
#endif
|
#endif
|
||||||
|
, ABS(di), ABS(dj), ABS(dk), ABS(du), ABS(dv), ABS(dw)
|
||||||
|
));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This part of the code calculates the total length of the movement.
|
* This part of the code calculates the total length of the movement.
|
||||||
|
|
Loading…
Reference in a new issue