From a30bf0630ce7a28ce66bce357a6128a593edea48 Mon Sep 17 00:00:00 2001 From: Alessandro Garosi Date: Thu, 31 Jan 2019 11:25:57 +0100 Subject: [PATCH] Added hints to #Troubleshooting section Added one line to troubleshooting to suggest workaround strategies when using the equality operator on floats. --- src/advanced/conditional-gcode.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/advanced/conditional-gcode.md b/src/advanced/conditional-gcode.md index 73bfc04..1746f53 100644 --- a/src/advanced/conditional-gcode.md +++ b/src/advanced/conditional-gcode.md @@ -80,3 +80,4 @@ Value expressions can be used in conditional expressions by nesting them: `{if { * If the parser can't understand your statements, it will output nothing for that block. * Remember that Custom G-code placeholders (items in `[]`) are resolved before Conditional G-code. +* Some Custom G-code placeholders have a floating point value, and the equality comparison will likely not work on these. For example `{if [layer_z] == 10}` will never return true. It is however possible to work around this, es: `{if [layer_z] > 9.999}{if [layer_z] < 10.001}` or `{if abs([layer_z]-10) < 0.001}`.