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.
This commit is contained in:
Markus Hitter 2013-11-30 12:54:50 +01:00
parent 68cc213a70
commit c594af3e19
1 changed files with 4 additions and 3 deletions

7
dda.c
View File

@ -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.