aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/stepcompress.c
Commit message (Collapse)AuthorAgeFilesLines
* stepcompress: Implement a step+dir+step filterKevin O'Connor2020-03-131-27/+86
| | | | | | | | | | Some stepper motor drivers do not respond well to rapid "step + direction change + step" events. In particular, it is believed this can cause "over current" events on the tmc2208 drivers when they are in "stealthchop" mode. Detect these events and remove them from the generated step times. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Move code around in stepcompress.cKevin O'Connor2020-03-131-49/+49
| | | | | | Just code movement - no code changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Remove "queue append" abstractionKevin O'Connor2020-03-041-66/+30
| | | | | | | | | | The queue_append system predates the iterative solver - it was useful when many different kinematic functions directly added steps to the step compression queues. With the iterative solver being the only source of step generation, it is simpler to directly add steps from the iterative solver code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Fix rounding error when interval=0Kevin O'Connor2020-01-251-2/+2
| | | | | | | | | In the rare case where the step generation code finds an interval of zero, it was possible for an integer division of a negative number to cause an incorrect result. Fix that by using the idiv_up() and idiv_down() helpers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Remove no longer needed stepcompress_set_homing()Kevin O'Connor2019-07-101-20/+3
| | | | | | | Now that homing is implemented via "drip moves", it is no longer necessary for the stepcompress code to have special homing logic. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Wrap code to 80 columnsKevin O'Connor2019-02-271-3/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_cartesian: Remove stepcompress_push_const()Kevin O'Connor2018-06-201-1/+1
| | | | | | | All the kinematic code now uses the iterative solver to generate steps. Remove the old stepcompress_push_const() mechanism. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Add kinematic iterative solver codeKevin O'Connor2018-06-201-0/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Allow stepcompress_alloc() to be called earlyKevin O'Connor2018-06-201-7/+13
| | | | | | Don't require an mcu connection to allocate the stepcompress object. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Move cartesian and delta kinematics code to their own C filesKevin O'Connor2018-06-201-242/+17
| | | | | | | Move the cartesian and delta specific code to new files kin_cartesian.c and kin_delta.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Compile with gcc -fwhole-program optionKevin O'Connor2018-06-201-13/+13
| | | | | | | Use the -fwhole-program option when compiling the host C code. This makes it easier to support inlining across C files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Add compiler.h headerKevin O'Connor2018-06-201-4/+3
| | | | | | | Add the compiler.h header file to the chelper code - this adds a number of useful gcc definitions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Fix comment typo.Michael Barbour2018-06-041-1/+1
| | | | Signed-off-by: Michael Barbour <barbour.michael.0@gmail.com>
* chelper: Move the host C code to a new klippy/chelper/ directoryKevin O'Connor2018-04-301-0/+852
Move the C code out of the main klippy/ directory and into its own directory. This reduces the clutter in the main klippy directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>