Changeset - 22b3563bc3cd
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 11 years ago 2014-06-14 23:06:22
drewp@bigasterisk.com
clamp blacklight output val
Ignore-this: bdea33f245693ed1623b8cd7929f71fe
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/effecteval/effectloop.py
Show inline comments
 
@@ -196,7 +196,9 @@ class LedLoop(EffectLoop):
 
        for which, px255 in combined.items():
 
            if which == 'blacklight':
 
                if px255 != self.lastSentBacklight:
 
                    yield succeed(self.serialWrite(self.boards['L'], '\x60\x01' + chr(px255)))
 
                    b = min(255, max(0, px255))
 
                    yield succeed(self.serialWrite(self.boards['L'],
 
                                                   '\x60\x01' + chr(b)))
 
                    self.lastSentBacklight = px255
 
            else:
 
                board = self.boards[which]
0 comments (0 inline, 0 general)