Skip to content
Snippets Groups Projects
Commit 095ab5d5 authored by dx's avatar dx
Browse files

more uppercasings

parent 3e692f0a
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ VOL_UP_PIN = Pin(35, Pin.IN, Pin.PULL_UP) ...@@ -15,7 +15,7 @@ VOL_UP_PIN = Pin(35, Pin.IN, Pin.PULL_UP)
VOL_DOWN_PIN = Pin(37, Pin.IN, Pin.PULL_UP) VOL_DOWN_PIN = Pin(37, Pin.IN, Pin.PULL_UP)
foreground = 0 foreground = 0
volume = 0 VOLUME = 0
SELECT_TEXT = [ SELECT_TEXT = [
" ## #### # #### ## ##### #", " ## #### # #### ## ##### #",
...@@ -39,7 +39,7 @@ def run_menu(): ...@@ -39,7 +39,7 @@ def run_menu():
global foreground global foreground
display_fill(BACKGROUND_COLOR) display_fill(BACKGROUND_COLOR)
utils.draw_text_big(SELECT_TEXT, 0, 0) utils.draw_text_big(SELECT_TEXT, 0, 0)
utils.draw_volume_slider(volume) utils.draw_volume_slider(VOLUME)
display_update() display_update()
selected_petal = None selected_petal = None
...@@ -69,17 +69,17 @@ def foreground_menu(): ...@@ -69,17 +69,17 @@ def foreground_menu():
display_update() display_update()
def set_rel_volume(vol): def set_rel_volume(vol):
global volume global VOLUME
vol += volume vol += VOLUME
if vol > 20: if vol > 20:
vol = 20 vol = 20
if vol < -40: if vol < -40:
vol = -40 vol = -40
volume = vol VOLUME = vol
if vol == -40: #mute if vol == -40: #mute
set_global_volume_dB(-90) set_global_volume_dB(-90)
else: else:
set_global_volume_dB(volume) set_global_volume_dB(VOLUME)
time.sleep_ms(100) time.sleep_ms(100)
def main(): def main():
...@@ -92,7 +92,7 @@ def main(): ...@@ -92,7 +92,7 @@ def main():
foreground = run_menu foreground = run_menu
foreground_menu() foreground_menu()
set_global_volume_dB(volume) set_global_volume_dB(VOLUME)
while True: while True:
if(BOOTSEL_PIN.value() == 0): if(BOOTSEL_PIN.value() == 0):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment