Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make Z optional for corexy #25630

Merged
merged 3 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ bool Planner::_populate_block(
#if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
if (da < 0) SBI(dm, X_HEAD); // Save the toolhead's true direction in X
if (db < 0) SBI(dm, Y_HEAD); // ...and Y
if (dc < 0) SBI(dm, Z_AXIS);
TERN_(HAS_Z_AXIS, if (dc < 0) SBI(dm, Z_AXIS));
#endif
#if IS_CORE
#if CORE_IS_XY
Expand Down Expand Up @@ -2096,7 +2096,7 @@ bool Planner::_populate_block(
#if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
steps_dist_mm.head.x = da * mm_per_step[A_AXIS];
steps_dist_mm.head.y = db * mm_per_step[B_AXIS];
steps_dist_mm.z = dc * mm_per_step[Z_AXIS];
TERN_(HAS_Z_AXIS, steps_dist_mm.z = dc * mm_per_step[Z_AXIS]);
#endif
#if IS_CORE
#if CORE_IS_XY
Expand Down Expand Up @@ -2244,7 +2244,7 @@ bool Planner::_populate_block(
stepper.enable_axis(X_AXIS);
stepper.enable_axis(Y_AXIS);
}
#if DISABLED(Z_LATE_ENABLE)
#if HAS_Z_AXIS && DISABLED(Z_LATE_ENABLE)
if (block->steps.z) stepper.enable_axis(Z_AXIS);
#endif
#elif CORE_IS_XZ
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3276,7 +3276,7 @@ void Stepper::_set_position(const abce_long_t &spos) {
#if CORE_IS_XY
// corexy positioning
// these equations follow the form of the dA and dB equations on https://www.corexy.com/theory.html
count_position.set(spos.a + spos.b, CORESIGN(spos.a - spos.b), spos.c);
count_position.set(spos.a + spos.b, CORESIGN(spos.a - spos.b) OPTARG(HAS_Z_AXIS, spos.c));
#elif CORE_IS_XZ
// corexz planning
count_position.set(spos.a + spos.c, spos.b, CORESIGN(spos.a - spos.c));
Expand Down