From 017f5b29ee5825e569889db18293fe97f715f467 Mon Sep 17 00:00:00 2001 From: Boyan Date: Fri, 29 Jul 2022 17:12:00 +0300 Subject: [PATCH] yeet --- rotary.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rotary.py b/rotary.py index 802aeba..9b964ff 100644 --- a/rotary.py +++ b/rotary.py @@ -11,7 +11,7 @@ bands = { } band = iter(bands) -CURRENT_BAND = None +CURRENT_BAND = next(band) def setup_encoder(ranges:list): def rotary_callback(counter): @@ -46,10 +46,8 @@ def change_band(plus:bool=False, minus:bool=False): print(CURRENT_BAND) except Exception as e: print(e) - try: - encoder = setup_encoder(bands[CURRENT_BAND]) - except Exception as e: - print(e) + + encoder = setup_encoder(bands[CURRENT_BAND]) print(CURRENT_BAND) return encoder