dda.c: clear /all/ lookahead variables when starting.

Catched it! :-)

This was causing occasional step losses when a movement with
zero crossF followed a pair with high crossF.
This commit is contained in:
Markus Hitter 2013-11-10 17:02:17 +01:00
parent 9715b7702d
commit d10c0f3041
2 changed files with 1 additions and 1 deletions

1
dda.c
View File

@ -113,6 +113,7 @@ void dda_create(DDA *dda, TARGET *target) {
#ifdef LOOKAHEAD
// Set the start and stop speeds to zero for now = full stops between
// moves. Also fallback if lookahead calculations fail to finish in time.
dda->crossF = 0;
dda->F_start = 0;
dda->start_steps = 0;
dda->F_end = 0;

View File

@ -172,7 +172,6 @@ void dda_find_crossing_speed(DDA *prev, DDA *current, uint32_t curr_distance) {
// Bail out if there's nothing to join (e.g. G1 F1500).
if ( ! prev || prev->nullmove) {
prev_distance = curr_distance;
current->crossF = 0;
return;
}