From ed6a66c25d07094ca3c3c7c3f42f648ea6dd704e Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 20 Oct 2013 22:59:09 +0200 Subject: [PATCH] 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. --- timer.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/timer.c b/timer.c index 1a20d78..052fc01 100644 --- a/timer.c +++ b/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