diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-10-27 13:23:03 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-11-06 15:51:51 -0500 |
commit | fdbdb3c70777e6c953b13d5455ccab56d024b029 (patch) | |
tree | 4e5240b3ad9474917aaf2ef9a5ea4ed0c996f2e8 /klippy/chelper/__init__.py | |
parent | 374eb9876565272c041e1d6950e7547d0604dffa (diff) | |
download | kutter-fdbdb3c70777e6c953b13d5455ccab56d024b029.tar.gz kutter-fdbdb3c70777e6c953b13d5455ccab56d024b029.tar.xz kutter-fdbdb3c70777e6c953b13d5455ccab56d024b029.zip |
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>
Diffstat (limited to 'klippy/chelper/__init__.py')
-rw-r--r-- | klippy/chelper/__init__.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py index 6de764f0..9bbb1199 100644 --- a/klippy/chelper/__init__.py +++ b/klippy/chelper/__init__.py @@ -15,13 +15,14 @@ COMPILE_CMD = ("gcc -Wall -g -O2 -shared -fPIC" " -flto -fwhole-program -fno-use-linker-plugin" " -o %s %s") SOURCE_FILES = [ - 'pyhelper.c', 'serialqueue.c', 'stepcompress.c', 'itersolve.c', + 'pyhelper.c', 'serialqueue.c', 'stepcompress.c', 'itersolve.c', 'trapq.c', 'kin_cartesian.c', 'kin_corexy.c', 'kin_delta.c', 'kin_polar.c', 'kin_winch.c', 'kin_extruder.c', ] DEST_LIB = "c_helper.so" OTHER_FILES = [ - 'list.h', 'serialqueue.h', 'stepcompress.h', 'itersolve.h', 'pyhelper.h' + 'list.h', 'serialqueue.h', 'stepcompress.h', 'itersolve.h', 'pyhelper.h', + 'trapq.h', ] defs_stepcompress = """ @@ -43,12 +44,6 @@ defs_stepcompress = """ """ defs_itersolve = """ - struct move *move_alloc(void); - void move_fill(struct move *m, double print_time - , double accel_t, double cruise_t, double decel_t - , double start_pos_x, double start_pos_y, double start_pos_z - , double axes_d_x, double axes_d_y, double axes_d_z - , double start_v, double cruise_v, double accel); int32_t itersolve_gen_steps(struct stepper_kinematics *sk, struct move *m); void itersolve_set_stepcompress(struct stepper_kinematics *sk , struct stepcompress *sc, double step_dist); @@ -58,6 +53,15 @@ defs_itersolve = """ double itersolve_get_commanded_pos(struct stepper_kinematics *sk); """ +defs_trapq = """ + struct move *move_alloc(void); + void move_fill(struct move *m, double print_time + , double accel_t, double cruise_t, double decel_t + , double start_pos_x, double start_pos_y, double start_pos_z + , double axes_d_x, double axes_d_y, double axes_d_z + , double start_v, double cruise_v, double accel); +""" + defs_kin_cartesian = """ struct stepper_kinematics *cartesian_stepper_alloc(char axis); """ @@ -127,7 +131,7 @@ defs_std = """ defs_all = [ defs_pyhelper, defs_serialqueue, defs_std, - defs_stepcompress, defs_itersolve, + defs_stepcompress, defs_itersolve, defs_trapq, defs_kin_cartesian, defs_kin_corexy, defs_kin_delta, defs_kin_polar, defs_kin_winch, defs_kin_extruder ] |