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.
This commit is contained in:
Markus Hitter 2013-11-03 12:25:26 +01:00
parent 88b6101e9a
commit 3ac26f0cab
2 changed files with 4 additions and 2 deletions

4
dda.c
View File

@ -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)

View File

@ -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;