Переглянути джерело

Use the disable macros on initialization. Which fixes a bug when there is no pin defined for stepper enabled (motherboard 4)

daid303 12 роки тому
джерело
коміт
e036750bdf
1 змінених файлів з 6 додано та 8 видалено
  1. 6
    8
      Marlin/stepper.cpp

+ 6
- 8
Marlin/stepper.cpp Переглянути файл

@@ -824,38 +824,36 @@ void st_init()
824 824
   #if (X_STEP_PIN > -1) 
825 825
     SET_OUTPUT(X_STEP_PIN);
826 826
     WRITE(X_STEP_PIN,INVERT_X_STEP_PIN);
827
-    if(!X_ENABLE_ON) WRITE(X_ENABLE_PIN,HIGH);
827
+    disable_x();
828 828
   #endif  
829 829
   #if (Y_STEP_PIN > -1) 
830 830
     SET_OUTPUT(Y_STEP_PIN);
831 831
     WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN);
832
-    if(!Y_ENABLE_ON) WRITE(Y_ENABLE_PIN,HIGH);
832
+    disable_y();
833 833
   #endif  
834 834
   #if (Z_STEP_PIN > -1) 
835 835
     SET_OUTPUT(Z_STEP_PIN);
836 836
     WRITE(Z_STEP_PIN,INVERT_Z_STEP_PIN);
837
-    if(!Z_ENABLE_ON) WRITE(Z_ENABLE_PIN,HIGH);
838
-    
839 837
     #if defined(Z_DUAL_STEPPER_DRIVERS) && (Z2_STEP_PIN > -1)
840 838
       SET_OUTPUT(Z2_STEP_PIN);
841 839
       WRITE(Z2_STEP_PIN,INVERT_Z_STEP_PIN);
842
-      if(!Z_ENABLE_ON) WRITE(Z2_ENABLE_PIN,HIGH);
843 840
     #endif
841
+    disable_z();
844 842
   #endif  
845 843
   #if (E0_STEP_PIN > -1) 
846 844
     SET_OUTPUT(E0_STEP_PIN);
847 845
     WRITE(E0_STEP_PIN,INVERT_E_STEP_PIN);
848
-    if(!E_ENABLE_ON) WRITE(E0_ENABLE_PIN,HIGH);
846
+    disable_e0();
849 847
   #endif  
850 848
   #if defined(E1_STEP_PIN) && (E1_STEP_PIN > -1) 
851 849
     SET_OUTPUT(E1_STEP_PIN);
852 850
     WRITE(E1_STEP_PIN,INVERT_E_STEP_PIN);
853
-    if(!E_ENABLE_ON) WRITE(E1_ENABLE_PIN,HIGH);
851
+    disable_e1();
854 852
   #endif  
855 853
   #if defined(E2_STEP_PIN) && (E2_STEP_PIN > -1) 
856 854
     SET_OUTPUT(E2_STEP_PIN);
857 855
     WRITE(E2_STEP_PIN,INVERT_E_STEP_PIN);
858
-    if(!E_ENABLE_ON) WRITE(E2_ENABLE_PIN,HIGH);
856
+    disable_e2();
859 857
   #endif  
860 858
 
861 859
   #ifdef CONTROLLERFAN_PIN

Завантаження…
Відмінити
Зберегти