This repository has been archived by the owner on Aug 27, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nullmoves are movements which don't actually move a stepper. For example because it's a velocity change only or the movement is shorter than a single motor step. Not queueing them up removes the necessity to check for them, which reduces code in critical areas. It also removes the necessity to run dda_start() twice to get past a nullmove. Best of this is, it also makes lookahead perform better. Before, a nullmove just changing speed interrupted the lookahead chain, now it no longer does. See straight-speeds.gcode and ...-Fsep.gcode, which produced different timings before, now results are identical. Also update the function description for dda_create(). Performance increase is impressive: another 75 clock cycles off the slowest step, only 36 bytes binary size increase: ATmega sizes '168 '328(P) '644(P) '1280 Program: 19652 bytes 138% 64% 31% 16% Data: 2175 bytes 213% 107% 54% 27% EEPROM: 32 bytes 4% 2% 2% 1% short-moves.gcode statistics: LED on occurences: 888. LED on time minimum: 280 clock cycles. LED on time maximum: 458 clock cycles. LED on time average: 284.653 clock cycles. smooth-curves.gcode statistics: LED on occurences: 23648. LED on time minimum: 272 clock cycles. LED on time maximum: 501 clock cycles. LED on time average: 307.275 clock cycles. triangle-odd.gcode statistics: LED on occurences: 1636. LED on time minimum: 272 clock cycles. LED on time maximum: 458 clock cycles. LED on time average: 297.625 clock cycles. Performance of straight-speeds{-Fsep}.gcode before: straight-speeds.gcode statistics: LED on occurences: 32000. LED on time minimum: 272 clock cycles. LED on time maximum: 586 clock cycles. LED on time average: 298.75 clock cycles. straight-speeds-Fsep.gcode statistics: LED on occurences: 32000. LED on time minimum: 272 clock cycles. LED on time maximum: 672 clock cycles. LED on time average: 298.79 clock cycles. Now: straight-speeds.gcode statistics: LED on occurences: 32000. LED on time minimum: 272 clock cycles. LED on time maximum: 501 clock cycles. LED on time average: 298.703 clock cycles. straight-speeds-Fsep.gcode statistics: LED on occurences: 32000. LED on time minimum: 272 clock cycles. LED on time maximum: 501 clock cycles. LED on time average: 298.703 clock cycles. There we save even 171 clock cycles :-)
- Loading branch information