Skip to content

Commit

Permalink
pattern: allow pattern brightness to be specified
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkl33t committed May 25, 2024
1 parent 3fc1c3d commit 1823a9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/system/patterndisplay/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ def __init__(self):

async def background_task(self):
while True:
brightness = settings.get("pattern_brightness", 1.0)
next_frame = self._p.next()
for l in range(12):
tildagonos.leds[l + 1] = next_frame[l]
if brightness < 1.0:
tildagonos.leds[l + 1] = tuple(int(i*brightness) for i in next_frame[l])
else:
tildagonos.leds[l + 1] = next_frame[l]
tildagonos.leds.write()
if not self._p.fps:
break
Expand Down

0 comments on commit 1823a9c

Please sign in to comment.