Browse Source

Tiny calc_timer speedup

Scott Lahteine 8 years ago
parent
commit
ecfdcf7250
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/stepper.h

+ 2
- 2
Marlin/stepper.h View File

@@ -257,11 +257,11 @@ class Stepper {
257 257
       NOMORE(step_rate, MAX_STEP_FREQUENCY);
258 258
 
259 259
       if (step_rate > 20000) { // If steprate > 20kHz >> step 4 times
260
-        step_rate = (step_rate >> 2) & 0x3fff;
260
+        step_rate >>= 2;
261 261
         step_loops = 4;
262 262
       }
263 263
       else if (step_rate > 10000) { // If steprate > 10kHz >> step 2 times
264
-        step_rate = (step_rate >> 1) & 0x7fff;
264
+        step_rate >>= 1;
265 265
         step_loops = 2;
266 266
       }
267 267
       else {

Loading…
Cancel
Save