Browse Source

Add 1µs delay in other appropriate spots

Scott Lahteine 10 years ago
parent
commit
15a00a5a7c
1 changed files with 11 additions and 14 deletions
  1. 11
    14
      Marlin/stepper.cpp

+ 11
- 14
Marlin/stepper.cpp View File

@@ -1110,9 +1110,9 @@ void babystep(const uint8_t axis,const bool direction)
1110 1110
     #ifdef DUAL_X_CARRIAGE
1111 1111
       WRITE(X2_STEP_PIN, !INVERT_X_STEP_PIN);
1112 1112
     #endif
1113
-    {
1114
-      _delay_us(1U); // wait 1 microsecond
1115
-    }
1113
+
1114
+    _delay_us(1U); // wait 1 microsecond
1115
+
1116 1116
     WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
1117 1117
     #ifdef DUAL_X_CARRIAGE
1118 1118
       WRITE(X2_STEP_PIN, INVERT_X_STEP_PIN);
@@ -1142,9 +1142,9 @@ void babystep(const uint8_t axis,const bool direction)
1142 1142
     #ifdef DUAL_Y_CARRIAGE
1143 1143
       WRITE(Y2_STEP_PIN, !INVERT_Y_STEP_PIN);
1144 1144
     #endif
1145
-    {
1146
-    float x=1./float(axis+1)/float(axis+2); //wait a tiny bit
1147
-    }
1145
+
1146
+    _delay_us(1U); // wait 1 microsecond
1147
+
1148 1148
     WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
1149 1149
     #ifdef DUAL_Y_CARRIAGE
1150 1150
       WRITE(Y2_STEP_PIN, INVERT_Y_STEP_PIN);
@@ -1174,10 +1174,9 @@ void babystep(const uint8_t axis,const bool direction)
1174 1174
     #ifdef Z_DUAL_STEPPER_DRIVERS
1175 1175
       WRITE(Z2_STEP_PIN, !INVERT_Z_STEP_PIN);
1176 1176
     #endif
1177
-    //wait a tiny bit
1178
-    {
1179
-    float x=1./float(axis+1); //absolutely useless
1180
-    }
1177
+
1178
+    _delay_us(1U); // wait 1 microsecond
1179
+
1181 1180
     WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);
1182 1181
     #ifdef Z_DUAL_STEPPER_DRIVERS
1183 1182
       WRITE(Z2_STEP_PIN, INVERT_Z_STEP_PIN);
@@ -1210,10 +1209,8 @@ void babystep(const uint8_t axis,const bool direction)
1210 1209
     WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN); 
1211 1210
     WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN); 
1212 1211
     
1213
-    //wait a tiny bit
1214
-    {
1215
-    float x=1./float(axis+1); //absolutely useless
1216
-    }
1212
+    _delay_us(1U); // wait 1 microsecond
1213
+
1217 1214
     WRITE(X_STEP_PIN, INVERT_X_STEP_PIN); 
1218 1215
     WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN); 
1219 1216
     WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);

Loading…
Cancel
Save