|
@@ -381,7 +381,10 @@ xyze_int8_t Stepper::count_direction{0};
|
381
|
381
|
#endif
|
382
|
382
|
|
383
|
383
|
#if NUM_Z_STEPPER_DRIVERS == 4
|
384
|
|
- #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE(v); Z3_DIR_WRITE(v); Z4_DIR_WRITE(v); }while(0)
|
|
384
|
+ #define Z_APPLY_DIR(v,Q) do{ \
|
|
385
|
+ Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); \
|
|
386
|
+ Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); Z4_DIR_WRITE((v) ^ ENABLED(INVERT_Z4_VS_Z_DIR)); \
|
|
387
|
+ }while(0)
|
385
|
388
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
386
|
389
|
#define Z_APPLY_STEP(v,Q) QUAD_ENDSTOP_APPLY_STEP(Z,v)
|
387
|
390
|
#elif ENABLED(Z_STEPPER_AUTO_ALIGN)
|
|
@@ -390,7 +393,9 @@ xyze_int8_t Stepper::count_direction{0};
|
390
|
393
|
#define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); Z4_STEP_WRITE(v); }while(0)
|
391
|
394
|
#endif
|
392
|
395
|
#elif NUM_Z_STEPPER_DRIVERS == 3
|
393
|
|
- #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE(v); Z3_DIR_WRITE(v); }while(0)
|
|
396
|
+ #define Z_APPLY_DIR(v,Q) do{ \
|
|
397
|
+ Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); \
|
|
398
|
+ }while(0)
|
394
|
399
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
395
|
400
|
#define Z_APPLY_STEP(v,Q) TRIPLE_ENDSTOP_APPLY_STEP(Z,v)
|
396
|
401
|
#elif ENABLED(Z_STEPPER_AUTO_ALIGN)
|
|
@@ -399,7 +404,7 @@ xyze_int8_t Stepper::count_direction{0};
|
399
|
404
|
#define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); }while(0)
|
400
|
405
|
#endif
|
401
|
406
|
#elif NUM_Z_STEPPER_DRIVERS == 2
|
402
|
|
- #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE(v); }while(0)
|
|
407
|
+ #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); }while(0)
|
403
|
408
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
404
|
409
|
#define Z_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Z,v)
|
405
|
410
|
#elif ENABLED(Z_STEPPER_AUTO_ALIGN)
|