Tiny calc_timer speedup
This commit is contained in:
parent
7ba8f2dbc3
commit
ecfdcf7250
1 changed files with 2 additions and 2 deletions
|
@ -257,11 +257,11 @@ class Stepper {
|
||||||
NOMORE(step_rate, MAX_STEP_FREQUENCY);
|
NOMORE(step_rate, MAX_STEP_FREQUENCY);
|
||||||
|
|
||||||
if (step_rate > 20000) { // If steprate > 20kHz >> step 4 times
|
if (step_rate > 20000) { // If steprate > 20kHz >> step 4 times
|
||||||
step_rate = (step_rate >> 2) & 0x3fff;
|
step_rate >>= 2;
|
||||||
step_loops = 4;
|
step_loops = 4;
|
||||||
}
|
}
|
||||||
else if (step_rate > 10000) { // If steprate > 10kHz >> step 2 times
|
else if (step_rate > 10000) { // If steprate > 10kHz >> step 2 times
|
||||||
step_rate = (step_rate >> 1) & 0x7fff;
|
step_rate >>= 1;
|
||||||
step_loops = 2;
|
step_loops = 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Reference in a new issue