Skip to content

Commit

Permalink
MACRO: better y-coordinate VAOC sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeKeck committed Nov 2, 2024
1 parent a3704b2 commit e5d3035
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions macros/idex/vaoc.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,6 @@ gcode:

{% if printer["z_offset_probe"] is defined and is_started %}

# save current tool control points
{% if not auto_z_offset %}
_VAOC_SET_TOOL
{% endif %}

# config
{% set z_speed = printer["gcode_macro RatOS"].macro_z_speed|float * 60 %}
{% set default_toolhead = printer["gcode_macro RatOS"].default_toolhead|default(0)|int %}
Expand All @@ -511,7 +506,7 @@ gcode:
DEBUG_ECHO PREFIX="_VAOC_CALIBRATE_Z_OFFSET" MSG={'"xcontrolpoint: %.6f, ycontrolpoint: %.6f, zcontrolpoint: %.6f, zoffsetcontrolpoint: %.6f, expected_camera_x_position: %.6f, expected_camera_y_position: %.6f"' % (idex_xcontrolpoint, idex_ycontrolpoint, idex_zcontrolpoint, idex_zoffsetcontrolpoint, expected_camera_x_position, expected_camera_y_position)}

# vaoc sanity check
{% if printer.toolhead.position.y|float != idex_ycontrolpoint %}
{% if (printer.toolhead.position.y|float - idex_ycontrolpoint)|abs > 5 %}
M84
{ action_raise_error("Unexpected y-coordinate detected, VAOC aborted. Expected %.3f but got %.3f." % (idex_ycontrolpoint, printer.toolhead.position.y|float)) }
{% endif %}
Expand Down Expand Up @@ -694,7 +689,7 @@ gcode:
DEBUG_ECHO PREFIX="_VAOC_CALIBRATE_TEMP_OFFSET" MSG={'"xcontrolpoint: %.6f, ycontrolpoint: %.6f, zcontrolpoint: %.6f, zoffsetcontrolpoint: %.6f, expected_camera_x_position: %.6f, expected_camera_y_position: %.6f"' % (idex_xcontrolpoint, idex_ycontrolpoint, idex_zcontrolpoint, idex_zoffsetcontrolpoint, expected_camera_x_position, expected_camera_y_position)}

# vaoc sanity check
{% if printer.toolhead.position.y|float != idex_ycontrolpoint %}
{% if (printer.toolhead.position.y|float - idex_ycontrolpoint)|abs > 5 %}
M84
{ action_raise_error("Unexpected y-coordinate detected, VAOC aborted. Expected %.3f but got %.3f." % (idex_ycontrolpoint, printer.toolhead.position.y|float)) }
{% endif %}
Expand Down

0 comments on commit e5d3035

Please sign in to comment.