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

Syntax error in MFRC522.py causing a massive slowdown #90

Open
jah0383 opened this issue Jun 21, 2021 · 0 comments
Open

Syntax error in MFRC522.py causing a massive slowdown #90

jah0383 opened this issue Jun 21, 2021 · 0 comments

Comments

@jah0383
Copy link

jah0383 commented Jun 21, 2021

In MFRC522.py on line 199 the code is
if ~((i!=0) and ~(n&0x01) and ~(n&waitIRq)):
It should use not instead of ~ since at the moment the entire loop only exits when done 2000 times, which takes 1.6 seconds
replacing the ~'s with not's creates a massive speed up.
So the line should be
if not ((i != 0) and not (n & 0x01) and not (n & waitIRq)):

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