From 963494289dd94a62cd369f601210c6bd1071c130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 3 May 2022 19:36:43 +0200 Subject: [PATCH] Updated mode switcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- code.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code.py b/code.py index 01ece94..6ae0a68 100644 --- a/code.py +++ b/code.py @@ -69,7 +69,6 @@ def play_pause(): consumer_control.send(ConsumerControlCode.PLAY_PAUSE) print('Play/Pause') -time.sleep(1) while True: if buttonPin.value == False: @@ -77,7 +76,6 @@ while True: mute_volumen() elif mode == 1: play_pause() - middle_mouse_button() elif mode == 2: middle_mouse_button() else: @@ -91,7 +89,6 @@ while True: mode += 1 elif mode == 1: play_pause() - middle_mouse_button() mode += 1 elif mode == 2: middle_mouse_button() @@ -107,10 +104,10 @@ while True: if mode == 0: control_volumen(dtPin.value) elif mode == 1: - scroll_up_down(dtPin.value) - elif mode == 2: previous_next_track(dtPin.value) + elif mode == 2: + scroll_up_down(dtPin.value) else: mode = 0 control_volumen(dtPin.value) - previousValue = clkPin.value \ No newline at end of file + previousValue = clkPin.value