Skip to content

Commit 81dac2e

Browse files
committed
update to constant
1 parent 5d5a19b commit 81dac2e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Gemma_LightTouch/gemma_lighttouch.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ def brightness_cycle():
6464

6565
brightness = brightness_cycle()
6666

67-
cycle_speed_initial = 0.3
67+
CYCLE_SPEED_INITIAL = 0.3
6868
cycle_speed_start = time.monotonic()
69-
cycle_speed = cycle_speed_start + cycle_speed_initial
69+
cycle_speed = cycle_speed_start + CYCLE_SPEED_INITIAL
7070

7171
rainbow = None
7272
touch_A0_state = None
@@ -85,14 +85,14 @@ def brightness_cycle():
8585
if now >= cycle_speed:
8686
next(rainbow)
8787
cycle_speed_start = now
88-
cycle_speed = cycle_speed_start + cycle_speed_initial
88+
cycle_speed = cycle_speed_start + CYCLE_SPEED_INITIAL
8989

9090
if not touch_A1.value and touch_A1_state is None:
9191
touch_A1_state = "ready"
9292
if touch_A1.value and touch_A1_state == "ready":
93-
cycle_speed_initial = next(cycle_speeds)
93+
CYCLE_SPEED_INITIAL = next(cycle_speeds)
9494
cycle_speed_start = now
95-
cycle_speed = cycle_speed_start + cycle_speed_initial
95+
cycle_speed = cycle_speed_start + CYCLE_SPEED_INITIAL
9696
touch_A1_state = None
9797

9898
if not touch_A2.value and touch_A2_state is None:

0 commit comments

Comments
 (0)