moode-player / moode

moOde sources and configs
GNU General Public License v3.0
976 stars 163 forks source link

Add support for additional rotary encoders #664

Open p-vdp opened 2 months ago

p-vdp commented 2 months ago

My radio build has two rotary encoders, one for volume (which works great with standard settings) and one that I want to use for track selection (mpc previous and next commands).

What would it take to add settings/support for one or more rotary encoders to be assigned to mpc commands?

moodeaudio commented 2 months ago

I don't have any spare bandwidth but maybe another dev will become interested and volunteer their time and effort to write the code for this.

p-vdp commented 2 months ago

@moodeaudio I know you're busy 😃

I meant to ask, is this a PHP coding task? Python? Something else? If Python, I might be of some use...

thiscantbeserious commented 1 month ago

This is a 99% python task if you take a look a the rotenc.py script so far (all hard-coded).

That is if you simply want fixed GPIO-Pins with no config. I'd say it would make sense to make this configurable ... for example taking a look at Rotary Encoder II plugin in Volumio ...

https://github.com/moode-player/moode/blob/a89881bbdf57cf9d60212c24bbfa52145c88b146/www/snd-config.php#L236

https://github.com/moode-player/moode/blob/a89881bbdf57cf9d60212c24bbfa52145c88b146/www/daemon/rotenc.py

One could use the gpio-config.php and basically create a config for the rotary encoders too ...

https://github.com/moode-player/moode/blob/a89881bbdf57cf9d60212c24bbfa52145c88b146/www/gpio-config.php

This is how it looks like in Volumio:

https://community.volumio.com/uploads/default/original/3X/e/2/e28a0db6ea960c03213c7821544e1c01607fc34b.png