Mercurial > code > home > repos > light9
changeset 1152:eb8c4352798c
LR support in EE
Ignore-this: 55d3491da3979e323c465b32b2b304a4
author | drewp@bigasterisk.com |
---|---|
date | Sat, 14 Jun 2014 23:03:46 +0000 |
parents | fe7ed6395e9f |
children | 22b3563bc3cd |
files | light9/Effects.py light9/effecteval/effectloop.py |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/Effects.py Sat Jun 14 22:33:59 2014 +0000 +++ b/light9/Effects.py Sat Jun 14 23:03:46 2014 +0000 @@ -18,7 +18,7 @@ @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)):
--- a/light9/effecteval/effectloop.py Sat Jun 14 22:33:59 2014 +0000 +++ b/light9/effecteval/effectloop.py Sat Jun 14 23:03:46 2014 +0000 @@ -186,7 +186,8 @@ 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