Basic Information:
Printer Model:
MCU / Printerboard:
Host / SBC
klippy.log
Fill out above information and in all cases attach your klippy.log
file (use zip to compress it, if too big). Pasting your printer.cfg
is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there
Describe your issue:
Hi, I need some help. I want to use the state of a (gcode_button), for example, capture the output of QUERY_BUTTON button=MY_BUTTON, which will generate an output of “PRESSED” or “RELEASED”. I want to make a macro that checks the state of that button and depending on its state, do something. For example, something like:
{% if MY_BUTTON == “PRESSED” %}
do something…
{% else %}
do something…
{% endif %}
…