From 3c348e4073aec50dd165344015480d45f33318dc Mon Sep 17 00:00:00 2001 From: HelgeKeck Date: Fri, 18 Oct 2024 15:22:58 +0200 Subject: [PATCH] Macros: improve toolhead z-offset message (#306) The number checked against wasn't absolute, so negative values reported "perfect offset". --- macros/idex/vaoc.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/macros/idex/vaoc.cfg b/macros/idex/vaoc.cfg index c6e2b02a..710617f4 100644 --- a/macros/idex/vaoc.cfg +++ b/macros/idex/vaoc.cfg @@ -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!"