aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/gcode_button.py
Commit message (Collapse)AuthorAgeFilesLines
* buttons: Debounce gcode_button and filament_switch_sensor (#6848)Gareth Farrington2025-03-201-3/+5
| | | | | Add `debounce_delay` config option which sets the debounce time, defaults to 0 Signed-off-by: Gareth Farrington <gareth@waves.ky>
* gcode_button: Use config.getfloatlist() for analog_range config optionKevin O'Connor2021-08-211-6/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_button: Add support for analog buttonsKevin O'Connor2020-09-091-1/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Rename try_load_module() to load_object()Kevin O'Connor2020-05-081-2/+2
| | | | | | | | Rename try_load_module() so that it uses consistent naming for "printer objects". Change the function to raise an error by default if the specified module does not exist. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_button: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_button: Simplify script executionKevin O'Connor2020-04-251-25/+9
| | | | | | | | | 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>
* gcode: Rename respond() to respond_raw()Kevin O'Connor2020-04-241-1/+1
| | | | | | | | | | | 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>
* gcode_button: Execute gcode when a button is pressed or released (#1745)Alec B. Plumb2019-06-211-0/+61
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>