Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check return value of wait_for_active #52

Open
AnthonyHorton opened this issue Oct 7, 2019 · 2 comments
Open

Check return value of wait_for_active #52

AnthonyHorton opened this issue Oct 7, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@AnthonyHorton
Copy link
Member

Should check return value of .wait_for_active(timeout=<input timeout>) calls to see if they timed out or not, and raise an exception if so.

The .wait_for_active() methods of gpiozero devices call the .wait() method of an internal threading.Event (see https://gpiozero.readthedocs.io/en/stable/_modules/gpiozero/mixins.html) and that methods returns True if the Event was set or False if it wasn't (i.e. it timed out): https://docs.python.org/3/library/threading.html#threading.Event

Will need to address #42 prior to this otherwise it will break the simulator (which currently relies on timeouts).

This will be needed as part of #39.

@AnthonyHorton AnthonyHorton added the enhancement New feature or request label Oct 7, 2019
@AnthonyHorton
Copy link
Member Author

AnthonyHorton commented Oct 8, 2019

Oh, this is effectively a duplicate of #32

@wtgee
Copy link
Contributor

wtgee commented Oct 8, 2019

Oh, this is effectively a duplicate of #32

You capture some good information here so would be good to incorporate into #32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants