rfid imports
This commit is contained in:
parent
b6211a8dcb
commit
7c79bfc6a3
|
|
@ -5,8 +5,8 @@ import platform
|
|||
from PyQt5.QtCore import QMutex, Qt, QTimer, pyqtSlot, pyqtSignal
|
||||
from .component import Component
|
||||
import ndef
|
||||
import nfc
|
||||
from nfc.clf import RemoteTarget
|
||||
import src.lib.nfc
|
||||
from src.lib.nfc.clf import RemoteTarget
|
||||
|
||||
|
||||
class RFID_PN532(Component):
|
||||
|
|
@ -26,7 +26,7 @@ class RFID_PN532(Component):
|
|||
self._period = 1
|
||||
|
||||
def open_device(self):
|
||||
self.clf = nfc.ContactlessFrontend()
|
||||
self.clf = src.lib.nfc.ContactlessFrontend()
|
||||
for dev in self.dev_list:
|
||||
self.connected = self.clf.open(dev)
|
||||
if self.connected:
|
||||
|
|
@ -52,7 +52,7 @@ class RFID_PN532(Component):
|
|||
else:
|
||||
target = self.clf.sense(RemoteTarget('106A'), RemoteTarget('106B'), RemoteTarget('212F'))
|
||||
if target is not None:
|
||||
tag = nfc.tag.activate(self.clf, target)
|
||||
tag = src.lib.nfc.tag.activate(self.clf, target)
|
||||
if tag is not None:
|
||||
self.log.debug("tag present")
|
||||
if tag.ndef is not None:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user