diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 8bbb8830018f5..d4e5be306eea6 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1961,7 +1961,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 @@ -2085,7 +2085,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 @@ -2270,7 +2270,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 diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index ed23b93e44f54..e5d2bcd3586be 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3112,7 +3112,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));