diff --git a/Klipper_macros/klicky-macros.cfg b/Klipper_macros/klicky-macros.cfg index d7924f6..ad0a2a1 100644 --- a/Klipper_macros/klicky-macros.cfg +++ b/Klipper_macros/klicky-macros.cfg @@ -346,6 +346,9 @@ gcode: {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0)|float %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0)|float %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0)|float %} + {% set retainmove_x = printer["gcode_macro _User_Variables"].retainmove_x|default(-128)|float %} %} + {% set retainmove_y = printer["gcode_macro _User_Variables"].retainmove_y|default(-128)|float %} %} + {% set retainmove_z = printer["gcode_macro _User_Variables"].retainmove_z|default(-128)|float %} %} # Safe Z for travel {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} # Set feedrates @@ -391,11 +394,18 @@ gcode: G0 Z{docklocation_z} F{dock_feedrate} {% endif %} - # Probe decoupling - {% if docklocation_z != -128 %} - _KlickyDebug msg="Dock_Probe moving from the dock to G0 Z{docklocation_z + dockmove_z} F{release_feedrate}" - G0 Z{docklocation_z + dockmove_z} F{release_feedrate} - {% endif %} + + # Retain Movement - move the probe behind a retainer to scrape it off if needed (eg. Ender Klack). + {% if retainmove_x != -128 or retainmove_y != -128 or retainmove_z != -128 %} + _KlickyDebug msg="Dock_Probe moving to retain probe with G0 {'X' ~ retainmove_x if retainmove_x != -128} {'Y' ~ retainmove_y if retainmove_y != -128} {'Z' ~ retainmove_z if retainmove_z != -128} F{dock_feedrate}" + G0 {'X' ~ retainmove_x if retainmove_x != -128} {'Y' ~ retainmove_y if retainmove_y != -128} {'Z' ~ retainmove_z if retainmove_z != -128} F{dock_feedrate} + {% endif %} + + # Probe decoupling + {% if docklocation_z != -128 %} + _KlickyDebug msg="Dock_Probe moving from the dock to G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate}" + G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} + {% endif %} _KlickyDebug msg="Dock_Probe moving from the dock to G0 X{docklocation_x + dockmove_x} Y{docklocation_y + dockmove_y} F{release_feedrate}" G0 X{docklocation_x + dockmove_x} Y{docklocation_y + dockmove_y} F{release_feedrate} diff --git a/Klipper_macros/klicky-variables.cfg b/Klipper_macros/klicky-variables.cfg index d7e3b04..afc0cde 100644 --- a/Klipper_macros/klicky-variables.cfg +++ b/Klipper_macros/klicky-variables.cfg @@ -76,6 +76,11 @@ Variable_attachmove2_x: 0 # intermediate toolhead movement to attach Variable_attachmove2_y: 0 # the probe on the dock Variable_attachmove2_z: 0 # (can be negative) +# Retain Move. Extra movement just before undocking if needed to catch the probe behind a retainer for removal. +Variable_retainmove_x: -128 # X position to move to (-128 to ignore) +Variable_retainmove_y: -128 # Y position to move to (-128 to ignore) +Variable_retainmove_z: -128 # Z position to move to (-128 to ignore) + variable_home_backoff_x: 10 # how many mm to move away from the X endstop after homing X # this is useful for the voron v0 to enable the toolhead to move out of the way to allow an unstricted Y homing variable_home_backoff_y: 10 # how many mm to move away from the Y endstop after homing Y @@ -84,10 +89,10 @@ variable_override_homing: '' # configures what axis to home first # '' = default klicky behavior (tries to avoid the hitting the dock) # 'X' = forces X to home first # 'Y' = forces Y to home first - -variable_dock_on_zhome: True # docks the probe on Z Homing if not necessary (avoids hitting the bed on some printers -variable_bypass_probe_docking: False +variable_dock_on_zhome: True # docks the probe on Z Homing if not necessary (avoids hitting the bed on some printers + +variable_bypass_probe_docking: False # Do not modify below gcode: