ondryaso / pi-rc522

Raspberry Pi Python library for SPI RFID RC522 module
MIT License
412 stars 150 forks source link

switch to spidev #20

Closed LudwigKnuepfer closed 7 years ago

LudwigKnuepfer commented 7 years ago

Use spidev library instead of py-spi.

Closes https://github.com/ondryaso/pi-rc522/issues/18. Fixes an issue (tracked in the original project as https://github.com/mxgxw/MFRC522-python/issues/21) where the device stops reading tags after some time. (I only tested and therefore encountered this issue with my interrupt driven tag detection patch - I did not test if the same issue exists in master.)

I could not find information on the versioning schema - should I change the major version instead because it is an API change in the init function? BTW: The upcoming PR for https://github.com/ondryaso/pi-rc522/issues/9 requires an API change in the init function as well.

ondryaso commented 7 years ago

I'll test this and eventually merge it. I have actually never really thought about versioning, as I haven't expected anyone to use this :) I'll probably change the major version to 2 before the merge, it really makes more sense.

LudwigKnuepfer commented 7 years ago

Should I open a PR for #9 based on this branch already? That way you could test/approve/merge all changes at once and it would only require one version increase. I just kept them separate because I'm used to this kind of one-feature-at-a-time-PR approach.

OT regarding "using this": When searching for "python rc522", the most prominent implementation is the one by @mxgxw but apparently he lost interest in maintaining it. The next implementation one finds is this, it improves plenty of things already and is actively maintained, so I regard it as the de-facto successor. Deal with it ;) Looking at the issues opened here and there, it appears that there is general interest in a go-to implementation.

LudwigKnuepfer commented 7 years ago

Changed version number, rebased on master.

sim0nx commented 7 years ago

@ondryaso could you please merge this PR ?