From e036750bdfb43ba61dc7ca6f8914c572bfbe0d76 Mon Sep 17 00:00:00 2001 From: daid303 Date: Sun, 9 Dec 2012 23:46:25 +0100 Subject: [PATCH] Use the disable macros on initialization. Which fixes a bug when there is no pin defined for stepper enabled (motherboard 4) --- Marlin/stepper.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index d9c0a45c5..760b3a752 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -824,38 +824,36 @@ void st_init() #if (X_STEP_PIN > -1) SET_OUTPUT(X_STEP_PIN); WRITE(X_STEP_PIN,INVERT_X_STEP_PIN); - if(!X_ENABLE_ON) WRITE(X_ENABLE_PIN,HIGH); + disable_x(); #endif #if (Y_STEP_PIN > -1) SET_OUTPUT(Y_STEP_PIN); WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN); - if(!Y_ENABLE_ON) WRITE(Y_ENABLE_PIN,HIGH); + disable_y(); #endif #if (Z_STEP_PIN > -1) SET_OUTPUT(Z_STEP_PIN); WRITE(Z_STEP_PIN,INVERT_Z_STEP_PIN); - if(!Z_ENABLE_ON) WRITE(Z_ENABLE_PIN,HIGH); - #if defined(Z_DUAL_STEPPER_DRIVERS) && (Z2_STEP_PIN > -1) SET_OUTPUT(Z2_STEP_PIN); WRITE(Z2_STEP_PIN,INVERT_Z_STEP_PIN); - if(!Z_ENABLE_ON) WRITE(Z2_ENABLE_PIN,HIGH); #endif + disable_z(); #endif #if (E0_STEP_PIN > -1) SET_OUTPUT(E0_STEP_PIN); WRITE(E0_STEP_PIN,INVERT_E_STEP_PIN); - if(!E_ENABLE_ON) WRITE(E0_ENABLE_PIN,HIGH); + disable_e0(); #endif #if defined(E1_STEP_PIN) && (E1_STEP_PIN > -1) SET_OUTPUT(E1_STEP_PIN); WRITE(E1_STEP_PIN,INVERT_E_STEP_PIN); - if(!E_ENABLE_ON) WRITE(E1_ENABLE_PIN,HIGH); + disable_e1(); #endif #if defined(E2_STEP_PIN) && (E2_STEP_PIN > -1) SET_OUTPUT(E2_STEP_PIN); WRITE(E2_STEP_PIN,INVERT_E_STEP_PIN); - if(!E_ENABLE_ON) WRITE(E2_ENABLE_PIN,HIGH); + disable_e2(); #endif #ifdef CONTROLLERFAN_PIN