aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/kin_extruder.c
Commit message (Collapse)AuthorAgeFilesLines
* extruder: Allow dynamic adjustment of pressure advance (#6635)Dmitry Butyugin2024-07-111-14/+69
| | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* extruder: Don't store pressure_advance value in trapq movesKevin O'Connor2022-01-161-11/+17
| | | | | | | | | Store the pressure_advance value in "struct extruder_stepper" instead of in the trapq's "struct move". This makes it possible for multiple stepper motors to have different pressure advance values while still using the same trapq. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_extruder: Fix numerical stability when using pressure advanceKevin O'Connor2020-10-231-7/+11
| | | | | | | | | Avoid using the absolute E position when calculating pressure advance as that position can grow arbitrarily large, which can result in "numerical stability" problems. That instability could eventually lead to internal errors during step compression. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_extruder: Convert pressure advance to use "weighted average"Kevin O'Connor2019-12-201-19/+54
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Rename scan_pre/_post to gen_steps_pre/post_activeKevin O'Connor2019-12-101-1/+2
| | | | | | Rename the variables to make it a little more clear what they do. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_extruder: Apply pressure advance in kin_extruder.cKevin O'Connor2019-12-081-58/+23
| | | | | | | | Implement the pressure advance calculations while performing the definitive integral calculations. This simplifies both the extruder.py and kin_extruder.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_extruder: Move integration code from trapq.c to kin_extruder.cKevin O'Connor2019-12-081-0/+65
| | | | | | | Move the code that calculates the definitive integral to the kin_extruder.c file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Initial support for "smoothed pressure advance"Kevin O'Connor2019-11-211-56/+45
| | | | | | | Support averaging the extruder position over a time range to "smooth out" the velocity changes that occur during pressure advance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Use separate 'move' entries for accel, cruise, and decel phasesKevin O'Connor2019-11-061-20/+39
| | | | | | | | Only track a single acceleration movement in a 'struct move' instance. Break the classic trapezoid movement (accel, cruise, decel) into three separate movements. This simplifies the calculation logic. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Remove move_fill()Kevin O'Connor2019-11-061-5/+9
| | | | | | | Now that all callers use the trapq system to queue moves, it is no longer necessary to individually allocate and fill a 'struct move'. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Convert step generation to use trapq systemKevin O'Connor2019-11-061-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Add new trapq.c file with code for trapezoidal velocity handlingKevin O'Connor2019-11-061-0/+1
| | | | | | Move the "struct move" code from itersolve.c to new file trapq.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Rename calc_position to calc_position_cbKevin O'Connor2019-11-061-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Convert to using iterative solverKevin O'Connor2018-06-201-0/+54
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>