Пример #1
0
 def pixel_brightness_decrease(self, args):
     wait, isFloat = Util.floatTryParse(args["wait"])
     step, isInt = Util.intTryParse(args["step"])
     if (isFloat and isInt):
         self.__execute_task(
             LedUtil.brightness_decrease,
             (self.pixels, lambda: self.cancelTask, wait, step))
Пример #2
0
 def pixel_breathing_rainbow(self, args):
     move_factor, isFloat = Util.floatTryParse(args["move_factor"])
     color_step, isInt = Util.intTryParse(args["color_step"])
     if (isInt and isFloat):
         self.__execute_task(LedUtil.breathing_rainbow,
                             (self.pixels, lambda: self.cancelTask,
                              color_step, move_factor))
Пример #3
0
 def pixel_rainbow_colors(self, args):
     wait, isFloat = Util.floatTryParse(args["wait"])
     loop_forever, isBool = Util.boolTryParse(args["loop_forever"])
     if (isFloat and isBool):
         self.__execute_task(
             LedUtil.rainbow_colors,
             (self.pixels, lambda: self.cancelTask, wait, loop_forever))
Пример #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))
Пример #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))
Пример #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))
Пример #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))
Пример #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))
Пример #9
0
 def pixel_rainbow_cycle(self, args):
     loop_forever, isBool = Util.boolTryParse(args["loop_forever"])
     wait, isFloat = Util.floatTryParse(args["wait"])
     loop, isInt = Util.intTryParse(args["loop"])
     if (isBool and isFloat and isInt):
         self.__execute_task(LedUtil.rainbow_cycle,
                             (self.pixels, lambda: self.cancelTask, wait,
                              loop, loop_forever))
Пример #10
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))
Пример #11
0
 def pixel_color_wipe_rainbow(self, args):
     wait, isFloat = Util.floatTryParse(args["wait"])
     fade_step, isInt = Util.intTryParse(args["fade_step"])
     color_step, isInt2 = Util.intTryParse(args["color_step"])
     if (isFloat and isInt and isInt2):
         self.__execute_task(LedUtil.color_wipe_rainbow,
                             (self.pixels, lambda: self.cancelTask, wait,
                              fade_step, color_step))
Пример #12
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))
Пример #13
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))
Пример #14
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))
Пример #15
0
 def pixel_rainbow_cycle_successive(self, args):
     wait, isFloat = Util.floatTryParse(args["wait"])
     if (isFloat):
         self.__execute_task(LedUtil.rainbow_cycle_successive,
                             (self.pixels, lambda: self.cancelTask, wait))