Skip to content

Commit a5b7e6f

Browse files
authored
Unified pin checking
1 parent 83bd4bd commit a5b7e6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pirc522/rfid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(self, bus=0, device=0, speed=1000000, pin_rst=22,
4848
self.spi.max_speed_hz = speed
4949

5050
GPIO.setmode(pin_mode)
51-
if pin_rst is not None:
51+
if pin_rst != 0:
5252
GPIO.setup(pin_rst, GPIO.OUT)
5353
GPIO.output(pin_rst, 1)
5454
GPIO.setup(pin_irq, GPIO.IN, pull_up_down=GPIO.PUD_UP)

0 commit comments

Comments
 (0)