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>
This commit is contained in:
@@ -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
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user