Moode Forum

Full Version: Rotary encoder ignores "Max MPD volume"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hay all,

As in the topic title, I have found that when using the rotary encoder it doesn't obey the "Max MPD volume" setting in the audio configuration tab and will happily go right up to 100.

RUnning on:
Pi 2B,
Pi 7" screen
Moode 6.5.2 2020-05-03
Raspbian 10.2

Best regards Big Grin
I am able to repro. This is fixed for upcoming moOde 6.6.0 release.

You can also try adding the fixes manually by editing the file /usr/local/bin/rotenc. The adds are in red below

# Update MPD and UI volume
def update_volume(direction, step):
db_cursor.execute("SELECT value FROM cfg_system WHERE param='volknob' or param='volume_mpd_max'")
row = db_cursor.fetchone()
current_vol = int(row['value'])
row = db_cursor.fetchone()
volume_mpd_max = int(row['value'])

if direction == "+":
    new_volume = current_vol + step
    new_volume = current_vol - step

if new_volume > volume_mpd_max:
    new_volume = volume_mpd_max

if new_volume > 100:
    new_volume = 100
elif new_volume < 0:
    new_volume = 0

db_cursor.execute("UPDATE cfg_system SET value='" + str(new_volume) + "' WHERE param='volknob'")