timer.c: the concept of a "new move" was abandoned long time ago.
This doesn't matter much, as the timer overflows 300 times/second worst case, so the very first step of a series of moves is delayed never more than 30 milliseconds. Hardly recognizeable by a human. Saves a nice 40 bytes and improves max step rate by several percent.
This commit is contained in:
parent
0c100fe5f8
commit
ed6a66c25d
4
timer.c
4
timer.c
|
|
@ -151,10 +151,6 @@ void setTimer(uint32_t delay)
|
|||
// as from one step interrupt to the next one. The last step interrupt happend
|
||||
// at OCR1A, so start delay from there.
|
||||
step_start = OCR1A;
|
||||
if (next_step_time == 0) {
|
||||
// new move, take current time as start value
|
||||
step_start = TCNT1;
|
||||
}
|
||||
next_step_time = delay;
|
||||
|
||||
#ifdef ACCELERATION_TEMPORAL
|
||||
|
|
|
|||
Loading…
Reference in New Issue