EncoderButton icon indicating copy to clipboard operation
EncoderButton copied to clipboard

Change positionDivider

Open Gfy63 opened this issue 3 years ago • 1 comments

Hi I use a rotary encoder with 2 pulses per click. To work well with you library, I have change the ‘positionDivider’ to 2. But the solution is not that I change it in all project copy of the library.

I request two solutions for my problem: void EncoderButton::useDoublePrecision(bool prec) { positionDivider = (prec?2:4); or

void EncoderButton::setPulsePerClick(int p) {positionDivider = p; }
int EncoderButton::getPulsePerClick(void) {return positionDivider; }

I prefer the second solution. Thanks for your work and i hope you can make the changes.

Gfy63

Gfy63 avatar Jan 06 '23 18:01 Gfy63

My apologies for missing this (and for so long!). I'm currently writing an 'InputEvents' library that brings together the encoder, button, joystick, analog & switch libraries into one, so will test this there. The major difference with the new library is that each input is tied to a single callback, rather than one callback for each event type (an event type is passed).

Stutchbury avatar Dec 05 '24 16:12 Stutchbury