From 15a00a5a7c5ff5b128ba999428e3b73a980913c8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 23 Jan 2015 03:24:45 -0800 Subject: [PATCH] =?UTF-8?q?Add=201=C2=B5s=20delay=20in=20other=20appropria?= =?UTF-8?q?te=20spots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/stepper.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 0b39776b96..92a6fd1f14 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -1110,9 +1110,9 @@ void babystep(const uint8_t axis,const bool direction) #ifdef DUAL_X_CARRIAGE WRITE(X2_STEP_PIN, !INVERT_X_STEP_PIN); #endif - { - _delay_us(1U); // wait 1 microsecond - } + + _delay_us(1U); // wait 1 microsecond + WRITE(X_STEP_PIN, INVERT_X_STEP_PIN); #ifdef DUAL_X_CARRIAGE WRITE(X2_STEP_PIN, INVERT_X_STEP_PIN); @@ -1142,9 +1142,9 @@ void babystep(const uint8_t axis,const bool direction) #ifdef DUAL_Y_CARRIAGE WRITE(Y2_STEP_PIN, !INVERT_Y_STEP_PIN); #endif - { - float x=1./float(axis+1)/float(axis+2); //wait a tiny bit - } + + _delay_us(1U); // wait 1 microsecond + WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN); #ifdef DUAL_Y_CARRIAGE WRITE(Y2_STEP_PIN, INVERT_Y_STEP_PIN); @@ -1174,10 +1174,9 @@ void babystep(const uint8_t axis,const bool direction) #ifdef Z_DUAL_STEPPER_DRIVERS WRITE(Z2_STEP_PIN, !INVERT_Z_STEP_PIN); #endif - //wait a tiny bit - { - float x=1./float(axis+1); //absolutely useless - } + + _delay_us(1U); // wait 1 microsecond + WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN); #ifdef Z_DUAL_STEPPER_DRIVERS WRITE(Z2_STEP_PIN, INVERT_Z_STEP_PIN); @@ -1210,10 +1209,8 @@ void babystep(const uint8_t axis,const bool direction) WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN); WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN); - //wait a tiny bit - { - float x=1./float(axis+1); //absolutely useless - } + _delay_us(1U); // wait 1 microsecond + WRITE(X_STEP_PIN, INVERT_X_STEP_PIN); WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN); WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);