# HG changeset patch # User drewp@bigasterisk.com # Date 2008-11-16 04:21:02 # Node ID 68e1655eaa2c5008930750c0e352a9db1deb70b0 # Parent c96768581667d4021b2390a5ff156be0cd57448e fix bcf2000 valueOut when you pass an int 0,1 to a button diff --git a/bcf2000.py b/bcf2000.py --- a/bcf2000.py +++ b/bcf2000.py @@ -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)))