Merge pull request #1393 from thinkyhead/issue_1385_timing

Add proper delay in stepper.cpp
This commit is contained in:
Scott Lahteine 2015-01-23 03:33:39 -08:00
commit 99e6ce901b

View file

@ -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
{
float x=1./float(axis+1)/float(axis+2); //wait a tiny bit
}
_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);