def setup(self,
           led,
           color_str,
           speed_str='MEDIUM',
           min_led=0,
           max_led=-1,
           segment_ctrl=None):
     self.led = led
     self.set_fps(speed_str)
     colors = bling_colors.get_colors(color_str)
     if segment_ctrl is not None:
         num_segments = self.bling.get_num_segments()
         segment_size = self.bling.get_segment_size()
         self.animation = SegmentColorPattern(led,
                                              num_segments=num_segments,
                                              segment_size=segment_size,
                                              colors=colors,
                                              width=DEFAULT_WIDTH,
                                              dir=True,
                                              start=min_led,
                                              end=max_led)
     else:
         self.animation = ColorPattern.ColorPattern(led,
                                                    colors=colors,
                                                    width=DEFAULT_WIDTH,
                                                    dir=True,
                                                    start=min_led,
                                                    end=max_led)
 def setup(self,
           led,
           color_str,
           speed_str='MEDIUM',
           min_led=0,
           max_led=-1,
           segment_ctrl=None):
     self.led = led
     self.set_fps(speed_str)
     colors = bling_colors.get_colors(color_str)
     if len(colors) < 2:
         colors.extend(bling_colors.get_colors('YELLOW'))
     self.animation = Alternates.Alternates(led,
                                            max_led=max_led,
                                            color1=colors[0],
                                            color2=colors[1])
 def setup(self,
           led,
           color_str,
           speed_str='MEDIUM',
           min_led=0,
           max_led=-1,
           segment_ctrl=None):
     self.led = led
     self.set_fps(speed_str)
     colors = bling_colors.get_colors(color_str)
     self.animation = StripChannelTest(led)
 def setup(self,
           led,
           color_str,
           speed_str='MEDIUM',
           min_led=0,
           max_led=-1,
           segment_ctrl=None):
     self.led = led
     self.set_fps(speed_str)
     # The Rainbow pattern doesn't let us set the colors...
     colors = bling_colors.get_colors(color_str)
     self.animation = Rainbows.RainbowCycle(led, start=min_led, end=max_led)
 def setup(self,
           led,
           color_str='RED',
           speed_str='MEDIUM',
           min_led=0,
           max_led=-1,
           segment_ctrl=None):
     # for the error pattern, we will ignore all settings and just blink the color red on
     # all LEDs at a super fast rate
     self.led = led
     colors = bling_colors.get_colors(color_str)
     self.animation = PartyMode.PartyMode(led, colors=colors)
 def setup(self,
           led,
           color_str,
           speed_str='MEDIUM',
           min_led=0,
           max_led=-1,
           segment_ctrl=None):
     self.led = led
     self.set_fps(speed_str)
     colors = bling_colors.get_colors(color_str)
     self.animation = Searchlights.Searchlights(led,
                                                colors=colors,
                                                start=min_led,
                                                end=max_led)
 def setup(self,
           led,
           color_str,
           speed_str='MEDIUM',
           min_led=0,
           max_led=-1,
           segment_ctrl=None):
     self.led = led
     self.set_fps(speed_str)
     # The rainbow scanner doesn't actually let us set the colors...
     colors = bling_colors.get_colors(color_str)
     self.animation = LarsonScanners.LarsonRainbow(led,
                                                   start=min_led,
                                                   end=max_led)
 def setup(self,
           led,
           color_str,
           speed_str='MEDIUM',
           min_led=0,
           max_led=-1,
           segment_ctrl=None):
     self.led = led
     self.set_fps(speed_str)
     colors = bling_colors.get_colors(color_str)
     if segment_ctrl is not None:
         num_segments = self.bling.get_num_segments()
         segment_size = self.bling.get_segment_size()
         self.animation = SegmentRainbow(led,
                                         num_segments=num_segments,
                                         segment_size=segment_size,
                                         max_led=max_led,
                                         centre_out=True)
     else:
         self.animation = HalvesRainbow.HalvesRainbow(led,
                                                      max_led=max_led,
                                                      centre_out=True)
 def setup(self,
           led,
           color_str,
           speed_str='MEDIUM',
           min_led=0,
           max_led=-1,
           segment_ctrl=None):
     self.led = led
     self.set_fps(speed_str)
     colors = bling_colors.get_colors(color_str)
     # LinearRainbow doesn't let us set the colors or the LED range.
     if segment_ctrl is not None:
         num_segments = self.bling.get_num_segments()
         segment_size = self.bling.get_segment_size()
         self.animation = SegmentLinearRainbow(led,
                                               num_segments=num_segments,
                                               segment_size=segment_size,
                                               individual_pixel=True,
                                               max_led=max_led)
     else:
         self.animation = LinearRainbow.LinearRainbow(led,
                                                      individual_pixel=True,
                                                      max_led=max_led)