Commit Graph

11 Commits

Author SHA1 Message Date
Kevin O'Connor dabffcc22c kin_extruder: Convert pressure advance to use "weighted average"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-20 12:21:58 -05:00
Kevin O'Connor 04b3603a1e itersolve: Rename scan_pre/_post to gen_steps_pre/post_active
Rename the variables to make it a little more clear what they do.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-10 15:53:50 -05:00
Kevin O'Connor 080ee0b512 kin_extruder: Apply pressure advance in kin_extruder.c
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>
2019-12-08 20:41:35 -05:00
Kevin O'Connor 730a6d868b kin_extruder: Move integration code from trapq.c to kin_extruder.c
Move the code that calculates the definitive integral to the
kin_extruder.c file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-08 18:30:42 -05:00
Kevin O'Connor 6d0c55b6c1 extruder: Initial support for "smoothed pressure advance"
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>
2019-11-21 13:18:19 -05:00
Kevin O'Connor 076a66f791 trapq: Use separate 'move' entries for accel, cruise, and decel phases
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>
2019-11-06 15:51:51 -05:00
Kevin O'Connor 1acaaa98c2 trapq: Remove move_fill()
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>
2019-11-06 15:51:51 -05:00
Kevin O'Connor 9845d0d103 extruder: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor fdbdb3c707 trapq: Add new trapq.c file with code for trapezoidal velocity handling
Move the "struct move" code from itersolve.c to new file trapq.c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor 92993c062b itersolve: Rename calc_position to calc_position_cb
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor bbe53cf8e5 extruder: Convert to using iterative solver
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-20 09:26:10 -04:00