Skip to content

Commit cea2d9b

Browse files
committed
change get_firmware_version() function to firmware_version property
1 parent 14749b1 commit cea2d9b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

adafruit_pn532/adafruit_pn532.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ def __init__(self, *, debug=False, reset=None):
196196

197197
try:
198198
self._wakeup()
199-
self.get_firmware_version() # first time often fails, try 2ce
199+
self.firmware_version # first time often fails, try 2ce
200200
return
201201
except (BusyError, RuntimeError):
202202
pass
203-
self.get_firmware_version()
203+
self.firmware_version
204204

205205
def _read_data(self, count):
206206
# Read raw data from device, not including status bytes:
@@ -317,7 +317,8 @@ def call_function(self, command, response_length=0, params=[], timeout=1): # pyl
317317
# Return response data.
318318
return response[2:]
319319

320-
def get_firmware_version(self):
320+
@property
321+
def firmware_version(self):
321322
"""Call PN532 GetFirmwareVersion function and return a tuple with the IC,
322323
Ver, Rev, and Support values.
323324
"""

0 commit comments

Comments
 (0)