7 Commits

Author SHA1 Message Date
Eric Callahan
d506c9241f
refactor: convert application into a component
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-01-13 15:15:14 -05:00
Eric Callahan
ad1666bb2c
confighelper: add getgpioevent method
Use the ConfigHelper as an intermediary to register GPIO event
pins.  This allows for parsing exceptions to be captured and
properly re-raised as Config Errors.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-12-23 11:42:32 -05:00
Eric Callahan
2298f6b5a7
gpio: improve event debounce procedure
Use a traditional debouncing method, waiting for a specified
debounce period before triggering events.  Consumers may
choose to futher ignore events based on the the duration
between events.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-12-22 18:19:59 -05:00
Eric Callahan
7219cc45a5
button: fix linter errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-10-07 10:30:56 -04:00
Eric Callahan
0e80e301f0
button: remove stale sentinel import
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-22 18:08:50 -05:00
Eric Callahan
0f8638fec7
components: correct imports
All imports must now be relative to work correctly with the
moonraker parent package.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-02-22 12:16:27 -05:00
Eric Callahan
2025332e6f button: initial implementation
Adds support for GPIO buttons.  Each button is configured to render
a template when pressed and/or released.  The button event
templates recieve a context with  a "call_method" field, allowing
them to call nearly all Moonraker APIs.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-01-12 08:05:17 -05:00