Browse Source

Add proper delay in stepper.cpp

Issue #1385 describes a delay that the compiler is optimizing out and
this solution.
Scott Lahteine 10 years ago
parent
commit
d9d4a78e0f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/stepper.cpp

+ 1
- 1
Marlin/stepper.cpp View File

1111
       WRITE(X2_STEP_PIN, !INVERT_X_STEP_PIN);
1111
       WRITE(X2_STEP_PIN, !INVERT_X_STEP_PIN);
1112
     #endif
1112
     #endif
1113
     {
1113
     {
1114
-    float x=1./float(axis+1)/float(axis+2); //wait a tiny bit
1114
+      _delay_us(1U); // wait 1 microsecond
1115
     }
1115
     }
1116
     WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
1116
     WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
1117
     #ifdef DUAL_X_CARRIAGE
1117
     #ifdef DUAL_X_CARRIAGE

Loading…
Cancel
Save