Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predicate error causes long response times #42

Open
kjoehass opened this issue Jul 17, 2021 · 0 comments
Open

Predicate error causes long response times #42

kjoehass opened this issue Jul 17, 2021 · 0 comments

Comments

@kjoehass
Copy link

Trying to read a card on a Pi 0 can take almost one second, and this delay is unnecessary. The problem is an error in MFRC522.py at line 219:
if ~((i != 0) and ~(n & 0x01) and ~(n & waitIRq)):
This line is using bit-wise complement instead of the proper logical not. It should be written as
if not ((i != 0) and not (n & 0x01) and not (n & waitIRq)):
instead. This significantly reduces the time needed to read a card, or to detect that a card is not present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant