Skip to content

Commit

Permalink
Macros: improve toolhead z-offset message (#306)
Browse files Browse the repository at this point in the history
The number checked against wasn't absolute, so negative values reported "perfect offset".
  • Loading branch information
HelgeKeck authored Oct 18, 2024
1 parent 2d80e9e commit 3c348e4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions macros/idex/vaoc.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -635,15 +635,15 @@ gcode:

# echo
RATOS_ECHO PREFIX="VAOC" MSG={'"T%s toolhead z-offset %.6f"' % (1 if default_toolhead == 0 else 0, svv.idex_zoffset)}
{% if svv.idex_zoffset < 0.02 %}
{% if svv.idex_zoffset|abs < 0.02 %}
CONSOLE_ECHO TITLE={'"Perfect toolhead z-offset of %.6fmm!"' % svv.idex_zoffset} MSG="You have a perfect toolhead z-offset!" TYPE="success"
{% elif svv.idex_zoffset >= 0.02 and svv.idex_zoffset < 0.05 %}
{% elif svv.idex_zoffset|abs >= 0.02 and svv.idex_zoffset|abs < 0.05 %}
CONSOLE_ECHO TITLE={'"Good toolhead z-offset of %.6fmm!"' % svv.idex_zoffset} MSG="Your toolhead z-offset is good!" TYPE="success"
{% elif svv.idex_zoffset >= 0.05 and svv.idex_zoffset < 0.1 %}
{% elif svv.idex_zoffset|abs >= 0.05 and svv.idex_zoffset|abs < 0.1 %}
CONSOLE_ECHO TITLE={'"High toolhead z-offset of %.6fmm!"' % svv.idex_zoffset} MSG="Your toolhead z-offset could be better._N_Use minimum 0.3mm first layer height for copy and mirror mode prints." TYPE="warning"
{% elif svv.idex_zoffset >= 0.1 and svv.idex_zoffset < 0.2 %}
{% elif svv.idex_zoffset|abs >= 0.1 and svv.idex_zoffset|abs < 0.2 %}
CONSOLE_ECHO TITLE={'"Bad toolhead z-offset of %.6fmm!"' % svv.idex_zoffset} MSG="Your toolhead z-offset is bad._N_Copy and mirror mode prints are not recommended with it." TYPE="warning"
{% elif svv.idex_zoffset >= 0.2 %}
{% elif svv.idex_zoffset|abs >= 0.2 %}
CONSOLE_ECHO TITLE={'"Unacceptable toolhead z-offset of %.6fmm!"' % svv.idex_zoffset} MSG="Your toolhead z-offset is unacceptable._N_Do not print in copy and mirror mode with it." TYPE="alert"
{% endif %}
RATOS_ECHO PREFIX="VAOC" MSG="Toolhead z-offset calibration done!"
Expand Down

0 comments on commit 3c348e4

Please sign in to comment.