Now it has started to work, however the "full" step and "half" step needs to be investigated :).
PS1: My first encoder does a click every Gray code step (so called "1/4 cycle per detent").
With FULL_STEP it incr/decr every fourth click, with HALF_STEP it incr/decr every second click.
PS2: My second encoder (called "full cycle no detents) incr/decr based on the FULL/HALF_STEP slower or faster.
PS3: My third encoder (called "full cycle per detent") incr/decr twice a click when HALF, and once a click when FULL..
PS4: How does fit your mighty.hh the Mighty's pin assignment (see above)? My current understanding is the changes I proposed above does fit the mighty's pinout, you does it differently - why?
PS5: I've changed the types in rotary.hh (to long int) so now I can dial a frequency on my DDS VFO:
CosaRotaryEncoder: started
29999999
29999998
29999997
29999996
Some new ideas (this is NOT a change request):
- to make the dial parameters types flexible (signed/unsigned long long, long, int, char)
- to measure the time between the increments ("accelerated dialing") - when fast angular speed then double the increment each encoder's cycle (so a fast rotational pulse will create a huge increment). I have it with an very old pic16 DDS design and it works great..
- to add a "step" parameter (the increment)
- to rename FULL_STEP and HALF_STEP to FULL_CYCLE and HALF_CYCLE (as it is related to the encoder)
- the "1/4 cycle per detent" that is an unsupported encoder.