Skip to content

Commit

Permalink
update related to klipper update 20240313
Browse files Browse the repository at this point in the history
removed the ACCEL_TO_DECEL parameter from the code as it was deprecated by klipper.
  • Loading branch information
jlas1 committed Mar 14, 2024
1 parent f8dad75 commit ac98aef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
Binary file modified Klipper_macros/Klipper_macros.zip
Binary file not shown.
22 changes: 2 additions & 20 deletions Klipper_macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,9 @@ That macro as since evolved into a klipper plugin that currently is pending incl

Would alse like to thank the Voron discord community and VoronDesign for all the work, suggestions and support that they have given to improve on the macros.

## Updating from an earlier version
## Klipper change 20240313

While you should read these instructions to the end, as the necessary helper functions are now split on different files and it's better explained below, as a current user of the klicky macros, it's easier to configure.

The first macro on the old klicky-probe.cfg contained all the necessary variables, you should the values you changed one by one to the new klicky-variables.cfg, the most important are these ones:

```ini
# if you do not have any of these variables, read the explanation on klicky-variables.cfg and the setup of the macros on your respective printer, this is a quick start quide
variable_enable_z_hop # set this to false for beds that fall significantly under gravity (almost to Z max)
variable_max_bed_y # bed max y size
variable_max_bed_x # bed max x size

variable_z_endstop_x # copy this value over your old file
variable_z_endstop_y # copy this value over your old file

variable_docklocation_[x,y,z] # copy this value over your old file
Variable_dockmove_[x,y,z] # use 40,0,0 it's the old default
Variable_attachmove_[x,y,z] # use 0,30,0 it's the old default
```

Now if you use auto-z calibration, you also should copy z-calibration.cfg to klicky-z-calibration.cfg and remove the z-calibration.cfg include in printer.cfg.
Klipper `ACCEL_TO_DECEL` parameter of the `SET_VELOCITY_LIMIT` command has been deprecated, klicky macros used it on one location, that is now fixed on the versions going forward.



Expand Down
13 changes: 9 additions & 4 deletions Klipper_macros/klicky-macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,10 @@ gcode:
_KlickyDebug msg="homing_override clearing axis homed state if not already homing Z"
M84
{% endif %}
{% else %}
_KlickyDebug msg="All axis homed"
set safe_z = printer.gcode_move.gcode_position.z|float
_KlickyDebug msg="Setting Safe_z to {printer.gcode_move.gcode_position.z}mm as Z is now above configured safe_z"
{% endif %}

{% if home_z %}
Expand All @@ -673,7 +677,7 @@ gcode:
{% if verbose %}
{ action_respond_info("Homing Y") }
{% endif %}
{% if 'z' in printer.toolhead.homed_axes %}
{% if 'z' in printer.toolhead.homed_axes and printer.gcode_move.gcode_position.z < safe_z %}
_KlickyDebug msg="homing_override moving toolhead to {safe_z}mm from {printer.gcode_move.gcode_position.z}mm in Y homing seq"
{% if verbose %}
{ action_respond_info("moving to a safe Z distance") }
Expand Down Expand Up @@ -707,7 +711,7 @@ gcode:
{% if verbose %}
{ action_respond_info("Homing X") }
{% endif %}
{% if 'z' in printer.toolhead.homed_axes %}
{% if 'z' in printer.toolhead.homed_axes and printer.gcode_move.gcode_position.z < safe_z %}
_KlickyDebug msg="homing_override moving toolhead to {safe_z}mm from {printer.gcode_move.gcode_position.z}mm in X homing seq"
{% if verbose %}
{ action_respond_info("moving to a safe Z distance") }
Expand Down Expand Up @@ -738,7 +742,7 @@ gcode:
{% if verbose %}
{ action_respond_info("Homing Y") }
{% endif %}
{% if 'z' in printer.toolhead.homed_axes %}
{% if 'z' in printer.toolhead.homed_axes and printer.gcode_move.gcode_position.z < safe_z %}
_KlickyDebug msg="homing_override moving toolhead to {safe_z}mm from {printer.gcode_move.gcode_position.z}mm in Y homing seq"
{% if verbose %}
{ action_respond_info("moving to a safe Z distance") }
Expand Down Expand Up @@ -767,7 +771,7 @@ gcode:
{% if verbose %}
{ action_respond_info("Homing Z") }
{% endif %}
{% if 'z' in printer.toolhead.homed_axes %}
{% if 'z' in printer.toolhead.homed_axes and printer.gcode_move.gcode_position.z < safe_z %}
_KlickyDebug msg="homing_override moving toolhead to {safe_z}mm from {printer.gcode_move.gcode_position.z}mm in Y homing seq"
{% if verbose %}
{ action_respond_info("moving to a safe Z distance") }
Expand Down Expand Up @@ -857,6 +861,7 @@ gcode:
G28 Z0
_KlickyDebug msg="_Home_Z_ toolhead too low, raising it to {safe_z}mm from {printer.gcode_move.gcode_position.z}mm"
G0 Z{safe_z} F{z_drop_feedrate}

{% endif %}

_exit_point function=Home_Z
Expand Down

2 comments on commit ac98aef

@confuzled-dev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am confused. Did you forget to comment out the offending line?

@blacklizard
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue still persist

Screen Shot 2024-03-15 at 4 34 31 PM

need to update this line from

SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}

to

SET_VELOCITY_LIMIT MINIMUM_CRUISE_RATIO={printer.configfile.settings.printer.minimum_cruise_ratio}

and shouldn't it be better to use printer.toolhead.minimum_cruise_ratio instead of printer.configfile since the former does not require to have the option explicitly specified in the config file?

Please sign in to comment.