vash3d / pigpio_encoder

Python module for the KY040 rotary encoder.
GNU General Public License v3.0
14 stars 4 forks source link

[feature request] : clockwise & counterclockwise callback #8

Open SebDominguez opened 4 years ago

SebDominguez commented 4 years ago

Would be really nice if we can have a callback that just report a clockwise or counterclockwise rotation (maybe 2 different callback?) without any sens of scale / counter.

The way that this module is implemented : the callback doesn't get triggered if the counter is = min and we turn the encoder counterclockwise (same if counter = max and we turn the encoder clockwise)

volkerjaenisch commented 4 years ago

That is a very good idea. I will try to implement it at the weekend.

volkerjaenisch commented 4 years ago

@SebDominguez

Your feature is available. May you please be so kind to test the new feature.

I had an open pull request for the reconstruction of the parameter names. This I had to merge first, before I could merge your feature. So it may be that you have to change some parameter names in your code.

Cheers,

Volker