Changeset - eb8c4352798c
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 11 years ago 2014-06-14 23:03:46
drewp@bigasterisk.com
LR support in EE
Ignore-this: 55d3491da3979e323c465b32b2b304a4
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/Effects.py
Show inline comments
 
@@ -18,7 +18,7 @@ def register(f):
 
@register
 
class Strip(object):
 
    """list of r,g,b tuples for sending to an LED strip"""
 
    which = 'L'
 
    which = 'L' # LR means both
 
    pixels = []
 
    @classmethod
 
    def solid(cls, which='L', color=(1,1,1)):
light9/effecteval/effectloop.py
Show inline comments
 
@@ -186,7 +186,8 @@ class LedLoop(EffectLoop):
 
            elif isinstance(out, Effects.Strip):
 
                pixels = numpy.array(out.pixels, dtype=numpy.float16)
 
                px255 = (numpy.clip(pixels, 0, 1) * 255).astype(numpy.uint8)
 
                combined[out.which] = numpy.maximum(combined[out.which], px255)
 
                for w in out.which:
 
                    combined[w] = numpy.maximum(combined[w], px255)
 
                
 
        return combined
 

	
0 comments (0 inline, 0 general)