Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing M204 #555

Merged
merged 8 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/hardware/temperature_sensors/cabinet_temp.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[temperature_sensor ElectricalCabinet]
[temperature_sensor Electrical_Cabinet]
sensor_type: ATC Semitec 104GT-2
sensor_pin: ELECTRICAL_CABINET_TEMPERATURE
2 changes: 1 addition & 1 deletion config/hardware/temperature_sensors/rpi_temp.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[temperature_sensor RaspberryPi]
[temperature_sensor Raspberry_Pi]
sensor_type: temperature_host
1 change: 1 addition & 0 deletions config/kinematics/cartesian.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ max_velocity: 200
max_accel: 3000
max_z_velocity: 30
max_z_accel: 500
# minimum_cruise_ratio: 0.5 # This left commented to not break older Klipper versions
square_corner_velocity: 5.0

# And add directly all the machines standard includes here
Expand Down
1 change: 1 addition & 0 deletions config/kinematics/corexy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ max_velocity: 400
max_accel: 8000
max_z_velocity: 30
max_z_accel: 500
# minimum_cruise_ratio: 0.5 # This left commented to not break older Klipper versions
square_corner_velocity: 5.0

# And add directly all the machines standard includes here
Expand Down
1 change: 1 addition & 0 deletions config/kinematics/corexz.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ max_velocity: 400
max_accel: 1000
max_z_velocity: 200
max_z_accel: 1000
# minimum_cruise_ratio: 0.5 # This left commented to not break older Klipper versions
square_corner_velocity: 5.0

# And add directly all the machines standard includes here
Expand Down
5 changes: 2 additions & 3 deletions macros/base/homing/homing_override.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ gcode:

# Set the homing acceleration prior to any movement
{% set saved_accel = printer.toolhead.max_accel %}
{% set saved_decel = printer.toolhead.max_accel_to_decel %}
M204 S{homing_travel_accel}
SET_VELOCITY_LIMIT ACCEL={homing_travel_accel}

{% if bed_mesh_enabled %}
BED_MESH_CLEAR
Expand Down Expand Up @@ -340,7 +339,7 @@ gcode:
{% endif %}

# Reset acceleration values to what it was before
SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel}
SET_VELOCITY_LIMIT ACCEL={saved_accel}

{% if probe_type_enabled == "dockable" or probe_type_enabled == "dockable_virtual" %}
_EXIT_POINT FUNCTION=homing_override
Expand Down
10 changes: 4 additions & 6 deletions macros/base/probing/dockable_probe.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ gcode:

# Set the dock/undock acceleration prior to any movement
{% set saved_accel = printer.toolhead.max_accel %}
{% set saved_decel = printer.toolhead.max_accel_to_decel %}
M204 S{probe_dock_accel}
SET_VELOCITY_LIMIT ACCEL={probe_dock_accel}

# Probe entry location
_PROBE_MOVE_TO LOCATION={probe_before_attach_position} DISTANCE={probe_move_attach_length} SPEED={travel_speed}
Expand All @@ -161,7 +160,7 @@ gcode:
{% endif %}

# Reset acceleration values to what it was before
SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel}
SET_VELOCITY_LIMIT ACCEL={saved_accel}

_CHECK_PROBE action=attach

Expand Down Expand Up @@ -247,8 +246,7 @@ gcode:

# Set the dock/undock acceleration prior to any movement
{% set saved_accel = printer.toolhead.max_accel %}
{% set saved_decel = printer.toolhead.max_accel_to_decel %}
M204 S{probe_dock_accel}
SET_VELOCITY_LIMIT ACCEL={probe_dock_accel}

# Move to probe entry location
_PROBE_MOVE_TO LOCATION={probe_before_dock_position} DISTANCE={probe_move_dock_length} SPEED={travel_speed}
Expand All @@ -275,7 +273,7 @@ gcode:
{% endif %}

# Reset acceleration values to what it was before
SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel}
SET_VELOCITY_LIMIT ACCEL={saved_accel}

G4 P500
_CHECK_PROBE action=dock
Expand Down
3 changes: 1 addition & 2 deletions macros/base/probing/overrides/qgl.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ gcode:

# Set the tilting acceleration prior to any movement
{% set saved_accel = printer.toolhead.max_accel %}
{% set saved_decel = printer.toolhead.max_accel_to_decel %}
M204 S{tilting_travel_accel}

_BASE_QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %}

# Reset acceleration values to what it was before
SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel}
SET_VELOCITY_LIMIT ACCEL={saved_accel}

DEACTIVATE_PROBE

Expand Down
5 changes: 2 additions & 3 deletions macros/base/probing/overrides/z_tilt.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ gcode:

# Set the tilting acceleration prior to any movement
{% set saved_accel = printer.toolhead.max_accel %}
{% set saved_decel = printer.toolhead.max_accel_to_decel %}
M204 S{tilting_travel_accel}
SET_VELOCITY_LIMIT ACCEL={tilting_travel_accel}

_BASE_Z_TILT_ADJUST {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %}

# Reset acceleration values to what it was before
SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel}
SET_VELOCITY_LIMIT ACCEL={saved_accel}

DEACTIVATE_PROBE

Expand Down
6 changes: 3 additions & 3 deletions macros/calibration/test_speed.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ gcode:
G0 X{x_min} Y{y_min} Z{bound + 10} F{speed*60}

# Set new limits
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2}
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel}

{% for i in range(iterations) %}
# Large pattern diagonals
Expand Down Expand Up @@ -95,8 +95,8 @@ gcode:
G0 X{x_center_max} Y{y_center_min} F{speed*60}
{% endfor %}

# Restore max speed/accel/accel_to_decel to their configured values
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}
# Restore max speed/accel to their configured values
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel}

# Re-home and get position again for comparison:
M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66
Expand Down
3 changes: 1 addition & 2 deletions macros/helpers/nozzle_cleaning.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ gcode:

# Set the cleaning acceleration prior to any movement
{% set saved_accel = printer.toolhead.max_accel %}
{% set saved_decel = printer.toolhead.max_accel_to_decel %}
M204 S{brush_clean_accel}

# Move to purge zone (left side)
Expand Down Expand Up @@ -53,7 +52,7 @@ gcode:
G90

# Reset acceleration values to what it was before
SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel}
SET_VELOCITY_LIMIT ACCEL={saved_accel}

{% if purgeclean_servo_enabled %}
_SERVO_RETRACT ITEM="clean"
Expand Down
6 changes: 2 additions & 4 deletions macros/miscs/compatibility.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ gcode:
{% endif %}

[gcode_macro M204]
description: Map M204 to SET_VELOCITY_LIMIT for ACCEL and ACCEL_TO_DECEL
description: Map M204 to SET_VELOCITY_LIMIT for ACCEL
rename_existing: M204.1
gcode:
{% set F = params.F|default(printer["gcode_macro _USER_VARIABLES"].accel_to_decel_factor)|float %}

{% if 'S' in params %}
{% set S = params.S|float %}
SET_VELOCITY_LIMIT ACCEL={S} ACCEL_TO_DECEL={S * F}
SET_VELOCITY_LIMIT ACCEL={S}
{% endif %}

[gcode_macro M205]
Expand Down
3 changes: 0 additions & 3 deletions user_templates/variables.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ variable_tilting_travel_accel: 3000
variable_brush_clean_accel: 1500
variable_probe_dock_accel: 2000

## Accel to decel scale factor (default is 75% of the accel)
variable_accel_to_decel_factor: 0.75


#################################################
# Homing, start_print and end_print variables
Expand Down