Based on @tlongeri 's suggestion in https://github.com/ondryaso/pi-rc522/issues/44
I addded the timeout functionality to the wait_for_tag method so that it will return after a given number of seconds.
The timeout param is optional with default value of 0 (=no timeout) so that existing users of the library will not have any change in functionality unless they provide the new param.
This functionality is useful for detecting that the reader could not find a RFID tag, e.g. the card was removed.
Based on @tlongeri 's suggestion in https://github.com/ondryaso/pi-rc522/issues/44 I addded the timeout functionality to the wait_for_tag method so that it will return after a given number of seconds. The timeout param is optional with default value of 0 (=no timeout) so that existing users of the library will not have any change in functionality unless they provide the new param.
This functionality is useful for detecting that the reader could not find a RFID tag, e.g. the card was removed.