Skip to content

Commit

Permalink
using toolhead offset into account for safe-z calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeKeck committed Aug 28, 2024
1 parent 1ab5c3a commit 56edd5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion macros/idex/vaoc.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ gcode:
{% set idex_ycontrolpoint = svv.idex_ycontrolpoint|default(30)|float %}
{% set idex_zcontrolpoint = svv.idex_zcontrolpoint|default(50)|float %}
{% set idex_zoffsetcontrolpoint = svv.idex_zoffsetcontrolpoint|default(0)|float %}
{% set toolhead_zoffset = svv.idex_zoffset|default(0)|float %}

# auto z-offset values
{% if auto_z_offset %}
Expand All @@ -354,7 +355,7 @@ gcode:
{% endif %}

# z-hop if needed
{% if printer.toolhead.position.z|float < safe_z %}
{% if printer.toolhead.position.z|float - toolhead_zoffset < safe_z %}
G1 Z{safe_z} F{z_speed}
{% else %}
G1 Z{idex_zcontrolpoint} F{z_speed}
Expand Down

0 comments on commit 56edd5e

Please sign in to comment.