input_shaper: Initial support of input shaping (#3032)
Input shaping can help to reduce printer vibrations due to resonances and eliminate or reduce ghosting in prints. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit is contained in:
@@ -17,7 +17,7 @@ COMPILE_CMD = ("gcc -Wall -g -O2 -shared -fPIC"
|
||||
SOURCE_FILES = [
|
||||
'pyhelper.c', 'serialqueue.c', 'stepcompress.c', 'itersolve.c', 'trapq.c',
|
||||
'kin_cartesian.c', 'kin_corexy.c', 'kin_delta.c', 'kin_polar.c',
|
||||
'kin_rotary_delta.c', 'kin_winch.c', 'kin_extruder.c',
|
||||
'kin_rotary_delta.c', 'kin_winch.c', 'kin_extruder.c', 'kin_shaper.c',
|
||||
]
|
||||
DEST_LIB = "c_helper.so"
|
||||
OTHER_FILES = [
|
||||
@@ -104,6 +104,27 @@ defs_kin_extruder = """
|
||||
, double smooth_time);
|
||||
"""
|
||||
|
||||
defs_kin_shaper = """
|
||||
enum INPUT_SHAPER_TYPE {
|
||||
INPUT_SHAPER_ZV = 0,
|
||||
INPUT_SHAPER_ZVD = 1,
|
||||
INPUT_SHAPER_MZV = 2,
|
||||
INPUT_SHAPER_EI = 3,
|
||||
INPUT_SHAPER_2HUMP_EI = 4,
|
||||
INPUT_SHAPER_3HUMP_EI = 5,
|
||||
};
|
||||
|
||||
double input_shaper_get_step_generation_window(int shaper_type
|
||||
, double shaper_freq, double damping_ratio);
|
||||
int input_shaper_set_shaper_params(struct stepper_kinematics *sk
|
||||
, int shaper_type_x, int shaper_type_y
|
||||
, double shaper_freq_x, double shaper_freq_y
|
||||
, double damping_ratio_x, double damping_ratio_y);
|
||||
int input_shaper_set_sk(struct stepper_kinematics *sk
|
||||
, struct stepper_kinematics *orig_sk);
|
||||
struct stepper_kinematics * input_shaper_alloc(void);
|
||||
"""
|
||||
|
||||
defs_serialqueue = """
|
||||
#define MESSAGE_MAX 64
|
||||
struct pull_queue_message {
|
||||
@@ -147,7 +168,8 @@ defs_all = [
|
||||
defs_pyhelper, defs_serialqueue, defs_std,
|
||||
defs_stepcompress, defs_itersolve, defs_trapq,
|
||||
defs_kin_cartesian, defs_kin_corexy, defs_kin_delta, defs_kin_polar,
|
||||
defs_kin_rotary_delta, defs_kin_winch, defs_kin_extruder
|
||||
defs_kin_rotary_delta, defs_kin_winch, defs_kin_extruder,
|
||||
defs_kin_shaper,
|
||||
]
|
||||
|
||||
# Return the list of file modification times
|
||||
|
||||
Reference in New Issue
Block a user