From 3ac26f0cab967f669a0c9ea875cd5a117b3e2887 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 3 Nov 2013 12:25:26 +0100 Subject: [PATCH] DDA: move dda_find_crossing_speed() to dda.c. This is a preparation towards going through the existing movement queue backwards with dda_join_moves() to allow higher feedrates for lots of short movements. --- dda.c | 4 ++++ dda_lookahead.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) 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;