-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Hello,
In a project, we are using push button and Pingo.
Unfortunately Swich class only provides a class with a polling mechanism.
What is your opinion about adding to Switch class some methods that could be used in a non threading context ?
We could have for example attributes such as pressed or released which would return True or False.
I also noticed that it's odd to have such a class named Switch in a file named button.py
CC @lwalter86
I also wonder how this could behave if passed pin at init could come from a GhostBoard.
For unit test, it will be very convenient to add also methods to simulate that a button is being pressed or released.
but.press()
do_something()
but.release()Kind regards
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels