Browse Source

Arrange Z2 min before Z2 max

Scott Lahteine 8 years ago
parent
commit
8cebd2a7db
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      Marlin/stepper.cpp

+ 5
- 5
Marlin/stepper.cpp View File

@@ -162,14 +162,14 @@ volatile long Stepper::endstops_trigsteps[XYZ];
162 162
   #if ENABLED(Z_DUAL_ENDSTOPS)
163 163
     #define Z_APPLY_STEP(v,Q) \
164 164
     if (performing_homing) { \
165
-      if (Z_HOME_DIR > 0) {\
166
-        if (!(TEST(endstops.old_endstop_bits, Z_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z_motor) Z_STEP_WRITE(v); \
167
-        if (!(TEST(endstops.old_endstop_bits, Z2_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z2_motor) Z2_STEP_WRITE(v); \
168
-      } \
169
-      else { \
165
+      if (Z_HOME_DIR < 0) { \
170 166
         if (!(TEST(endstops.old_endstop_bits, Z_MIN) && (count_direction[Z_AXIS] < 0)) && !locked_z_motor) Z_STEP_WRITE(v); \
171 167
         if (!(TEST(endstops.old_endstop_bits, Z2_MIN) && (count_direction[Z_AXIS] < 0)) && !locked_z2_motor) Z2_STEP_WRITE(v); \
172 168
       } \
169
+      else { \
170
+        if (!(TEST(endstops.old_endstop_bits, Z_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z_motor) Z_STEP_WRITE(v); \
171
+        if (!(TEST(endstops.old_endstop_bits, Z2_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z2_motor) Z2_STEP_WRITE(v); \
172
+      } \
173 173
     } \
174 174
     else { \
175 175
       Z_STEP_WRITE(v); \

Loading…
Cancel
Save