This commit is contained in:
Boyan 2022-07-29 17:12:00 +03:00
parent b66ad843a7
commit 017f5b29ee

View File

@ -11,7 +11,7 @@ bands = {
} }
band = iter(bands) band = iter(bands)
CURRENT_BAND = None CURRENT_BAND = next(band)
def setup_encoder(ranges:list): def setup_encoder(ranges:list):
def rotary_callback(counter): def rotary_callback(counter):
@ -46,10 +46,8 @@ def change_band(plus:bool=False, minus:bool=False):
print(CURRENT_BAND) print(CURRENT_BAND)
except Exception as e: except Exception as e:
print(e) print(e)
try:
encoder = setup_encoder(bands[CURRENT_BAND]) encoder = setup_encoder(bands[CURRENT_BAND])
except Exception as e:
print(e)
print(CURRENT_BAND) print(CURRENT_BAND)
return encoder return encoder