From c594af3e190124c7f1ebce24310639ae555f5599 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sat, 30 Nov 2013 12:54:50 +0100 Subject: [PATCH] dda.c: don't set timer twice when going from one move to the next. This is a bug which existed, well, basically forever. Nobody noticed until precision timings could be recorded with SimulAVR. --- dda.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dda.c b/dda.c index 6d4df90..d7beea9 100644 --- a/dda.c +++ b/dda.c @@ -659,10 +659,11 @@ void dda_step(DDA *dda) { // z stepper is only enabled while moving z_disable(); } - else + else { psu_timeout = 0; - - setTimer(dda->c >> 8); + // After having finished, dda_start() will set the timer. + setTimer(dda->c >> 8); + } // turn off step outputs, hopefully they've been on long enough by now to register with the drivers // if not, too bad. or insert a (very!) small delay here, or fire up a spare timer or something.