Hi, I’m having some sketchy debounce on my printer, which is causing my physical skirt buttons to register multiple presses really sporadically.
Is there a way in gcode to solve this properly?
If not, is there a get_ticks() function somewhere? Or a way to detect recent macros that have run, so I can solve it myself?
There is no exported method to set the “debouncing” time. (Internally the “debounce time” is 2ms as set by the QUERY_TIME parameter at the top of klippy/extras/buttons.py .)
Macros can access printer.toolhead.estimated_print_time to access an incrementing timer (in seconds).
I’ll have a look at printer.toolhead.estimated_print_time, but if the precision on that is seconds, then I won’t be able to use it.
It’s not ideal to have a constantly running macro firing in the background to count for me. But unless there’s a reasonably high precision timer somewhere - I’m kinda stuck.