Updated mode switcher

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-05-03 19:36:43 +02:00
parent 725259104e
commit 963494289d
1 changed files with 3 additions and 6 deletions

View File

@ -69,7 +69,6 @@ def play_pause():
consumer_control.send(ConsumerControlCode.PLAY_PAUSE) consumer_control.send(ConsumerControlCode.PLAY_PAUSE)
print('Play/Pause') print('Play/Pause')
time.sleep(1)
while True: while True:
if buttonPin.value == False: if buttonPin.value == False:
@ -77,7 +76,6 @@ while True:
mute_volumen() mute_volumen()
elif mode == 1: elif mode == 1:
play_pause() play_pause()
middle_mouse_button()
elif mode == 2: elif mode == 2:
middle_mouse_button() middle_mouse_button()
else: else:
@ -91,7 +89,6 @@ while True:
mode += 1 mode += 1
elif mode == 1: elif mode == 1:
play_pause() play_pause()
middle_mouse_button()
mode += 1 mode += 1
elif mode == 2: elif mode == 2:
middle_mouse_button() middle_mouse_button()
@ -107,9 +104,9 @@ while True:
if mode == 0: if mode == 0:
control_volumen(dtPin.value) control_volumen(dtPin.value)
elif mode == 1: elif mode == 1:
scroll_up_down(dtPin.value)
elif mode == 2:
previous_next_track(dtPin.value) previous_next_track(dtPin.value)
elif mode == 2:
scroll_up_down(dtPin.value)
else: else:
mode = 0 mode = 0
control_volumen(dtPin.value) control_volumen(dtPin.value)