Browse Source

Fix CoreXY homing bug introduced by PR #1606

The Check Endstop logic must be:

if (current_block->steps_x != current_block->steps_y || (TEST(out_bits,
X_AXIS) == TEST(out_bits, Y_AXIS)))
if (TEST(out_bits, X_HEAD))

not

if (TEST(out_bits, X_HEAD) && (current_block->steps_x !=
current_block->steps_y || (TEST(out_bits, X_AXIS) == TEST(out_bits,
Y_AXIS))))

Same applies for Y axis.
pull/1/head
alexborro 10 years ago
parent
commit
cb676cdf39
  1. 7
      Marlin/stepper.cpp

7
Marlin/stepper.cpp

@ -413,7 +413,8 @@ ISR(TIMER1_COMPA_vect) {
#else
// Head direction in -X axis for CoreXY bots.
// If DeltaX == -DeltaY, the movement is only in Y axis
if (TEST(out_bits, X_HEAD) && (current_block->steps_x != current_block->steps_y || (TEST(out_bits, X_AXIS) == TEST(out_bits, Y_AXIS))))
if (current_block->steps_x != current_block->steps_y || (TEST(out_bits, X_AXIS) == TEST(out_bits, Y_AXIS)))
if (TEST(out_bits, X_HEAD))
#endif
{ // -direction
#ifdef DUAL_X_CARRIAGE
@ -437,13 +438,13 @@ ISR(TIMER1_COMPA_vect) {
#endif
}
}
#ifndef COREXY
if (TEST(out_bits, Y_AXIS)) // -direction
#else
// Head direction in -Y axis for CoreXY bots.
// If DeltaX == DeltaY, the movement is only in X axis
if (TEST(out_bits, Y_HEAD) && (current_block->steps_x != current_block->steps_y || (TEST(out_bits, X_AXIS) != TEST(out_bits, Y_AXIS))))
if (current_block->steps_x != current_block->steps_y || (TEST(out_bits, X_AXIS) != TEST(out_bits, Y_AXIS)))
if (TEST(out_bits, Y_HEAD))
#endif
{ // -direction
#if defined(Y_MIN_PIN) && Y_MIN_PIN >= 0

Loading…
Cancel
Save