Skip to content

Commit

Permalink
Sync with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamYellen authored and github-actions[bot] committed Jun 7, 2023
1 parent 24197b4 commit 2895f3f
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .last_sync_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ad9b7449e5249c80ac9fb860c758a2ce600ea8aa
4e044b3a83f43e35e5a18c892fcf6318f1d990f1
103 changes: 57 additions & 46 deletions klicky-macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -355,59 +355,70 @@ gcode:
{% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %}
{% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %}
{% set bypass_probe_docking = printer["gcode_macro _User_Variables"].bypass_probe_docking|default(False) %}
{% if bypass_probe_docking == False %}
{% else %}
{% if bypass_probe_docking == True %}
_KlickyDebug msg="Attach_Probe probe docking bypassed, doing nothing"
{% endif %}
{% if bypass_probe_docking == False %}

{% if bypass_probe_docking != True %}
_entry_point function=Dock_Probe

# If probe not attached and not locked
{% endif %}
_KLICKY_STATUS_BUSY
{% if printer.gcode_move.gcode_position.z < safe_z %}
_KlickyDebug msg="Dock_Probe 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 %}
_Umbilical_Path
# Probe entry location
_KlickyDebug msg="Dock_Probe moving near the dock with G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate}"
G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate}
{% if docklocation_z != -128 %}
_KlickyDebug msg="Dock_Probe moving near the dock with G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate}"
G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate}
{% endif %}
# if necessary do some actions before moving the toolhead to dock
_DeployKlickyDock
# Drop Probe to Probe location
_KlickyDebug msg="Dock_Probe moving to the dock with G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate}"
G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate}
{% if docklocation_z != -128 %}
_KlickyDebug msg="Attach_Probe moving to the dock with G0 Z{docklocation_z} F{dock_feedrate}"
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|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|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate}"
G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate}
# if necessary do some actions after attaching the probe
_RetractKlickyDock
#Do an extra move away
_KlickyDebug msg="Dock_Probe moving away from the dock to G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate}"
G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate}
## Go to Z safe distance
{% if (printer.gcode_move.gcode_position.z < safe_z) %}
_KlickyDebug msg="Dock_Probe moving to a safe Z position: G0 Z{safe_z} F{z_drop_feedrate} from {printer.gcode_move.gcode_position.z}"
{% if probe_attached and not probe_lock %}
_KLICKY_STATUS_BUSY
{% if printer.gcode_move.gcode_position.z < safe_z %}
_KlickyDebug msg="Dock_Probe 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 %}
{% endif %}
_Umbilical_Path

_Park_Toolhead
# Probe entry location
_KlickyDebug msg="Dock_Probe moving near the dock with G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate}"
G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate}

G4 P1000
_CheckProbe action=dock
_KLICKY_STATUS_READY
{% if docklocation_z != -128 %}
_KlickyDebug msg="Dock_Probe moving near the dock with G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate}"
G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate}
{% endif %}

# if necessary do some actions before moving the toolhead to dock
_DeployKlickyDock

# Drop Probe to Probe location
_KlickyDebug msg="Dock_Probe moving to the dock with G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate}"

G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate}
{% if docklocation_z != -128 %}
_KlickyDebug msg="Attach_Probe moving to the dock with G0 Z{docklocation_z} F{dock_feedrate}"
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|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|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate}"
G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate}

# if necessary do some actions after attaching the probe
_RetractKlickyDock

#Do an extra move away
_KlickyDebug msg="Dock_Probe moving away from the dock to G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate}"
G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate}

## Go to Z safe distance
{% if (printer.gcode_move.gcode_position.z < safe_z) %}
_KlickyDebug msg="Dock_Probe moving to a safe Z position: G0 Z{safe_z} F{z_drop_feedrate} from {printer.gcode_move.gcode_position.z}"
G0 Z{safe_z} F{z_drop_feedrate}
{% endif %}

_Park_Toolhead

G4 P1000
_CheckProbe action=dock
_KLICKY_STATUS_READY

{% elif probe_lock %}
{% if verbose %}
Expand Down

0 comments on commit 2895f3f

Please sign in to comment.