Skip to content

Commit

Permalink
dda.c: endstop stop more reliably.
Browse files Browse the repository at this point in the history
  • Loading branch information
Traumflug committed May 29, 2014
1 parent 6c6b4b3 commit f51e52e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dda.c
Expand Up @@ -660,7 +660,7 @@ void dda_step(DDA *dda) {
if ((move_state.x_steps == 0 && move_state.y_steps == 0 &&
move_state.z_steps == 0 && move_state.e_steps == 0)
#ifdef ACCELERATION_RAMPING
|| (move_state.endstop_stop && dda->n == 0)
|| (move_state.endstop_stop && dda->n <= 0)
#endif
) {
dda->live = 0;
Expand All @@ -675,10 +675,12 @@ void dda_step(DDA *dda) {
#endif
// z stepper is only enabled while moving
z_disable();

// No need to restart timer here.
// After having finished, dda_start() will do it.
}
else {
psu_timeout = 0;
// After having finished, dda_start() will set the timer.
setTimer(dda->c >> 8);
}

Expand Down

0 comments on commit f51e52e

Please sign in to comment.