Ejemplo n.º 1
0
 def __init__(self, sequence_queue, fade_engine):
     Process.__init__(self)
     self.__sequence_queue = sequence_queue
     self.__engine = fade_engine
     self.__current_sequence = None
     self.__black = rgb_light_color(0, 0, 0)
     self.__keepRunning = True
Ejemplo n.º 2
0
	def load_from_json(json_object):
		if 'name' not in json_object:
			return None
			
		seq = color_sequence(json_object['name'],
			json_object['color_fade_delay'],
			json_object['color_cycle_delay'])
	
		jColors = json_object['colors']
		for color in jColors:
			seq.add_color(
				rgb_light_color(
					color['red'], 
					color['green'], 
					color['blue']))
		
		return seq
Ejemplo n.º 3
0
 def __init__(self, strip):
     self.__rgb_strip = strip
     self.__current_color = rgb_light_color(0, 0, 0)