Browse Source

CoreXY Babystepping hotfix

Scott Lahteine 4 years ago
parent
commit
484e1a624c
1 changed files with 11 additions and 11 deletions
  1. 11
    11
      Marlin/src/module/stepper.cpp

+ 11
- 11
Marlin/src/module/stepper.cpp View File

2526
 
2526
 
2527
   #elif IS_CORE
2527
   #elif IS_CORE
2528
 
2528
 
2529
-    #define BABYSTEP_CORE(A, B, INV, DIR) do{                   \
2529
+    #define BABYSTEP_CORE(A, B, INV, DIR, ALT) do{              \
2530
       const xy_byte_t old_dir = { _READ_DIR(A), _READ_DIR(B) }; \
2530
       const xy_byte_t old_dir = { _READ_DIR(A), _READ_DIR(B) }; \
2531
       _ENABLE_AXIS(A); _ENABLE_AXIS(B);                         \
2531
       _ENABLE_AXIS(A); _ENABLE_AXIS(B);                         \
2532
       DIR_WAIT_BEFORE();                                        \
2532
       DIR_WAIT_BEFORE();                                        \
2533
       _APPLY_DIR(A, _INVERT_DIR(A)^DIR^INV);                    \
2533
       _APPLY_DIR(A, _INVERT_DIR(A)^DIR^INV);                    \
2534
-      _APPLY_DIR(B, _INVERT_DIR(B)^DIR^INV^(CORESIGN(1)<0));    \
2534
+      _APPLY_DIR(B, _INVERT_DIR(B)^DIR^INV^ALT);                \
2535
       DIR_WAIT_AFTER();                                         \
2535
       DIR_WAIT_AFTER();                                         \
2536
       _SAVE_START();                                            \
2536
       _SAVE_START();                                            \
2537
       _APPLY_STEP(A, !_INVERT_STEP_PIN(A), true);               \
2537
       _APPLY_STEP(A, !_INVERT_STEP_PIN(A), true);               \
2560
 
2560
 
2561
         case X_AXIS:
2561
         case X_AXIS:
2562
           #if CORE_IS_XY
2562
           #if CORE_IS_XY
2563
-            BABYSTEP_CORE(X, Y, false, direction);
2563
+            BABYSTEP_CORE(X, Y, 0, direction, 0);
2564
           #elif CORE_IS_XZ
2564
           #elif CORE_IS_XZ
2565
-            BABYSTEP_CORE(X, Z, false, direction);
2565
+            BABYSTEP_CORE(X, Z, 0, direction, 0);
2566
           #else
2566
           #else
2567
-            BABYSTEP_AXIS(X, false, direction);
2567
+            BABYSTEP_AXIS(X, 0, direction, 0);
2568
           #endif
2568
           #endif
2569
           break;
2569
           break;
2570
 
2570
 
2571
         case Y_AXIS:
2571
         case Y_AXIS:
2572
           #if CORE_IS_XY
2572
           #if CORE_IS_XY
2573
-            BABYSTEP_CORE(X, Y, false, direction);
2573
+            BABYSTEP_CORE(X, Y, 0, direction, (CORESIGN(1)<0));
2574
           #elif CORE_IS_YZ
2574
           #elif CORE_IS_YZ
2575
-            BABYSTEP_CORE(Y, Z, false, direction);
2575
+            BABYSTEP_CORE(Y, Z, 0, direction, (CORESIGN(1)<0));
2576
           #else
2576
           #else
2577
-            BABYSTEP_AXIS(Y, false, direction);
2577
+            BABYSTEP_AXIS(Y, 0, direction, (CORESIGN(1)<0));
2578
           #endif
2578
           #endif
2579
           break;
2579
           break;
2580
 
2580
 
2583
       case Z_AXIS: {
2583
       case Z_AXIS: {
2584
 
2584
 
2585
         #if CORE_IS_XZ
2585
         #if CORE_IS_XZ
2586
-          BABYSTEP_CORE(X, Z, BABYSTEP_INVERT_Z, direction);
2586
+          BABYSTEP_CORE(X, Z, BABYSTEP_INVERT_Z, direction, (CORESIGN(1)<0));
2587
         #elif CORE_IS_YZ
2587
         #elif CORE_IS_YZ
2588
-          BABYSTEP_CORE(Y, Z, BABYSTEP_INVERT_Z, direction);
2588
+          BABYSTEP_CORE(Y, Z, BABYSTEP_INVERT_Z, direction, (CORESIGN(1)<0));
2589
         #elif DISABLED(DELTA)
2589
         #elif DISABLED(DELTA)
2590
-          BABYSTEP_AXIS(Z, BABYSTEP_INVERT_Z, direction);
2590
+          BABYSTEP_AXIS(Z, BABYSTEP_INVERT_Z, direction, (CORESIGN(1)<0));
2591
 
2591
 
2592
         #else // DELTA
2592
         #else // DELTA
2593
 
2593
 

Loading…
Cancel
Save