Skip to content

Commit

Permalink
fix issue with LEDs not updating when palette is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
jackw01 committed Aug 9, 2021
1 parent b78bb5d commit ddde945
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ledcontrol/animationcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def set_pattern_function(self, key, source):
self.pattern_functions[key] = pattern
elif key not in self.pattern_functions:
self.pattern_functions[key] = animpatterns.blank
self.update_needed = True
return errors, warnings

def calculate_palette_table(self):
Expand All @@ -270,6 +271,7 @@ def calculate_palette_table(self):
))
self.palette_table = palette_table
self.palette_length = len(palette['colors'])
self.update_needed = True

def get_palette_color(self, t):
'Get color from current palette corresponding to index between 0 and 1'
Expand Down

0 comments on commit ddde945

Please sign in to comment.