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

No persistent watch #1

Closed
Mrono opened this issue Jan 10, 2013 · 4 comments
Closed

No persistent watch #1

Mrono opened this issue Jan 10, 2013 · 4 comments
Assignees

Comments

@Mrono
Copy link

Mrono commented Jan 10, 2013

There is no option to persistently watch and initiate a callback each time it is pressed as it is currently a one-shot watch.

@fivdi
Copy link
Owner

fivdi commented Jan 10, 2013

Yes, this is currently the case. The main reason for this is to enable software debouncing for switches and buttons that are not hardware debounced. After the software debouncing has completed watch can be called again. Without debouncing switches and buttons can result in multiple interrupts. An option to persistently watch is however a good idea. I'll add one over the next few days.

@ghost ghost assigned fivdi Jan 10, 2013
@Mrono
Copy link
Author

Mrono commented Jan 10, 2013

what about having a setting to set the debounce timeout for the persistant watch?

edit: oops

@Mrono Mrono closed this as completed Jan 10, 2013
@Mrono Mrono reopened this Jan 10, 2013
@fivdi
Copy link
Owner

fivdi commented Jan 11, 2013

Another good idea. An optional persistent watch and optional debounce timeout will be available soon.

@fivdi
Copy link
Owner

fivdi commented Jan 12, 2013

V0.1.2 of onoff supports persistent watch and debounce timeouts. An example of their usage can be seen here

@fivdi fivdi closed this as completed Jan 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants