aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/trapq.h
Commit message (Collapse)AuthorAgeFilesLines
* toolhead: Keep stepcompress move history relative to current time (#6439)Francois Chagnon2023-12-301-1/+2
| | | | | Expire history relative to current time rather than last move in history queue Signed-off-by: Francois Chagnon <fc@francoischagnon.net>
* trapq: Minor code movement in trapq.cKevin O'Connor2023-01-071-5/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Store toolhead.set_position() updates in trapq historyKevin O'Connor2021-07-291-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Keep history of recent trapq movesKevin O'Connor2021-07-291-1/+10
| | | | | | | Store trapq moves in a separate "history" list after each move is nominally expired. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Rename trapq_free_moves() to trapq_finalize_moves()Kevin O'Connor2021-07-291-1/+1
| | | | 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-2/+0
| | | | | | | Move the code that calculates the definitive integral to the kin_extruder.c file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Add trapq_find_move() functionKevin O'Connor2019-11-211-0/+1
| | | | | | | Add support for finding a move by time in the trapezoidal velocity move list. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Add code to calculate definitive integralKevin O'Connor2019-11-211-1/+7
| | | | | | | Support calculating the definitive integral of a cartesian axis position over a time range of the movement queue. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Implement sentinel nodes on the trapq listKevin O'Connor2019-11-211-0/+1
| | | | | | | Use sentinels to make list traversal code simpler. Also add in null moves so that there are no time gaps in the list. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Calculate and store axes_r in move classKevin O'Connor2019-11-061-1/+1
| | | | | | | | Calculate the ratio of axis distance to total move distance (axis_d / move_d) and store in a new member variable axes_r. This avoids needing to recalculate the value in other code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Use separate 'move' entries for accel, cruise, and decel phasesKevin O'Connor2019-11-061-8/+1
| | | | | | | | 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-9/+8
| | | | | | | 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>
* trapq: Initial support for building a queue of trapezoidal velocity movesKevin O'Connor2019-11-061-0/+13
| | | | | | | | Add support for building a list of moves in the trapq.c code. Update the toolhead code so that moves generated from the look-ahead code are added to that list. 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/+30
Move the "struct move" code from itersolve.c to new file trapq.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>