0xPIT / encoder

Atmel AVR C++ RotaryEncoder Implementation
309 stars 162 forks source link

Feature request: Hold while turning for faster increment/decrement #3

Open clone45 opened 10 years ago

clone45 commented 10 years ago

Hello, Sometimes it's necessary to use a rotary encoder to enter fairly large numbers. Although acceleration helps, when the numbers get past 1000, it still takes forever. I've seen a feature (on the Nord Modular) where the values can be incremented or decremented faster if the rotary encoder's switch is pressed while turning the encoder. This would be a nice new feature to have.

Here's a hack of ClickEncoder.php, just to illustrate my request:

if (val < 0) {
  r -= 1 + accel;
  if(button == Held) r -= 100;
}
else if (val > 0) {
  r += 1 + accel;
  if(button == Held) r += 100;
}

Thanks for the great library, Bret