瀏覽代碼

Fix switching extruder stepping with LA

Scott Lahteine 6 年之前
父節點
當前提交
6775a16c97
共有 1 個檔案被更改,包括 10 行新增10 行删除
  1. 10
    10
      Marlin/src/module/stepper.cpp

+ 10
- 10
Marlin/src/module/stepper.cpp 查看文件

@@ -1797,26 +1797,26 @@ uint32_t Stepper::stepper_block_phase_isr() {
1797 1797
     #elif ENABLED(SWITCHING_EXTRUDER)
1798 1798
       #if EXTRUDERS > 4
1799 1799
         #define START_E_PULSE(INDEX) do{ if (e_steps) { switch (INDEX) { \
1800
-            case 0: case 1: E0_DIR_WRITE(!INVERT_E_STEP_PIN); break; \
1801
-            case 2: case 3: E1_DIR_WRITE(!INVERT_E_STEP_PIN); break; \
1802
-                    case 4: E2_DIR_WRITE(!INVERT_E_STEP_PIN); } \
1800
+            case 0: case 1: E0_STEP_WRITE(!INVERT_E_STEP_PIN); break; \
1801
+            case 2: case 3: E1_STEP_WRITE(!INVERT_E_STEP_PIN); break; \
1802
+                    case 4: E2_STEP_WRITE(!INVERT_E_STEP_PIN); } \
1803 1803
         } }while(0)
1804 1804
         #define STOP_E_PULSE(INDEX) do{ if (e_steps) { \
1805 1805
           e_steps < 0 ? ++e_steps : --e_steps; \
1806 1806
           switch (INDEX) { \
1807
-            case 0: case 1: E0_DIR_WRITE(INVERT_E_STEP_PIN); break; \
1808
-            case 2: case 3: E1_DIR_WRITE(INVERT_E_STEP_PIN); break; \
1809
-                    case 4: E2_DIR_WRITE(INVERT_E_STEP_PIN); } \
1807
+            case 0: case 1: E0_STEP_WRITE( INVERT_E_STEP_PIN); break; \
1808
+            case 2: case 3: E1_STEP_WRITE( INVERT_E_STEP_PIN); break; \
1809
+                    case 4: E2_STEP_WRITE( INVERT_E_STEP_PIN); } \
1810 1810
         } }while(0)
1811 1811
       #elif EXTRUDERS > 2
1812
-        #define START_E_PULSE(INDEX) do{ if (e_steps) { if (INDEX < 2) E0_DIR_WRITE(!INVERT_E_STEP_PIN); else E1_DIR_WRITE(!INVERT_E_STEP_PIN); } }while(0)
1812
+        #define START_E_PULSE(INDEX) do{ if (e_steps) { if (INDEX < 2) E0_STEP_WRITE(!INVERT_E_STEP_PIN); else E1_STEP_WRITE(!INVERT_E_STEP_PIN); } }while(0)
1813 1813
         #define STOP_E_PULSE(INDEX) do{ if (e_steps) { \
1814 1814
           e_steps < 0 ? ++e_steps : --e_steps; \
1815
-          if (INDEX < 2) E0_DIR_WRITE(INVERT_E_STEP_PIN); else E1_DIR_WRITE(INVERT_E_STEP_PIN); \
1815
+          if (INDEX < 2) E0_STEP_WRITE(INVERT_E_STEP_PIN); else E1_STEP_WRITE(INVERT_E_STEP_PIN); \
1816 1816
         } }while(0)
1817 1817
       #else
1818
-        #define START_E_PULSE(INDEX) do{ if (e_steps) E0_DIR_WRITE(!INVERT_E_STEP_PIN); }while(0)
1819
-        #define STOP_E_PULSE(INDEX) do{ if (e_steps) { e_steps < 0 ? ++e_steps : --e_steps; E0_DIR_WRITE(INVERT_E_STEP_PIN); }while(0)
1818
+        #define START_E_PULSE(INDEX) do{ if (e_steps) E0_STEP_WRITE(!INVERT_E_STEP_PIN); }while(0)
1819
+        #define STOP_E_PULSE(INDEX) do{ if (e_steps) { e_steps < 0 ? ++e_steps : --e_steps; E0_STEP_WRITE(INVERT_E_STEP_PIN); }while(0)
1820 1820
       #endif
1821 1821
     #else
1822 1822
       #define START_E_PULSE(INDEX) do{ if (e_steps) E## INDEX ##_STEP_WRITE(!INVERT_E_STEP_PIN); }while(0)

Loading…
取消
儲存