aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/kin_extruder.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-10-29 12:44:39 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-11-06 15:51:51 -0500
commit1acaaa98c21af0a2a2cff725365dfda0ff4b7204 (patch)
tree601ce8a29fb24f7b4b83368c120c386563d2ff1b /klippy/chelper/kin_extruder.c
parent797dcfcb1218194077d37dd53575c19c4af710c5 (diff)
downloadkutter-1acaaa98c21af0a2a2cff725365dfda0ff4b7204.tar.gz
kutter-1acaaa98c21af0a2a2cff725365dfda0ff4b7204.tar.xz
kutter-1acaaa98c21af0a2a2cff725365dfda0ff4b7204.zip
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>
Diffstat (limited to 'klippy/chelper/kin_extruder.c')
-rw-r--r--klippy/chelper/kin_extruder.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/klippy/chelper/kin_extruder.c b/klippy/chelper/kin_extruder.c
index 26513092..37c00c8b 100644
--- a/klippy/chelper/kin_extruder.c
+++ b/klippy/chelper/kin_extruder.c
@@ -30,12 +30,14 @@ extruder_stepper_alloc(void)
// Populate a 'struct move' with an extruder velocity trapezoid
void __visible
-extruder_move_fill(struct move *m, double print_time
- , double accel_t, double cruise_t, double decel_t
- , double start_pos
- , double start_v, double cruise_v, double accel
- , double extra_accel_v, double extra_decel_v)
+extruder_add_move(struct trapq *tq, double print_time
+ , double accel_t, double cruise_t, double decel_t
+ , double start_pos
+ , double start_v, double cruise_v, double accel
+ , double extra_accel_v, double extra_decel_v)
{
+ struct move *m = move_alloc();
+
// Setup velocity trapezoid
m->print_time = print_time;
m->move_t = accel_t + cruise_t + decel_t;
@@ -54,4 +56,6 @@ extruder_move_fill(struct move *m, double print_time
// Setup start distance
m->start_pos.x = start_pos;
m->axes_r.x = 1.;
+
+ trapq_add_move(tq, m);
}