Replace max_accel_to_decel with minimum_cruise_ratio (#53)

This commit is contained in:
FOG_Yamato
2024-03-15 20:20:51 +02:00
committed by GitHub
parent 536c3c0eff
commit 82b91c1b40
2 changed files with 6 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ gcode:
{% set accel = [accel, printer.configfile.settings.printer.max_accel]|min %} {% set accel = [accel, printer.configfile.settings.printer.max_accel]|min %}
{% set old_accel = printer.toolhead.max_accel %} {% 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 old_sqv = printer.toolhead.square_corner_velocity %}
@@ -34,7 +34,7 @@ gcode:
G90 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 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 # Going to the start position
G1 Z{z_height} F{feedrate_travel / 8} 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}" RUN_SHELL_COMMAND CMD=shaketune PARAMS="--type axesmap --accel {accel|int} --chip_name {accel_chip}"
# Restore the previous acceleration values # 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 RESTORE_GCODE_STATE NAME=STATE_AXESMAP_CALIBRATION

View File

@@ -25,7 +25,7 @@ gcode:
{% set accel = [accel, printer.configfile.settings.printer.max_accel]|min %} {% set accel = [accel, printer.configfile.settings.printer.max_accel]|min %}
{% set old_accel = printer.toolhead.max_accel %} {% 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 old_sqv = printer.toolhead.square_corner_velocity %}
{% set direction_factor = { {% set direction_factor = {
@@ -129,7 +129,7 @@ gcode:
G90 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 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 # Going to the start position
G1 Z{z_height} F{feedrate_travel / 10} 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}" RUN_SHELL_COMMAND CMD=shaketune PARAMS="--type clean --keep_results {keep_results}"
# Restore the previous acceleration values # 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 RESTORE_GCODE_STATE NAME=STATE_VIBRATIONS_CALIBRATION