Open TheBum opened 3 years ago
Can you please elaborate a bit more.
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().
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.
I think what is missing is a method to reset the interrupt bindings, probably by calling pigpio's cancel() function.
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.