Change method for scanning for card from poll, which is OK for USB-connected PN532, but causes 100% CPU usage with SPI-connected PN532

This commit is contained in:
Ondrej Mikle 2018-05-06 01:43:43 +02:00
parent 9b89a230c9
commit 91c0d72de6
3 changed files with 16 additions and 15 deletions

View file

@ -99,11 +99,13 @@ public:
virtual ~NFCDevice();
/**
* Poll until a ISO14443A card is in the field and returns its UID.
* Read UID of a card in field. If multiple cards are found, return UID of first one.
*
* If you are polling for cards with this, include some sleep in-between the calls (e.g. 0.1 sec).
*
* @returns binary string containing UID or empty if non-supported card
* present in reader field
* @throws NFCError if polling failed
* @throws NFCError if no cards in reader's field
*/
std::string scanUID() throw(NFCError);