|
|
@ -162,14 +162,14 @@ volatile long Stepper::endstops_trigsteps[XYZ];
|
|
|
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
|
|
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
|
|
|
#define Z_APPLY_STEP(v,Q) \
|
|
|
|
#define Z_APPLY_STEP(v,Q) \
|
|
|
|
if (performing_homing) { \
|
|
|
|
if (performing_homing) { \
|
|
|
|
if (Z_HOME_DIR > 0) {\
|
|
|
|
if (Z_HOME_DIR < 0) { \
|
|
|
|
if (!(TEST(endstops.old_endstop_bits, Z_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z_motor) Z_STEP_WRITE(v); \
|
|
|
|
|
|
|
|
if (!(TEST(endstops.old_endstop_bits, Z2_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z2_motor) Z2_STEP_WRITE(v); \
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
else { \
|
|
|
|
|
|
|
|
if (!(TEST(endstops.old_endstop_bits, Z_MIN) && (count_direction[Z_AXIS] < 0)) && !locked_z_motor) Z_STEP_WRITE(v); \
|
|
|
|
if (!(TEST(endstops.old_endstop_bits, Z_MIN) && (count_direction[Z_AXIS] < 0)) && !locked_z_motor) Z_STEP_WRITE(v); \
|
|
|
|
if (!(TEST(endstops.old_endstop_bits, Z2_MIN) && (count_direction[Z_AXIS] < 0)) && !locked_z2_motor) Z2_STEP_WRITE(v); \
|
|
|
|
if (!(TEST(endstops.old_endstop_bits, Z2_MIN) && (count_direction[Z_AXIS] < 0)) && !locked_z2_motor) Z2_STEP_WRITE(v); \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
|
|
|
|
else { \
|
|
|
|
|
|
|
|
if (!(TEST(endstops.old_endstop_bits, Z_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z_motor) Z_STEP_WRITE(v); \
|
|
|
|
|
|
|
|
if (!(TEST(endstops.old_endstop_bits, Z2_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z2_motor) Z2_STEP_WRITE(v); \
|
|
|
|
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
else { \
|
|
|
|
else { \
|
|
|
|
Z_STEP_WRITE(v); \
|
|
|
|
Z_STEP_WRITE(v); \
|
|
|
|