diff --git a/dda.c b/dda.c index 359b60c..8d063a7 100644 --- a/dda.c +++ b/dda.c @@ -362,6 +362,10 @@ void dda_create(DDA *dda, TARGET *target) { dda->rampdown_steps = dda->total_steps - dda->rampup_steps; #ifdef LOOKAHEAD + dda_find_crossing_speed(prev_dda, dda); + // TODO: this should become a reverse-stepping through the existing + // movement queue to allow higher speeds for short moves. + // dda_find_crossing_speed() is required only once. dda_join_moves(prev_dda, dda); dda->n = dda->start_steps; if (dda->n == 0) diff --git a/dda_lookahead.c b/dda_lookahead.c index e5d849e..eb42524 100644 --- a/dda_lookahead.c +++ b/dda_lookahead.c @@ -331,8 +331,6 @@ void dda_join_moves(DDA *prev, DDA *current) { moveno++; #endif - dda_find_crossing_speed(prev, current); - // Bail out if there's nothing to join (e.g. G1 F1500). if ( ! prev || prev->nullmove || current->crossF == 0) return;