Skip to content

Commit 008a502

Browse files
committed
Convert board value to int only once.
1 parent 59c24cb commit 008a502

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

myDevices/devices/shield/piface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class PiFaceDigital(MCP23S17):
2121
def __init__(self, board=0):
2222
self.board = toint(board)
23-
MCP23S17.__init__(self, 0, 0x20 + toint(board))
23+
MCP23S17.__init__(self, 0, 0x20 + self.board)
2424
self.writeRegister(self.getAddress(self.IODIR, 0), 0x00) # Port A as output
2525
self.writeRegister(self.getAddress(self.IODIR, 8), 0xFF) # Port B as input
2626
self.writeRegister(self.getAddress(self.GPPU, 0), 0x00) # Port A PU OFF

0 commit comments

Comments
 (0)