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:
parent
88b6101e9a
commit
3ac26f0cab
4
dda.c
4
dda.c
|
|
@ -362,6 +362,10 @@ void dda_create(DDA *dda, TARGET *target) {
|
||||||
dda->rampdown_steps = dda->total_steps - dda->rampup_steps;
|
dda->rampdown_steps = dda->total_steps - dda->rampup_steps;
|
||||||
|
|
||||||
#ifdef LOOKAHEAD
|
#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_join_moves(prev_dda, dda);
|
||||||
dda->n = dda->start_steps;
|
dda->n = dda->start_steps;
|
||||||
if (dda->n == 0)
|
if (dda->n == 0)
|
||||||
|
|
|
||||||
|
|
@ -331,8 +331,6 @@ void dda_join_moves(DDA *prev, DDA *current) {
|
||||||
moveno++;
|
moveno++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dda_find_crossing_speed(prev, current);
|
|
||||||
|
|
||||||
// Bail out if there's nothing to join (e.g. G1 F1500).
|
// Bail out if there's nothing to join (e.g. G1 F1500).
|
||||||
if ( ! prev || prev->nullmove || current->crossF == 0)
|
if ( ! prev || prev->nullmove || current->crossF == 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue