Skip to content

Commit

Permalink
Handle empty frames to not crash on 0 effect rate
Browse files Browse the repository at this point in the history
  • Loading branch information
julianschill committed Feb 21, 2024
1 parent 337059d commit 65e5c4a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/led_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ def __init__(self, **kwargs):
self.lastAnalog = 0

def nextFrame(self, eventtime):
if not self.frameCount:
return [0] * COLORS * self.ledCount
self.frameNumber += 1
self.frameNumber = self.frameNumber * \
( self.frameNumber < self.frameCount )
Expand Down

0 comments on commit 65e5c4a

Please sign in to comment.