Changeset - 68e1655eaa2c
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 16 years ago 2008-11-16 04:21:02
drewp@bigasterisk.com
fix bcf2000 valueOut when you pass an int 0,1 to a button
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
bcf2000.py
Show inline comments
 
@@ -103,7 +103,7 @@ class BCF2000(object):
 
        self.lastValue[name] = value
 
        which = [k for k,v in self.control.items() if v == name]
 
        assert len(which) == 1, "unknown control name %r" % name
 
        if isinstance(value, bool):
 
        if name.startswith('button-'):
 
            value = value * 127
 
        #print "bcf: write %s %s" % (name, value)
 
        self.dev.write(chr(0xb0) + chr(which[0]) + chr(int(value)))
0 comments (0 inline, 0 general)