Open BenSeventy9 opened 5 years ago
can you explain what didn't work for you and what you are trying to achieve? the purpose of the steps-per-period is to make it take multiple events before a button press is generated, but your loop seems to be trying to reverse that and generate multiple button presses for a single event, is that correct?
If you have a standard cheap rotary encoder with 24 steps you need to turn 4 times 360° for volume 0-100%. This is annoying. As you say: Multiple button presses for a single event.
understood, i hadn't considered that scenario, i shall look at adding it in unless you wish to open a pull request.
Because steps-per-period=2 or 4 did not work for me so I added:
Use steps-per-period=1
and
on line 22: static int multiple_key = 3; // minimum is 1 on line 41: int ii;
And added a for loop: for (ii=0; ii<multiple_key; ii++) { send_key( (inc > 0) ? KEY_VOLUMEUP : KEY_VOLUMEDOWN); }