diff options
author | Alec B. Plumb <alec@etherwalker.com> | 2019-06-21 15:06:31 -0700 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2019-06-21 18:06:31 -0400 |
commit | daadb36cb4962c17afae0ad9c1a45083ee0883ff (patch) | |
tree | c2bedbed64424f0a5c0763370811d457475efd4d /config/example-extras.cfg | |
parent | 83e6c01ada040fd186d69e34691eb6533c00b4c5 (diff) | |
download | kutter-daadb36cb4962c17afae0ad9c1a45083ee0883ff.tar.gz kutter-daadb36cb4962c17afae0ad9c1a45083ee0883ff.tar.xz kutter-daadb36cb4962c17afae0ad9c1a45083ee0883ff.zip |
gcode_button: Execute gcode when a button is pressed or released (#1745)
An extra to execute gcode when a hardware button is pressed or released. Uses the jinja2 templating system.
Inspired by pull request #545 from Miguel Moitinho miguel@moitinho.net and pull request #1098 from Paulo Drugos paulodrugos@gmail.com
Signed-off-by: Alec Plumb <alec@etherwalker.com>
Diffstat (limited to 'config/example-extras.cfg')
-rw-r--r-- | config/example-extras.cfg | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/config/example-extras.cfg b/config/example-extras.cfg index a17d10db..ebe3b921 100644 --- a/config/example-extras.cfg +++ b/config/example-extras.cfg @@ -1618,3 +1618,18 @@ # Replicape support - see the generic-replicape.cfg file for further # details. #[replicape] + + +# Execute gcode when a button is pressed or released (or when a pin changes +# state). You can check the state of the button my using +# QUERY_BUTTON button=my_gcode_button +#[gcode_button my_gcode_button] +#pin: +# The pin on which the button is connected. This parameter must be +# provided. +#press_gcode: +# A list of G-Code commands to execute when the button is pressed. +# G-Code templates are supported. +#release_gcode: +# A list of G-Code commands to execute when the button is released. +# G-Code templates are supported. |