From 82b91c1b40e2a121136c483dd9acfb11b56b4350 Mon Sep 17 00:00:00 2001 From: FOG_Yamato Date: Fri, 15 Mar 2024 20:20:51 +0200 Subject: [PATCH] Replace max_accel_to_decel with minimum_cruise_ratio (#53) --- K-ShakeTune/K-SnT_axes_map.cfg | 6 +++--- K-ShakeTune/K-SnT_vibrations.cfg | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/K-ShakeTune/K-SnT_axes_map.cfg b/K-ShakeTune/K-SnT_axes_map.cfg index b5bcac2..0be4b5d 100644 --- a/K-ShakeTune/K-SnT_axes_map.cfg +++ b/K-ShakeTune/K-SnT_axes_map.cfg @@ -16,7 +16,7 @@ gcode: {% set accel = [accel, printer.configfile.settings.printer.max_accel]|min %} {% set old_accel = printer.toolhead.max_accel %} - {% set old_accel_to_decel = printer.toolhead.max_accel_to_decel %} + {% set old_cruise_ratio = printer.toolhead.minimum_cruise_ratio %} {% set old_sqv = printer.toolhead.square_corner_velocity %} @@ -34,7 +34,7 @@ gcode: G90 # Set the wanted acceleration values (not too high to avoid oscillation, not too low to be able to reach constant speed on each segments) - SET_VELOCITY_LIMIT ACCEL={accel} ACCEL_TO_DECEL={accel} SQUARE_CORNER_VELOCITY={[(accel / 1000), 5.0]|max} + SET_VELOCITY_LIMIT ACCEL={accel} MINIMUM_CRUISE_RATIO=0 SQUARE_CORNER_VELOCITY={[(accel / 1000), 5.0]|max} # Going to the start position G1 Z{z_height} F{feedrate_travel / 8} @@ -55,6 +55,6 @@ gcode: RUN_SHELL_COMMAND CMD=shaketune PARAMS="--type axesmap --accel {accel|int} --chip_name {accel_chip}" # Restore the previous acceleration values - SET_VELOCITY_LIMIT ACCEL={old_accel} ACCEL_TO_DECEL={old_accel_to_decel} SQUARE_CORNER_VELOCITY={old_sqv} + SET_VELOCITY_LIMIT ACCEL={old_accel} MINIMUM_CRUISE_RATIO={old_cruise_ratio} SQUARE_CORNER_VELOCITY={old_sqv} RESTORE_GCODE_STATE NAME=STATE_AXESMAP_CALIBRATION diff --git a/K-ShakeTune/K-SnT_vibrations.cfg b/K-ShakeTune/K-SnT_vibrations.cfg index f3e78c0..351974b 100644 --- a/K-ShakeTune/K-SnT_vibrations.cfg +++ b/K-ShakeTune/K-SnT_vibrations.cfg @@ -25,7 +25,7 @@ gcode: {% set accel = [accel, printer.configfile.settings.printer.max_accel]|min %} {% set old_accel = printer.toolhead.max_accel %} - {% set old_accel_to_decel = printer.toolhead.max_accel_to_decel %} + {% set old_cruise_ratio = printer.toolhead.minimum_cruise_ratio %} {% set old_sqv = printer.toolhead.square_corner_velocity %} {% set direction_factor = { @@ -129,7 +129,7 @@ gcode: G90 # Set the wanted acceleration values (not too high to avoid oscillation, not too low to be able to reach constant speed on each segments) - SET_VELOCITY_LIMIT ACCEL={accel} ACCEL_TO_DECEL={accel} SQUARE_CORNER_VELOCITY={[(accel / 1000), 5.0]|max} + SET_VELOCITY_LIMIT ACCEL={accel} MINIMUM_CRUISE_RATIO=0 SQUARE_CORNER_VELOCITY={[(accel / 1000), 5.0]|max} # Going to the start position G1 Z{z_height} F{feedrate_travel / 10} @@ -161,6 +161,6 @@ gcode: RUN_SHELL_COMMAND CMD=shaketune PARAMS="--type clean --keep_results {keep_results}" # Restore the previous acceleration values - SET_VELOCITY_LIMIT ACCEL={old_accel} ACCEL_TO_DECEL={old_accel_to_decel} SQUARE_CORNER_VELOCITY={old_sqv} + SET_VELOCITY_LIMIT ACCEL={old_accel} MINIMUM_CRUISE_RATIO={old_cruise_ratio} SQUARE_CORNER_VELOCITY={old_sqv} RESTORE_GCODE_STATE NAME=STATE_VIBRATIONS_CALIBRATION