From: W. Trevor King Date: Fri, 16 Mar 2012 03:41:28 +0000 (-0400) Subject: Oops, build DigitalPort.write_mask with |= instead of &=. X-Git-Tag: v0.4~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=614feec316c95d28a9c77438add683b35bd9c9b4;p=pyafm.git Oops, build DigitalPort.write_mask with |= instead of &=. If you start with 0, &= will never change anything :p. --- diff --git a/pyafm/digital_port.py b/pyafm/digital_port.py index 0abe5c1..4c8a401 100644 --- a/pyafm/digital_port.py +++ b/pyafm/digital_port.py @@ -43,7 +43,7 @@ class DigitalPort (object): channel = self.subdevice.channel( index=index, factory=_DigitalChannel) channel.dio_config(c['direction']) - self.write_mask &= 1 << index + self.write_mask |= 1 << index self.channels.append(channel) self.name = c['name']