From d10c0f3041331ee7971b55d586991dc594612254 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 10 Nov 2013 17:02:17 +0100 Subject: [PATCH] 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. --- dda.c | 1 + dda_lookahead.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/dda.c b/dda.c index b6aee80..a21dc45 100644 --- a/dda.c +++ b/dda.c @@ -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; diff --git a/dda_lookahead.c b/dda_lookahead.c index 7fb8597..1d5ca1e 100644 --- a/dda_lookahead.c +++ b/dda_lookahead.c @@ -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; }