From 851a91306a4f5764d7830c8d0a79c22539cea4b4 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Mon, 14 Mar 2011 17:27:40 +0100 Subject: [PATCH] timer.c: don't reset next_step_time when doing a step. Doing so adds most of the interrupt execution time to the step time, see line 126 of the same file: if (next_step_time == 0) { // new move, take current time as start value step_start = TCNT1; } --- timer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/timer.c b/timer.c index 296f2bc..4f93dd9 100644 --- a/timer.c +++ b/timer.c @@ -69,7 +69,6 @@ void timer1_compa_isr() { ISR(TIMER1_COMPA_vect) { // Check if this is a real step, or just a next_step_time "overflow" if (next_step_time < 65536) { - next_step_time = 0; // step! timer1_compa_isr(); return;