DDA: Fix slow travel speed

@phord abstract this to: This happens only when !recalc_speed,
meaning we are cruising, not accelerating or decelerating. So it
pegs our dda->c at c_min if it never made it as far as c_min.

This commit will fix https://github.com/Traumflug/Teacup_Firmware/issues/69
This commit is contained in:
Nico Tonnhofer 2016-10-25 04:45:36 +02:00
parent 51075caaa9
commit 8a4cd52a68
1 changed files with 9 additions and 0 deletions

9
dda.c
View File

@ -910,6 +910,15 @@ void dda_clock() {
}
ATOMIC_END
}
else {
ATOMIC_START
if (current_id == dda->id)
// This happens only when !recalc_speed, meaning we are cruising, not
// accelerating or decelerating. So it pegs our dda->c at c_min if it
// never made it as far as c_min.
dda->c = dda->c_min;
ATOMIC_END
}
#endif
}