Thank you for your donation!


volume control by USB keyboard or volume knob
#21
(02-16-2020, 03:16 PM)Tim Curtis Wrote: Prolly less than robust debounce in the device firmware.

It seems that the output from the knob is ok. See screenshot after a very fast quarter right turn.

I think, the high numbers of ssh coomands per time cannot be followed by the RasPi.

It's not a really problem for me because i set Volume +2 instead of +1 / step. So i can quickly change the volume.

Best regards
Norbert

   
Reply
#22
That's interesting because I had a different result this morning. Here, for example, is the output for a quick twist of the Drok control knob to the right. Should be a steady steam of KEY_VOLUMEUP events:

Code:
# KEY_VOLUMEUP    1    command
EV_KEY    KEY_VOLUMEUP    0    /dev/input/event3
# KEY_VOLUMEUP    0    command
EV_KEY    KEY_VOLUMEUP    1    /dev/input/event3
# KEY_VOLUMEUP    1    command
EV_KEY    KEY_VOLUMEUP    0    /dev/input/event3
# KEY_VOLUMEUP    0    command
EV_KEY    KEY_VOLUMEDOWN    1    /dev/input/event3
# KEY_VOLUMEDOWN    1    command
EV_KEY    KEY_VOLUMEDOWN    0    /dev/input/event3
# KEY_VOLUMEDOWN    0    command
EV_KEY    KEY_VOLUMEDOWN    1    /dev/input/event3
# KEY_VOLUMEDOWN    1    command
EV_KEY    KEY_VOLUMEDOWN    0    /dev/input/event3
# KEY_VOLUMEDOWN    0    command
EV_KEY    KEY_VOLUMEUP    1    /dev/input/event3
# KEY_VOLUMEUP    1    command
EV_KEY    KEY_VOLUMEUP    0    /dev/input/event3

There still may be timing issues downstream, but the Drok microcode has its own problems.

Sorry, would have posted earlier but I stopped to make lunch Tongue

Regards,
Kent

PS - same "reversal" phenomenon occurs in rapid rotation to the left (counterclockwise), e.g., unexpected KEY_VOLUMEUP events interspersed among KEY_VOLUMEDOWN events
Reply
#23
I modified /var/www/vol.sh to echo its input to a temp file. Ran the control up and down sharply a couple times while monitoring the temp file.
  • the individual inputs to /var/www/vol.sh were always the string "-up 1" or "-dn 1"; there would be occasional occurrences of one or several "-dn 1" in a volume-up sequence, and v.v.
  • although that should cause the moOde volume setting to burble by one or several units, the moOde volume setting drops to 0.
Conclusion: the Drok isn't perfect but there's definitely something happening with the script in this circumstance, although I can't pinpoint what it is from this simple test. If I were a betting man, I'd bet on the interaction with the sqlite3 database, but I've been known to be wrong before, so no bet Tongue

Regards,
Kent
Reply
#24
Try this patch, it fixes the issue for me

https://github.com/moode-player/moode/is...-612965109
Reply
#25
(05-06-2020, 02:58 AM)mtnbrit Wrote: Try this patch, it fixes the issue for me

https://github.com/moode-player/moode/is...-612965109

Thanks for putting in the hard work. (In one sense I'm relieved to see I wasn't wrong in my suspicion; in another I'm depressed i didn't have the wit to press on to look for error messages.)

I chose to implement the revised patch in his Tim's reply half an hour ago to your issue 106.

No longer see the abrupt jumps to zero volume no matter how fast I spin the knob.

What I do see is an occasional odd burble in the rate of change of volume at intermediate rates of spin but I can live with that.

Nice work!

Regards,
Kent
Reply


Forum Jump: