fix squiggly start

This commit is contained in:
ladyada 2018-08-21 00:12:35 -04:00
parent faaf7fad4d
commit 76a7ff5aab

View file

@ -167,6 +167,11 @@ class PN532_I2C(object):
self.debug = debug self.debug = debug
self._i2c = i2c_device.I2CDevice(i2c, _I2C_ADDRESS) self._i2c = i2c_device.I2CDevice(i2c, _I2C_ADDRESS)
self._irq = irq self._irq = irq
try:
self.get_firmware_version() # first time often fails, try 2ce
return
except:
pass
self.get_firmware_version() self.get_firmware_version()
def _write_frame(self, data): def _write_frame(self, data):