Advertisement
rootiest

COMPARE_VALUES.cfg

Jul 30th, 2022
966
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.29 KB | None | 0 0
  1. [gcode_macro COMPARE_VALUES]
  2. description: Compare two values
  3. gcode:
  4.  {% set VALUE_A = params.A|default(0)|float %}
  5.   {% set VALUE_B = params.B|default(0)|float %}
  6.  
  7.   {% if VALUE_A < (VALUE_B - 3) or VALUE_A > (VALUE_B + 3) %}
  8.     M118 False
  9.   {% else %}
  10.     M118 True
  11.   {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement