more input handling work
This commit is contained in:
parent
0d4c7430b1
commit
3e46566f4d
@ -3,6 +3,7 @@ import RPi.GPIO as GPIO
|
||||
from SoundslabDisplay import SoundslabDisplay
|
||||
import time
|
||||
import musicpd
|
||||
from math import floor
|
||||
|
||||
# connect to mpd
|
||||
player_client = musicpd.MPDClient()
|
||||
@ -79,11 +80,17 @@ def DN():
|
||||
|
||||
def LF():
|
||||
# seek back 10s
|
||||
pass
|
||||
global player_client
|
||||
print("seek -10s")
|
||||
status = player_client.status()
|
||||
player_client.seekcur(floor(float(status['elapsed']) - 10.0))
|
||||
|
||||
def RT():
|
||||
# seek forward 10s
|
||||
pass
|
||||
global player_client
|
||||
print("seek +10s")
|
||||
status = player_client.status()
|
||||
player_client.seekcur(floor(float(status['elapsed']) + 10.0))
|
||||
|
||||
def SELECT():
|
||||
# display lock/unlock
|
||||
|
Loading…
Reference in New Issue
Block a user