Commit Graph

3 Commits

Author SHA1 Message Date
Kevin O'Connor 86a99cf38e gcode_button: Simplify script execution
It's no longer necessary to queue gcode scripts - gcode.run_script()
now does that automatically.

Also, make release_gcode config optional.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 12:11:49 -04:00
Kevin O'Connor 64031ab3d7 gcode: Rename respond() to respond_raw()
Rename the method to make it more clear that it is a low-level call
that should be rarely used.

Also, change gcode_button.py, hall_filament_width_sensor.py, and
tsl1401cl_filament_width_sensor.py to use respond_info() instead of
respond_raw().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 15:54:18 -04:00
Alec B. Plumb daadb36cb4 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>
2019-06-21 18:06:31 -04:00