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 provision for exiting the watch() loop #13

Open
TheBum opened this issue Feb 23, 2021 · 4 comments
Open

No provision for exiting the watch() loop #13

TheBum opened this issue Feb 23, 2021 · 4 comments

Comments

@TheBum
Copy link

TheBum commented Feb 23, 2021

The watch() loop should examine the value of a variable that tells it when to exit. The variable would be set in one of the callbacks.

@volkerjaenisch
Copy link
Collaborator

Can you please elaborate a bit more.

@TheBum
Copy link
Author

TheBum commented Mar 11, 2021

The watch() method is nothing but an infinite sleep loop. I'm proposing making the loop conditional on a Boolean variable that can be set with a separate method, e.g. stop_watch().

@volkerjaenisch
Copy link
Collaborator

The watch() method was only left in the code for backward compatibility. Since the rotary now relies completely on pigpio triggered callback no watch at all is needed to operate the rotary. Watch will be gone in the next version.

@phr0gger
Copy link

phr0gger commented Feb 25, 2023

I think what is missing is a method to reset the interrupt bindings,
probably by calling pigpio's cancel() function.

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

No branches or pull requests

3 participants