DDA: The test of total_steps against step_no was a good idea.
So let's bring this part back. We save 35 clock cycles at 'LED on time maximum' ATmega sizes '168 '328(P) '644(P) '1280 Program: 18038 bytes 126% 59% 29% 14% Data: 1936 bytes 190% 95% 48% 24% EEPROM: 32 bytes 4% 2% 2% 1% short-moves.gcode statistics: LED on occurences: 888. LED on time minimum: 217 clock cycles. LED on time maximum: 520 clock cycles. LED on time average: 249.626 clock cycles. smooth-curves.gcode statistics: LED on occurences: 22589. LED on time minimum: 217 clock cycles. LED on time maximum: 537 clock cycles. LED on time average: 284.747 clock cycles. triangle-odd.gcode statistics: LED on occurences: 1636. LED on time minimum: 217 clock cycles. LED on time maximum: 520 clock cycles. LED on time average: 270.933 clock cycles.
This commit is contained in:
parent
22489c69cb
commit
1e052a77a2
10
dda.c
10
dda.c
|
|
@ -676,12 +676,14 @@ void dda_step(DDA *dda) {
|
|||
//
|
||||
// TODO: with ACCELERATION_TEMPORAL this duplicates some code. See where
|
||||
// dda->live is zero'd, about 10 lines above.
|
||||
if ((move_state.steps[X] == 0 && move_state.steps[Y] == 0 &&
|
||||
#if ! defined ACCELERATION_TEMPORAL
|
||||
if (move_state.step_no >= dda->total_steps ||
|
||||
(move_state.endstop_stop && dda->n <= 0))
|
||||
#else
|
||||
if (move_state.steps[X] == 0 && move_state.steps[Y] == 0 &&
|
||||
move_state.steps[Z] == 0 && move_state.steps[E] == 0)
|
||||
#ifdef ACCELERATION_RAMPING
|
||||
|| (move_state.endstop_stop && dda->n <= 0)
|
||||
#endif
|
||||
) {
|
||||
{
|
||||
dda->live = 0;
|
||||
dda->done = 1;
|
||||
#ifdef LOOKAHEAD
|
||||
|
|
|
|||
Loading…
Reference in New Issue