From cf2c3f11e151eed63935fc9bac4d5ef913f2348a Mon Sep 17 00:00:00 2001 From: Justin Schuh Date: Tue, 13 Jun 2023 12:03:46 -0700 Subject: [PATCH] velocity: Remove M204 override and associated option --- README.md | 4 +--- globals.cfg | 8 +++++--- velocity.cfg | 25 ------------------------- 3 files changed, 6 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index b126c12..4400e3f 100644 --- a/README.md +++ b/README.md @@ -1111,9 +1111,7 @@ related commands, such as accelleration, jerk, and linear advance. #### Marlin Compatibility * The `M201`, `M203`, `M204`, and `M205` commands are implemented by calling - Klipper's `SET_VELOCITY_LIMIT` command. For calls that set the `ACCEL` - parameter, the `ACCEL_TO_DECEL` parameter is also set and scaled by - `variable_velocity_decel_scale` *(default: `0.5`)*. + Klipper's `SET_VELOCITY_LIMIT` command. * The `M900` command is implemented by calling Klipper's `SET_PRESSURE_ADVANCE` command. The `K` factor is scaled by `variable_pressure_advance_scale` *(default: `-1.0`)*. If the scaling value is negative the `M900` command has no diff --git a/globals.cfg b/globals.cfg index 1edc272..c18b220 100644 --- a/globals.cfg +++ b/globals.cfg @@ -91,8 +91,6 @@ variable_start_z_tilt_adjust_at_temp: True variable_travel_speed_xy: 3000 # Z travel speed in (mm/m) for movement macros. variable_travel_speed_z: 600 -# Value to scale acceleration by when setting ACCEL_TO_DECEL in M204, etc. -variable_velocity_decel_scale: 0.5 ################################################################################ description: Initializes our globals, including any _km_options overrides. gcode: @@ -124,7 +122,11 @@ gcode: "can now be achieved by inserting custom gcode before the " "_PRINT_START_PHASE_PURGE line in your slicer's start gcode, or by " "wrapping the _PRINT_START_PHASE_PURGE macro. See the Slicer " - "Configuration section in the readme for more information." + "Configuration section in the readme for more information.", + "velocity_decel_scale" : + "The velocity_decel_scale option has been removed. Klipper's input " + "shaping provides a superior mechanism for improving print quality " + "at higher speeds.", } %} {% set output = [] %} {% for s in required_sections %} diff --git a/velocity.cfg b/velocity.cfg index 298304b..cb4a7c6 100644 --- a/velocity.cfg +++ b/velocity.cfg @@ -12,10 +12,6 @@ gcode: {% set accel = (params.X|default(params.Y)|float, params.Y|default(params.X)|float)|min %} SET_GCODE_VARIABLE MACRO=m201 VARIABLE=max_accel VALUE="{accel}" - {% if accel < printer.toolhead.max_accel %} - SET_VELOCITY_LIMIT ACCEL="{accel - }" ACCEL_TO_DECEL="{accel * km.velocity_decel_scale}" - {% endif %} {% else %} SET_VELOCITY_LIMIT {% endif %} @@ -32,27 +28,6 @@ gcode: SET_VELOCITY_LIMIT {% endif %} -[gcode_macro m204] -description: Sets maximum accelleration. - Usage: M204 [S] [P T] -rename_existing: M204.6245197 -gcode: - {% set km = printer["gcode_macro _km_globals"] %} - {% set max_accel = printer["gcode_macro m201"].max_accel %} - {% set accel = 0.0 %} - {% if 'S' in params %} - {% set accel = (params.S|float, max_accel)|min %} - {% elif 'P' in params %} - {% set accel = (params.P|float, params.T|default(params.P)|float, - max_accel)|min %} - {% endif %} - {% if accel %} - SET_VELOCITY_LIMIT ACCEL="{accel - }" ACCEL_TO_DECEL="{accel * km.velocity_decel_scale}" - {% else %} - SET_VELOCITY_LIMIT - {% endif %} - [gcode_macro m205] description: Sets square corner velocity. Usage: M203 [X] [Y]