RotaryEncoder icon indicating copy to clipboard operation
RotaryEncoder copied to clipboard

getRPM() uses hard coded number of pulses per rotation and ignores LatchMode

Open ftjuh opened this issue 1 year ago • 0 comments

Hi Matthias and thanks for a great library.

If I'm not completely mistaken, getRPM() assumes an encoder with 20 pulses per Rotation:

return 60000.0 / ((float)(t * 20));

So without being able to set this number ourselves, this will be wrong in most cases. Also, I assume that LatchMode needs to be taken into account.

Jan

ftjuh avatar Feb 20 '23 21:02 ftjuh