Ejemplo n.º 1
0
 def pixel_breathing_lerp(self, args):
     color_to, isColor1 = Util.colorTryParse(args["color_to"])
     color_from, isColor2 = Util.colorTryParse(args["color_from"])
     move_factor, isFloat = Util.floatTryParse(args["move_factor"])
     if (isColor1 and isColor2 and isFloat):
         self.__execute_task(LedUtil.breathing_lerp,
                             (self.pixels, lambda: self.cancelTask,
                              color_from, color_to, move_factor))
Ejemplo n.º 2
0
 def pixel_labyrinth(self, args):
     wait, isFloat = Util.floatTryParse(args["wait"])
     color, isColor = Util.colorTryParse(args["color"])
     contact_color, isColor2 = Util.colorTryParse(args["contact_color"])
     count, isInt = Util.intTryParse(args["count"])
     turn_chance, isInt2 = Util.intTryParse(args["turn_chance"])
     if (isColor and isColor2 and isFloat and isInt and isInt2):
         self.__execute_task(LedUtil.labyrinth,
                             (self.pixels, lambda: self.cancelTask, wait,
                              count, turn_chance, color, contact_color))
Ejemplo n.º 3
0
 def pixel_color_pair(self, args):
     wait, isFloat = Util.floatTryParse(args["wait"])
     color1, isColor1 = Util.colorTryParse(args["color1"])
     color2, isColor2 = Util.colorTryParse(args["color2"])
     size1, isInt1 = Util.intTryParse(args["size1"])
     size2, isInt2 = Util.intTryParse(args["size2"])
     with_animation, isBool = Util.boolTryParse(args["with_animation"])
     fade_step, isInt = Util.intTryParse(args["fade_step"])
     if (isColor1 and isColor2 and isFloat and isInt1 and isInt2 and isInt
             and isBool):
         self.__execute_task(
             LedUtil.color_pair,
             (self.pixels, lambda: self.cancelTask, wait, color1, color2,
              size1, size2, with_animation, fade_step))
Ejemplo n.º 4
0
 def pixel_breathing(self, args):
     color, isColor = Util.colorTryParse(args["color"])
     move_factor, isFloat = Util.floatTryParse(args["move_factor"])
     if (isFloat and isColor):
         self.__execute_task(
             LedUtil.breathing,
             (self.pixels, lambda: self.cancelTask, color, move_factor))
Ejemplo n.º 5
0
 def pixel_theater_chase(self, args):
     color, isColor = Util.colorTryParse(args["color"])
     wait, isFloat = Util.floatTryParse(args["wait"])
     is_rainbow, isBool = Util.boolTryParse(args["is_rainbow"])
     if (isColor and isFloat and isBool):
         self.__execute_task(LedUtil.theaterChase,
                             (self.pixels, lambda: self.cancelTask, color,
                              wait, is_rainbow))
Ejemplo n.º 6
0
 def pixel_color_wipe(self, args):
     color, isColor = Util.colorTryParse(args["color"])
     wait, isFloat = Util.floatTryParse(args["wait"])
     should_clear, isBool = Util.boolTryParse(args["should_clear"])
     if (isColor and isFloat and isBool):
         self.__execute_task(LedUtil.color_wipe,
                             (self.pixels, lambda: self.cancelTask, wait,
                              color, should_clear))
Ejemplo n.º 7
0
 def pixel_appear_from_back(self, args):
     color, isColor = Util.colorTryParse(args["color"])
     wait, isFloat = Util.floatTryParse(args["wait"])
     size, isInt = Util.intTryParse(args["size"])
     if (isColor and isFloat and isInt):
         self.__execute_task(
             LedUtil.appear_from_back,
             (self.pixels, lambda: self.cancelTask, color, wait, size))
Ejemplo n.º 8
0
 def pixel_blink_color(self, args):
     color, isColor = Util.colorTryParse(args["color"])
     wait, isFloat = Util.floatTryParse(args["wait"])
     blink_time, isInt = Util.intTryParse(args["blink_time"])
     if (isColor and isFloat and isInt):
         self.__execute_task(LedUtil.blink_color,
                             (self.pixels, lambda: self.cancelTask,
                              blink_time, wait, color))
Ejemplo n.º 9
0
 def pixel_color_wipe_cycle(self, args):
     color, isColor = Util.colorTryParse(args["color"])
     wait, isFloat = Util.floatTryParse(args["wait"])
     fade_step, isInt = Util.intTryParse(args["fade_step"])
     loop_forever, isBool = Util.boolTryParse(args["loop_forever"])
     if (isColor and isFloat and isInt and isBool):
         self.__execute_task(LedUtil.color_wipe_cycle,
                             (self.pixels, lambda: self.cancelTask, wait,
                              color, fade_step, loop_forever))
Ejemplo n.º 10
0
 def pixel_fireworks(self, args):
     size, isInt = Util.intTryParse(args["size"])
     color, isColor = Util.colorTryParse(args["color"])
     is_rainbow, isBool = Util.boolTryParse(args["is_rainbow"])
     number_of_fireworks, isInt1 = Util.intTryParse(
         args["number_of_fireworks"])
     chance_of_explosion, isInt2 = Util.intTryParse(
         args["chance_of_explosion"])
     fade_step, isInt3 = Util.intTryParse(args["fade_step"])
     firework_fade, isInt4 = Util.intTryParse(args["firework_fade"])
     if (isColor and isBool and isInt and isInt1 and isInt2 and isInt3
             and isInt4):
         self.__execute_task(
             LedUtil.fireworks,
             (self.pixels, lambda: self.cancelTask, size, color, is_rainbow,
              number_of_fireworks, chance_of_explosion, fade_step,
              firework_fade))