Skip to content

Commit

Permalink
Macros: readd better error messages to VAOC
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Oct 30, 2024
1 parent db77852 commit 4308f99
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions macros/idex/vaoc.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,16 @@ gcode:
# vaoc sanity check
{% if is_fixed %}
{% if (idex_xcontrolpoint - expected_camera_x_position)|abs > 5 %}
{ action_raise_error("VAOC x-control coordinate is set to %s but is expected to be within 5mm of %s. Please run '_VAOC_RESET' to roll back to default values." % (idex_xcontrolpoint, expected_camera_x_position)) }
M84
{ action_raise_error("VAOC x-control coordinate is set to %.3f but is expected to be within 5mm of %.3f. Please run '_VAOC_RESET' to roll back to default values." % (idex_xcontrolpoint, expected_camera_x_position)) }
{% endif %}
{% if (idex_ycontrolpoint - expected_camera_y_position)|abs > 5 %}
{ action_raise_error("VAOC y-control coordinate is set to %s but is expected to be within 5mm of %s. Please run '_VAOC_RESET' to roll back to default values." % (idex_ycontrolpoint, expected_camera_y_position)) }
M84
{ action_raise_error("VAOC y-control coordinate is set to %.3f but is expected to be within 5mm of %.3f. Please run '_VAOC_RESET' to roll back to default values." % (idex_ycontrolpoint, expected_camera_y_position)) }
{% endif %}
{% endif %}
{% if safe_z < idex_zcontrolpoint + 2 or safe_z < idex_zoffsetcontrolpoint + 2 %}
{action_raise_error("VAOC safe_z value too low!")}
{action_raise_error("VAOC safe_z value (%.3f) is too low, it must be higher than %.3f" % (safe_z, [idex_zoffsetcontrolpoint + 2, idex_zcontrolpoint + 2]|max))}
{% endif %}

# cache toolchange config
Expand Down Expand Up @@ -697,10 +699,12 @@ gcode:
{% endif %}
{% if is_fixed %}
{% if (idex_xcontrolpoint - expected_camera_x_position)|abs > 5 %}
{ action_raise_error("Unexpected VAOC x-control point detected! Please run '_VAOC_RESET' to roll back to default values.") }
M84
{ action_raise_error("VAOC x-control coordinate is set to %.3f but is expected to be within 5mm of %.3f. Please run '_VAOC_RESET' to roll back to default values." % (idex_xcontrolpoint, expected_camera_x_position)) }
{% endif %}
{% if (idex_ycontrolpoint - expected_camera_y_position)|abs > 5 %}
{ action_raise_error("Unexpected VAOC y-control point detected! Please run '_VAOC_RESET' to roll back to default values.") }
M84
{ action_raise_error("VAOC y-control coordinate is set to %.3f but is expected to be within 5mm of %.3f. Please run '_VAOC_RESET' to roll back to default values." % (idex_ycontrolpoint, expected_camera_y_position)) }
{% endif %}
{% endif %}

Expand Down

0 comments on commit 4308f99

Please sign in to comment.