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